-
Notifications
You must be signed in to change notification settings - Fork 0
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
♻️ Refactor CLI #60
♻️ Refactor CLI #60
Conversation
Replace main.py with Click CLI module - cli.py Change invokation of ingest so that you can do: $ kidsfirst <cmd> <args> <options>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: If I python setup.py install and then try to run kidsfirst, I get:
Traceback (most recent call last):
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/bin/kidsfirst", line 11, in <module>
load_entry_point('kf-lib-data-ingest==0.1', 'console_scripts', 'kidsfirst')()
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 484, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2707, in load_entry_point
return ep.load()
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2325, in load
return self.resolve()
File "/Users/kelmana/Documents/kids-first/kf-lib-data-ingest/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2331, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'cli'
Why does that fail but pip install -e . works?
.gitignore
Outdated
@@ -105,3 +105,6 @@ venv.bak/ | |||
|
|||
# mypy | |||
.mypy_cache/ | |||
|
|||
# Visual studio | |||
.vscode/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/cli.py
Outdated
""" | ||
A CLI utility for ingesting study data into the Kids First ecosystem. | ||
|
||
This method not need to be implemented. cli is the root group that all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method not need to be implemented. cli is the root group that all | |
This method does not need to be implemented. cli is the root group that all |
src/cli.py
Outdated
A CLI utility for ingesting study data into the Kids First ecosystem. | ||
|
||
This method not need to be implemented. cli is the root group that all | ||
subcommands will implicitly be part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subcommands will implicitly be part of | |
subcommands will implicitly be part of. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(ignore this comment)
@fiendish It looks like the failure of python setup.py install has to do with the issues here. If you click the "exhaustive tests" link on that issue page and find your way into documentation on namespace packaging, there is some info on how to make the package installable via both setup.py and pip, but do we really need to support both? I think we just need to support pip.. |
good to go |
Refactor CLI to use a CLI framework in preparation for implementing additional extract, transform, load subcommands (#37)