Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI code refactor #665

Merged
merged 8 commits into from Jan 31, 2019

Conversation

Projects
None yet
4 participants
@VibhorCodecianGupta
Copy link

commented Jan 12, 2019

Fixes #658

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@VibhorCodecianGupta VibhorCodecianGupta force-pushed the VibhorCodecianGupta:test branch from 1547200 to 36c0725 Jan 12, 2019

@VibhorCodecianGupta VibhorCodecianGupta requested a review from jywarren Jan 12, 2019

@jywarren
Copy link

left a comment

This is great!!!

@jywarren

This comment has been minimized.

Copy link

commented Jan 12, 2019

There's a let based error in node 4, however. I think there's an issue open but we should be able to set strict mode and resolve it. What do you think?

Great work!!!

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 12, 2019

@jywarren using strict is always good, let's do it!
However, is the let based error affecting this PR too? I don't think it is..

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 12, 2019

@jywarren we can compile the CLI code using NectarJS

@jywarren jywarren referenced this pull request Jan 17, 2019

Closed

Remove logs in console. #678

0 of 5 tasks complete
index.js Outdated
if (err) exit("Can't read file.");
});

// User must input a step. If steps exist, check that every step is a valid step.
if (!program.step || !validateSteps(program.step))
if (!program.step || !(require('./src/CliUtils').validateSteps(program.step, sequencer)))

This comment has been minimized.

Copy link
@HarshKhandeparkar

HarshKhandeparkar Jan 22, 2019

Member

How about requiring everything at the start of the file for consistency?

This comment has been minimized.

Copy link
@VibhorCodecianGupta

VibhorCodecianGupta Jan 23, 2019

Author

Oh yes, I didn't pay attention. Will do

Show resolved Hide resolved index.js

@VibhorCodecianGupta VibhorCodecianGupta force-pushed the VibhorCodecianGupta:test branch from 5195ed9 to 6eac5f8 Jan 23, 2019

@jywarren
Copy link

left a comment

This looks good, perhaps I'd like one more review from someone, and a rebase? Thanks a lot, this is exciting!!!

@jywarren

This comment has been minimized.

Copy link

commented Jan 24, 2019

Hmm, is Travis stuck?

@VibhorCodecianGupta VibhorCodecianGupta requested review from tech4GT and Mridul97 Jan 24, 2019

@Mridul97
Copy link

left a comment

Looks good! :)

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@Mridul97 @jywarren Travis seems to be stuck. Any ideas?

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

@VibhorCodecianGupta try running the tests locally and see if anything pops up

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Maybe infinite recursion of require ?

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Did you try using the new CLI code locally? See if it gets stuck

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@HarshKhandeparkar checked and rechecked, everything's fine. #650 and #696 face similar issues

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Is that because node 4 support was dropped? Maybe the travis file is broken somehow

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Is your forked travis file counted? Or only the upstream file is counted?

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Oh the progress can be seen. It seems like it is stuck at upgrading system packages of some sort.

@VibhorCodecianGupta VibhorCodecianGupta force-pushed the VibhorCodecianGupta:test branch from c796723 to f1cf358 Jan 24, 2019

VibhorCodecianGupta added some commits Jan 24, 2019

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@jywarren @HarshKhandeparkar Travis was just behaving weirdly I guess? The last two commits are just do/undo commits and the job kickstarted again. Travis passes now. I think we can merge this now?

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Yes I saw that. Maybe it was a travis bug of some sort.

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

#696 is still in progress though. Maybe any commit would reset the procedure and fix this?

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@HarshKhandeparkar I guess that's it. Once the job kickstarts again, Travis resumes.
Also, could you review the changes?

@HarshKhandeparkar
Copy link
Member

left a comment

✔️ . Please share a GIF if possible

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

Here is a screenshot. I'm on a slow internet here 😅
Do mention if a GIF is required. Tested, everything works fine

screen shot 2019-01-25 at 1 57 20 am

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

No need of a GIF. Thanks! Looks good!

@HarshKhandeparkar

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

I'm on a slow internet here

Same here. I'm using BSNL so no hopes for the next 💯 years. The latency is more than what it would take to compile image-sequencer.

@VibhorCodecianGupta VibhorCodecianGupta removed the request for review from tech4GT Jan 26, 2019

@VibhorCodecianGupta

