GithubHelp home page GithubHelp logo

urcli's Introduction

Hello, I'm Mikkel Trolle Larsen

Head of Frontend at COACH Solutions

Lives in Køge, Denmark

urcli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urcli's Issues

Running "assign all" throws an error - "Not certified for project(s) all"

Expected behavior

Running urcli assign all should start the queue for me.

Actual behavior

Get an error
Error: Illegal Action: Not certified for project(s) all

Steps to reproduce the problem

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.

Your Operating System (e.g., Linux Ubuntu, MacOS, Windows)

Windows 10. Everything installed and running through Anaconda (python 3.5 if that helps).

Refactor assign.js

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.

Bug Report: Invalid Date for Average Turnaround Time

Which version of Node.js are you running (node -v)?

7.8.0

Which version of urcli are you running (urcli -V)?

2.5.2

What behavior were you expecting to see?

Total revenue and daily average calculated and displayed

What was the actual behavior?

"Earned" field is still calculated for each project except the one with the invalid date, "Total Earned" and "Daily Average" are not calculated correctly

Describe the steps needed to reproduce the problem?

  1. I have one project with an "Average Turnaround Time" with the value "Invalid Date".
  2. Run "urcli revenue" and the "Total Earned" and "Daily Average" fields have a value of "$0.00"

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Windows 8.1, Linux - Raspbian Jessie

ENOENT: no such file or directory, open '/home/sudhir/Downloads/package.json'

Which version of Node.js are you running (node -v)?

v6.10.0

Which version of urcli are you running (urcli -V)?

npm install urcli

What behavior were you expecting to see?

I am trying to do a local installation of urcli

What was the actual behavior?

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.

Describe the steps needed to reproduce the problem?

  1. npm install urcli

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Linux (Fedora).

Feature Request: Use chrono module for natural language date periods in revenue command

I'm opening this issue because:

  • urcli is crashing.
  • I think I've found a bug.
  • urcli is doing something I don't understand.
  • Other (see below for feature requests):

What's the feature?

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!

What problem is the feature intended to solve?

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.

Is this feature similar to an existing feature in another tool?

None that I know of.

Is this a feature you're prepared to implement, with support from the urcli team?

Maybe! :D.

Beginning date for revenues can be wrong.

Which version of Node.js are you running (node -v)?

6.10.1

Which version of urcli are you running (urcli -V)?

2.5.0

What behavior were you expecting to see?

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:
=============================================

What was the actual behavior?

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.

Describe the steps needed to reproduce the problem?

  1. urcli revenue 2

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Ubuntu 16.04

Comments

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

urcli setup failed

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.

Mistake in revenue dates for month of March

Describe bugs using this template:

Which version of Node.js are you running (node -v)?

6.6.0

Which version of urcli are you running (urcli -V)?

2.2.7

What behavior were you expecting to see?

When I type command urcli revenue 2017-03 I expected to get the revenue details for the entire month of March.

What was the actual behavior?

I instead get the revenue details from February 28th to March 28th. It should be from February 28th (non-inclusive) to March 31st (inclusive).

Describe the steps needed to reproduce the problem?

Just ran the command above.

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Windows 10.

certs command has unexpected results, have to control-c to exit

Bug

Expected behavior

would grab all my certs and display them? I'm not sure honestly

Actual behavior

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

Steps to reproduce the problem

urcli certs on my t2.micro caused this

Your Operating System (e.g., Linux Ubuntu, MacOS, Windows)

aws t2.micro ubuntu

System notification show assigned number equal to 0

Which version of Node.js are you running?

v6.10.0

Which version of urcli are you running?

2.3.0

What behavior were you expecting to see?

The system notification should show in the title "New Review Assigned! (2)"

What was the actual behavior?

The system notification shows in the title "New Review Assigned! (0)"

Describe the steps needed to reproduce the problem?

Get two projects to review. exit urcli and reopen. Check the system notification.

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Ubuntu

My intuition tells me that this could be have introduced when I removed the assignedCountvariable on commit fa902d4. So, it is notifying the user before updating the assigned array.

Move .apiConfig.json to home folder

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.

Feature request: Toggle UI elements with keyboard shortcuts.

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().

unable to setup?

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

Expected behavior

setup my account

Actual behavior

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)

Steps to reproduce the problem

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

Your Operating System (e.g., Linux Ubuntu, MacOS, Windows)

mac os x 10.10.5

EDIT:
Tried with sudo -- didn't help

Tests are not quitting after running

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).

Bug: `undefined` is displayed for "Currently Assigned" counter, when API token has expired

undefined

Which version of Node.js are you running (node -v)?

v6.9.5

Which version of urcli are you running (urcli -V)?

1.5.1

What behavior were you expecting to see?

The "Currently Assigned" counter to display a number.

What was the actual behavior?

"Currently Assigned" counter displays undefined.

Describe the steps needed to reproduce the problem?

  1. Wait for token to expire
  2. Wait for review to be assigned.

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

Windows 10

Feature Request: Daily Average Earnings

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:

  • When the user called urcli money today, this would not appear.
  • When calling 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.
  • The overall report starts in 2014-01-01. At this time, some of us were not reviewers, so, I guess it would have to get the first day that we start reviewing. (is this possible?)

