Skip to content

Add Makefiles with convenience functions to each indicator #443

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

Merged
merged 10 commits into from
Nov 6, 2020
Merged

Conversation

chinandrew
Copy link
Contributor

@chinandrew chinandrew commented Nov 5, 2020

Summary of changes:
Adds identical makefiles (except the utils, which only installs the utils) to each directory with a few convenience commands

Commands:

  • make install: pip installs the utils package and the indicator in editable mode in the venv, which means any changes you make to the utils package or your indicator will automatically propagate without having to reinstall
  • make test: runs pytest on the entire test directory
  • make lint: runs pylint on the code directory (through janky regex to accommodate dynamic folder names)
  • make venv: creates a virtual environment called env. install calls this so you probably don't need to use it.
  • make clean: deletes the virtual environment and params.json

NOTE: When you run the commands, they will all be run in your virtual environment but your shell itself won't be activated (i.e. it won't show (env) in front) because make commands run in their own shell that exits once the command completes. However, all the installations, tests, etc, are done in the venv, so you can activate it if needed (e.g. if you want to run individual tests) and will see everything installed.

@chinandrew chinandrew requested a review from krivard November 5, 2020 23:48
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One important fix, one query, two optional nits

@krivard
Copy link
Contributor

krivard commented Nov 6, 2020

Also fwiw this is practically a line-for-line match for the Makefile i've been selfishly using locally, except your $(dir) is better than mine, so 👍

@chinandrew chinandrew mentioned this pull request Nov 6, 2020
@krivard krivard self-requested a review November 6, 2020 18:58
Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@krivard krivard merged commit 25c61c3 into main Nov 6, 2020
@krivard krivard deleted the makefile branch November 6, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants