- Reach me at [email protected]
- Find me on LinkedIn
trolster / urcli Goto Github PK
View Code? Open in Web Editor NEWCLI tool for the Udacity Reviews API
License: MIT License
CLI tool for the Udacity Reviews API
License: MIT License
Running urcli assign all
should start the queue for me.
Get an error
Error: Illegal Action: Not certified for project(s) all
I followed the steps detailed in the README.md. I downloaded the latest version just a few minutes ago. I think the error might be because I only have access to 1 project to review. Using "all" as an argument causes that error maybe. I am not familiar with node.js to go through the code and pinpoint it, otherwise would have placed a PR.
Windows 10. Everything installed and running through Anaconda (python 3.5 if that helps).
The assign
command has increased in functionalities in the last versions. As discussed elsewhere, a refactor would be welcome and I thought that an issue could be used to help us discuss how we will be doing it.
node -v
)?7.8.0
urcli
are you running (urcli -V
)?2.5.2
Total revenue and daily average calculated and displayed
"Earned" field is still calculated for each project except the one with the invalid date, "Total Earned" and "Daily Average" are not calculated correctly
Windows 8.1, Linux - Raspbian Jessie
Hi,
I guess it might be useful to log or retrieve the already completed reviews. At times, I refer my old reviews to go through the common mistakes.
The same can be retrieved by GET API /me/submissions/completed
.
Thanks,
Sumit
node -v
)?v6.10.0
urcli
are you running (urcli -V
)?npm install urcli
I am trying to do a local installation of urcli
npm WARN enoent ENOENT: no such file or directory, open '/home/sudhir/Downloads/package.json'
npm WARN Downloads No description
npm WARN Downloads No repository field.
npm WARN Downloads No README data
npm WARN Downloads No license field.
Full error gist.
Linux (Fedora).
Using chrono, https://github.com/wanasit/chrono, could allow the user to use the revenue command in a really intuitive way. For instance, urcli revenue last friday
would work!
Currently it's a bit of a pain to get revenue for a specific date, or specific time intervals. Using natural language could make this super easy.
None that I know of.
Maybe! :D.
node -v
)?6.10.1
urcli
are you running (urcli -V
)?2.5.0
When using revenue
to calculate the earnings for a specific month, I would expect to get:
17:37 $ urcli revenue 2
Earnings Report for 2017-02-01 to 2017-03-01:
=============================================
17:37 $ urcli revenue 2
Earnings Report for 2017-02-06 to 2017-03-01:
=============================================
The first day is not the first day of the month.
Ubuntu 16.04
I introduced this bug when changing the code that calculates the first day on Udacity. Since I didn't review anything on the first five days of February, revenue
is assuming that I started on Udacity at 2017-02-06, which is not.
A solution to this bug has already been coded in v3
branch
Hi, I'm trying to use the urcli and after install the urcli when I'm tying to setup I'm getting this error:
/usr/local/lib/node_modules/urcli/lib/utils/api.js:37
const { token, task, id } = options;
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/local/lib/node_modules/urcli/lib/utils/index.js:7:12)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
The command executed was urcli setup "my-token"
, I'm doing something wrong or it's a bug?
Thanks in advance.
The purpose of this is to discuss the possibilities to hook the project to a Continuous Integration system.
This tutorial can be a good starting point.
Describe bugs using this template:
node -v
)?6.6.0
urcli
are you running (urcli -V
)?2.2.7
When I type command urcli revenue 2017-03
I expected to get the revenue details for the entire month of March.
I instead get the revenue details from February 28th to March 28th. It should be from February 28th (non-inclusive) to March 31st (inclusive).
Just ran the command above.
Windows 10.
would grab all my certs and display them? I'm not sure honestly
Displays all my certs and leaves me in a some sort of state where it doesn't exit whatever it's done
if I then type something like a
or b
and then delete it, it pops up a request for my language
here is some redacted output (redacted my token and most of the projects)
ubuntu@udacity-review-api:~$ urcli certs
configuration saved:
{
"token": "eyJ0eXAiOiJK
},
"274": {
"name": "Your first neural network",
"price": "30.0"
}
},
"languages": [
"en-us"
]
}
Certified language > 'en'
di
this is not done
it wont' end
Certified language > but it keeps asking for my language if I delete anything
urcli certs
on my t2.micro caused this
aws t2.micro ubuntu
v6.10.0
urcli
are you running?2.3.0
The system notification should show in the title "New Review Assigned! (2)"
The system notification shows in the title "New Review Assigned! (0)"
Get two projects to review. exit urcli
and reopen. Check the system notification.
Ubuntu
My intuition tells me that this could be have introduced when I removed the assignedCount
variable on commit fa902d4. So, it is notifying the user before updating the assigned
array.
Currently, user setup is stored in .apiConfig.json, which is located in the root folder of the package. This means that you have to rerun setup whenever you update. If .apiConfig instead resides in the users home folder, it will persist across updates.
It seems that in the commit 027c21d, the printing of the totalAssigned
variable was erased.
The UI has become cluttered and is in dire need of simplification.
Since we have keyboard shortcuts accessible, why not allow the user to toggle interface elements using shortcuts? We could use "u" for toggling "Uptime:" and "t" for toggling "Total Projects Assigned:". Perhaps "h" for helptext?
It should be easy to implement. When the key is pressed, simply set a flag, true or false, for the UI element and then call setPrompt().
Ok this is now on my mac OSX . Just thought I'd set it up here as well.
I used sudo npm install -g urcli
and everything was happy
Then I went for
urcli setup token 'blahblahbal'
and I get this
setup my account
I redacted my token here
Gilads-MBP:~ Amar$ urcli setup token "eyJ0eXAiOiJKV1QiLCJhbGciOi"
You can now add all the languages that you are certified for.
Simply type in each language code and separate them with a space.
Example: "en-us pt-br"
Certified language > 'en-us'
You have entered the following language(s): [ 'en-us' ]
Was this correct? (y/n) > y
unhandled rejection: TypeError: certifications.body.filter is not a function
at Interface.<anonymous> (/usr/local/lib/node_modules/urcli/lib/commands/setup.js:65:39)
at next (native)
at step (/usr/local/lib/node_modules/urcli/lib/commands/setup.js:20:191)
at /usr/local/lib/node_modules/urcli/lib/commands/setup.js:20:361
at process._tickCallback (internal/process/next_tick.js:103:7)
just running setup, certs, revenue anything gets me that answer.
I previously had this working locally before, so I'm not sure what happened.
It's telling me I have urcli 2.7
mac os x 10.10.5
EDIT:
Tried with sudo -- didn't help
We could add some useful badges from https://shields.io/. Which badges would be nice to have?
After running tests with npm t
, it hangs there. The user has to press CTRL+C to quit it.
Another strange thing is if the user press SPACE+BACKSPACE when hanging, the following message appears:
Certified language >
This could be related to Jest, where an issue was opened (jestjs/jest#1456).
The project obviously needs tests.
node -v
)?v6.9.5
urcli
are you running (urcli -V
)?1.5.1
The "Currently Assigned" counter to display a number.
"Currently Assigned" counter displays undefined
.
Windows 10
I'd like to implement a new feature where the daily average earnings would be implemented.
Reasoning: I think that this new feature would help us measure our productivity.
Example:
The desired behavior would be.
> urcli money 2
Earnings Report for 2017-02-01 to 2017-03-01:
=============================================
Total Projects Assigned: 12
Project: Find Optimal Chopsticks Length (70):
---------------------------------------------
Total Assigned: 10
Reviewed: 10
Ungradeable: 0
Earned: $50.00
Project: Investigate a Dataset (107):
-------------------------------------
Total Assigned: 2
Reviewed: 2
Ungradeable: 0
Earned: $100.00
Total Earned: $150.00
Daily Average Earnings: $8.33
=============================================
Where only the last line, before the ===
was added to the present implementation.
Other comments:
urcli money today
, this would not appear.urcli money
for the current month, it would have to consider up to the present day. For example, today is the 18th, so it would only consider 18 days in the calculation.What do you think?
Udacity is adjusting the price for the reviews and, as pointed by @giladgressel on Slack, API users usually assigned themselves the reviews before checking the price.
My suggestion is to show the price for each review in the queue line. This way, we will know it before being assigned a review.
Hey Mikkel, I'm not sure if this is an issue or not, but I thought I'd just ask here.
They've been changing the price/project for the DLNDF project. So my setup thinks it's 40/per but now it's 30/per. This makes the money command wrong (especially confusing since I've graded some projects at each price range now).
Can I just re-run setup and it will get the right prices? I don't need it to track the differences: as in, I don't expect it to figure out which ones I reviewed at 40 vs 30. But, going ahead I need to get it to update itself.
thanks!
Gilad
This will set up the project to have a more streamlined process for contributing as well as allow for the use of newer JavaScript features.
An earning punch card would be an interesting addition to ur-cli
.
Maybe we could use this library.
And, maybe, the use could call it using a --punchcard
flag.
What are your thoughts?
There have been some serious changes to the prompt and how the prompt works, in the latest releases, and none of it has been documented. BAD.
I'll try to get the screenshots done in a hurry, but I keep forgetting to do it. SAD.
Any help is appreciated.
The server maintains the request alive for 60 minutes. To keep it alive, urcli
updates it at every 55 minutes. So, there is a 5-minute window that the request can be lost for some unknown reason (e.g., network failure).
To solve this, urcli
can update the request at every 5 minutes on the server which leaves a 55 minutes interval.
Please make sure that your have the latest version of Node.js installed before you report a bug. The command is node -v
and you need version 6 or higher.
If you are opening an issue because you would like to propose a new feature,
please write the title as "Feature Request:" followed by a short description of the feature.
Describe bugs using this template:
node -v
)?v6.0.0
urcli
are you running (urcli -V
)?v.2.5.0
when I press esc
I expect to close the table / information displayed about my queue and drop me back into command line.
literally nothing happens. control-c
still works to close it down.
above behavior observed on:
mac os x - bash
ubuntu 16.04 - bash
would love the option to receive an email if the job has been assigned.
I'm happy to try and help except I know nothing about web stuff.
I tried using this method in the udacity script
def textFromEmail():
msg = "New Udacity project to review."
msg = MIMEText(msg)
sender = '[email protected]'
with open('mailPwd.txt') as f:
pwd = f.read().strip()
recipients = ['[email protected]']
msg['From'] = sender
msg['To'] = ','.join(recipients)
try:
s = smtplib.SMTP('smtp.gmail.com:587')
s.ehlo()
s.starttls()
s.login(sender, pwd)
s.sendmail(sender, recipients, msg.as_string())
s.quit()
print "Sent mail."
except:
print "Failed to send mail."
It works for @ntaylorwss (you have to reduce permissions on your gmail) but hasn't worked for me.
The assign
dashboard does not open if assign config
is run first.
urcli
team reproduce the problem?~/.urcli/
urcli setup
and configure everything normally.urcli assign config
urcli assign number-of-a-project
✔ Environment ready. Starting main submission request loop.
node -v
prints: v6.10.3urcli -V
prints: 4.0.0node -v
)?v7.8.0
urcli
are you running (urcli -V
)?2.5.2
When i run:
urcli assing all --push "o.sdql249LmfqrD......."
I cannot see the dashboard neither it seems I am making any request.
It seems stuck.
I should still see the dashboard and i should get push notification on my phone but it is not happening.
Just run urcli assing all --push "o.sdql249LmfqrD......."
MacOS
Almost every time revenue
is run, it checks if the interval, where the earnings will be calculated, have the first day working as a reviewer. This could be avoided if this information was stored in the configuration file when the user runs setup
.
Pros: The revenue
code would be cleaner and there would no need to calculate it almost every time revenue
is run.
Cons: Users would have to run setup
to update it.
Please make sure that your have the latest version of Node.js installed before you report a bug. The command is node -v
and you need version 6 or higher.
If you are opening an issue because you would like to propose a new feature,
please write the title as "Feature Request:" followed by a short description of the feature.
Describe bugs using this template:
node -v
)?6.9.2
urcli
are you running (urcli -V
)?2.5.2
Revenue (urcli revenue
)
MacOS
We are looking for a replacement word for the money
command.
The replacement should be something professional and easy to write.
We've come up with some ideas.
Fell free to also give suggestions.
Getting this error..
/usr/lib/node_modules/urcli/lib/commands/assign.js:355
process.stdin.setRawMode(true);
^
TypeError: process.stdin.setRawMode is not a function
at setEventListeners (/usr/lib/node_modules/urcli/lib/commands/assign.js:355:17)
at exports.assignCmd (/usr/lib/node_modules/urcli/lib/commands/assign.js:455:3)
at Command._commander2.default.command.arguments.option.option.option.description.action (/usr/lib/node_modules
/urcli/lib/cli.js:36:27)
at Command.listener (/usr/lib/node_modules/urcli/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:194:7)
at Command.parseArgs (/usr/lib/node_modules/urcli/node_modules/commander/index.js:615:12)
at Command.parse (/usr/lib/node_modules/urcli/node_modules/commander/index.js:458:21)
at Object.<anonymous> (/usr/lib/node_modules/urcli/lib/index.js:10:15)
at Module._compile (module.js:571:32)
Basically I'd like to be able to launch a script for a particular project type, when I open a review of that project type from urcli.
Why?
There are many other things you could do, including have an AI do the review for you.
Things that could be useful to display:
Not sure exactly how to make the output reasonable.
This is a bug report + feature request.
urcli
crashes without a good error message if the token is outdated.
node -v
)?v6.10.2
urcli
are you running (urcli -V
)?2.5.2
My revenue summary.
The following error message:
19:03 $ urcli revenue 4
unhandled rejection: TypeError: this.reviews.forEach is not a function
at Report.create (/home/gbra/npm/lib/node_modules/urcli/lib/commands/revenue.js:156:18)
at /home/gbra/npm/lib/node_modules/urcli/lib/commands/revenue.js:243:14
at next (native)
at step (/home/gbra/npm/lib/node_modules/urcli/lib/commands/revenue.js:28:191)
at /home/gbra/npm/lib/node_modules/urcli/lib/commands/revenue.js:28:361
at process._tickCallback (internal/process/next_tick.js:109:7)
urcli revenue
.When I hit ctrl-c I get an error instead of closing the request.
urcli
team reproduce the problem?Use crtl-c ?
Here is my screenshot
node -v
prints: v6.0.0urcli -V
prints: 4.0.0Please make sure that your have the latest version of Node.js installed before you report a bug. The command is node -v
and you need version 6 or higher.
If you are opening an issue because you would like to propose a new feature,
please write the title as "Feature Request:" followed by a short description of the feature.
Describe bugs using this template:
node -v
)?v7.8.0
urcli
are you running (urcli -V
)?2.5.2
I should see my certification queue in a tabular form.
Only the following is being printed on the screen:
Certified language >
MACOS
Please make sure that your have the latest version of Node.js installed before you report a bug. The command is node -v
and you need version 6 or higher.
If you are opening an issue because you would like to propose a new feature,
please write the title as "Feature Request:" followed by a short description of the feature.
Describe bugs using this template:
I expect notifications to occur once and only once.
I if I have a project assigned for review, and I use esc
to exit and keep my queue spot and then do the assign
command again -- I will get a second round of notifications for the project already assigned. This isn't exactly a bug -- but I don't think it used to do this.
get a project assigned.
launch the urcli assign
, then hit esc
then launch it again. you keep getting new notifications everytime. The first couple of times I thought "oh wow another one!" then I realized it was the one I had.
When using the PushBullet support together with the Chrome extension, it opens up the PushBullet web page instead of creating a notification.
This seems to be related directly with node-pushbullet-api
and I opened an issue in alexwhitman/node-pushbullet-api#25.
My setup is Ubuntu 16.04 64 bits.
Activate debug mode by setting an environment variable.
Use something like winston
(already a dependency) to log errors when the program is in debug mode.
This would just help dummies like me figure things out a little more easily.
right now urcli money
returns
Total reviewed: y (int)
Ungradeable: x (int)
Earned: z ($$ earned)
I thought for some reason that x
was a subset of y
. However it's not, they are added together.
I think if a field
total assigned
was added, which was the sum of x
and y
this would eliminate any potential confusions
thanks!
If the user is exiting without deleting we can assume that they want the submission_request to persist as long as possible.
This only refers to when you are using month numbers as arguments, not when you are using options.
Hi,
I am a reviewer of DLNF. I am unable to see any API access option on my Reviewer Dashboard.
How can I generate an API key?
the pushbullet notifications used to tell me what project I was assigned
they no longer do that.
I liked the old one more :)
that's it!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.