What do you think?

Feature Request: Show review's price

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.

how to update projects when the price per project changes?

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

Move to Airbnb style guide, Eslint and Babel

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.

  • I want to use the Airbnb style guide, partly because of it's popularity, and partly because it's closer to how most people write JavaScript compared to the Standard style guide.
  • Eslint should help all contributors match the style guide.
  • I have to include Babel in this, since it's integrated into Eslint. Using Babel will require a build step and therefore a reorganization of the code.

Document recent changes with screenshots

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.

Decrease request update time

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.

`esc` no longer does anything

Guidelines to submit an issue

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:

Which version of Node.js are you running (node -v)?

v6.0.0

Which version of urcli are you running (urcli -V)?

v.2.5.0

What behavior were you expecting to see?

when I press esc I expect to close the table / information displayed about my queue and drop me back into command line.

What was the actual behavior?

literally nothing happens. control-c still works to close it down.

Describe the steps needed to reproduce the problem?

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

above behavior observed on:
mac os x - bash
ubuntu 16.04 - bash

Notify other devices when a submission is assigned.

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.

Assign dahsboard does not open if config was run first

What's going wrong?

The assign dashboard does not open if assign config is run first.

How can the urcli team reproduce the problem?

  1. Remove ~/.urcli/
  2. Run urcli setup and configure everything normally.
  3. Run urcli assign config
  4. Runurcli assign number-of-a-project
    It get stuck in
✔ Environment ready. Starting main submission request loop.

supporting information:

  • node -v prints: v6.10.3
  • urcli -V prints: 4.0.0
  • Windows, OS X/macOS, or Linux?: Linux

Push notification are not working

Which version of Node.js are you running (node -v)?

v7.8.0

Which version of urcli are you running (urcli -V)?

2.5.2

What behavior were you expecting to see?

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.

What was the actual behavior?

I should still see the dashboard and i should get push notification on my phone but it is not happening.

Describe the steps needed to reproduce the problem?

  1. Just run urcli assing all --push "o.sdql249LmfqrD......."

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

MacOS

Feature Request: First day on the job on the configuration file

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 revenueis run.

  • Cons: Users would have to run setup to update it.

Revenue command not working

Guidelines to submit an issue

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:

Which version of Node.js are you running (node -v)?

6.9.2

Which version of urcli are you running (urcli -V)?

2.5.2

What behavior were you expecting to see?

Revenue (urcli revenue)

What was the actual behavior?

screen shot 2017-04-17 at 2 49 05 pm

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

MacOS

Discussion: Renaming the "money" command

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.

  • pay
  • earnings
  • report
  • paycheck
  • salary

Fell free to also give suggestions.

urcli assign all failing

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)

Feature Request: Run script when opening a review through urcli

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?

  1. It would be nice to have the review downloaded and unzipped automatically.
  2. I could open files/links in a clean browser, like Chrome Canary, without all of the login stuff loaded. Or I could open things in the browser as a different user.
  3. I could do basic validation of filetypes and so on.

There are many other things you could do, including have an AI do the review for you.

Improve error message when user have an outdated token

This is a bug report + feature request.

urcli crashes without a good error message if the token is outdated.

Which version of Node.js are you running (node -v)?

v6.10.2

Which version of urcli are you running (urcli -V)?

2.5.2

What behavior were you expecting to see?

My revenue summary.

What was the actual behavior?

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)

Describe the steps needed to reproduce the problem?

  1. Let your token outdate
  2. Run urcli revenue.
  3. Get the error message.

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

crtl-c to cancel request fails to exit

Guidelines to submit an issue

I'm opening this issue because:

  • urcli is crashing.
  • I think I've found a bug.
  • urcli is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

When I hit ctrl-c I get an error instead of closing the request.

How can the urcli team reproduce the problem?

Use crtl-c ?
Here is my screenshot
screen shot 2017-05-30 at 1 51 36 pm

supporting information:

  • node -v prints: v6.0.0
  • urcli -V prints: 4.0.0
  • Windows, OS X/macOS, or Linux?:
    reproduced on linux and mac os.

Urcli shows nothing when running urcli assing all

Guidelines to submit an issue

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:

Which version of Node.js are you running (node -v)?

v7.8.0

Which version of urcli are you running (urcli -V)?

2.5.2

What behavior were you expecting to see?

I should see my certification queue in a tabular form.

What was the actual behavior?

Only the following is being printed on the screen:

Certified language >

Describe the steps needed to reproduce the problem?

  1. I only run: urcli assign all --push o.sdql249LmfqrDLgj5......

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

MACOS

notifications occur a "second" time if i've got a project to review but am updating my `assign` command

Guidelines to submit an issue

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:

Which version of Node.js are you running?

What behavior were you expecting to see?

I expect notifications to occur once and only once.

What was the actual behavior?

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.

Describe the steps needed to reproduce the problem?

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.

What is your Operating System (e.g., Linux Ubuntu, MacOS, Windows)?

request : add "total-assigned" field for the `money` command

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.