This comment has been minimized.

Copy link
Author

commented Jan 31, 2019

@jywarren I think this is a complete blob of work. Thoughts?

@jywarren jywarren merged commit d0bf9de into publiclab:main Jan 31, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jywarren

This comment has been minimized.

Copy link

commented Jan 31, 2019

Looks good! Merging now, and great work, again!

HarshKhandeparkar added a commit to HarshKhandeparkar/image-sequencer that referenced this pull request Feb 9, 2019

CLI code refactor (publiclab#665)
* CLI refactor

* es6 rollback

* Travis fix

* syntax fix

* clustered require statements

* travis debug

* travis debug

@jywarren jywarren referenced this pull request Feb 9, 2019

Merged

Map types to html types #754

4 of 4 tasks complete

jywarren added a commit to HarshKhandeparkar/image-sequencer that referenced this pull request Mar 4, 2019

CLI code refactor (publiclab#665)
* CLI refactor

* es6 rollback

* Travis fix

* syntax fix

* clustered require statements

* travis debug

* travis debug

jywarren added a commit that referenced this pull request Mar 4, 2019

Map types to html types (#754)
* fix insert step button

* add dist

* add new function

* remove console logs

* refactor

* Setup UI testing (#720)

* default sequencer ui test

* default step ui test suite

* intermediate step ui test

* preview ui test suite

* url methods test suite

* add set url params method test suite

* argument call tests

* test directory refactor

* travis fix

* CLI code refactor (#665)

* CLI refactor

* es6 rollback

* Travis fix

* syntax fix

* clustered require statements

* travis debug

* travis debug

* Added line that selects the "More modules..." after adding a step. (#713)

* Added line making module selection correct after adding a step

* Added line with appropriate module selection

* Add: Module tests (#748)

* WIP

* module testing harness

* adjustments

* Update package-lock.json

* Bump jsqr from 1.1.1 to 1.2.0 (#749)

Bumps [jsqr](https://github.com/cozmo/jsQR) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/cozmo/jsQR/releases)
- [Commits](https://github.com/cozmo/jsQR/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* refactor without spread syntax

jywarren added a commit that referenced this pull request Mar 17, 2019

Complete Edge Detect Module (#771)
* update dist

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

dist update

Revert "dist update"

This reverts commit 9ee2a98.

* fix insert step button

* add icon

* add dist

* use normal functions

* use normal functions

* add new function

* add dist

* remove console logs

* changes

* refactor

* add dist

* Bump looks-same from 5.0.2 to 6.0.0 (#729)

Bumps [looks-same](https://github.com/gemini-testing/looks-same) from 5.0.2 to 6.0.0.
- [Release notes](https://github.com/gemini-testing/looks-same/releases)
- [Changelog](https://github.com/gemini-testing/looks-same/blob/master/CHANGELOG.md)
- [Commits](gemini-testing/looks-same@v5.0.2...v6.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Setup UI testing (#720)

* default sequencer ui test

* default step ui test suite

* intermediate step ui test

* preview ui test suite

* url methods test suite

* add set url params method test suite

* argument call tests

* test directory refactor

* travis fix

* CLI code refactor (#665)

* CLI refactor

* es6 rollback

* Travis fix

* syntax fix

* clustered require statements

* travis debug

* travis debug

* Added line that selects the "More modules..." after adding a step. (#713)

* Added line making module selection correct after adding a step

* Added line with appropriate module selection

* Add: Module tests (#748)

* WIP

* module testing harness

* adjustments

* Fix choose file option and insert step functionality (#712)

* Fix choose file option

* changes

* Parse info.json to set module defaults (#650)

* changes

* changes

* changes

* changes

* changes

* changes

* Update package-lock.json

* Bump jsqr from 1.1.1 to 1.2.0 (#749)

Bumps [jsqr](https://github.com/cozmo/jsQR) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/cozmo/jsQR/releases)
- [Commits](https://github.com/cozmo/jsQR/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump jsqr from 1.1.1 to 1.2.0 (#749)

Bumps [jsqr](https://github.com/cozmo/jsQR) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/cozmo/jsQR/releases)
- [Commits](https://github.com/cozmo/jsQR/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* dist

* changes

* working

* final touches

* revert mapTypes

* proper revert

* Fix arctangent

* working hysteresis

* hysteresis optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.