rdev-hackaton / GitHubTimeTracker

MIT License
5 stars 1 forks source link

CLI entrypoint #59

Closed Valian closed 8 years ago

Valian commented 8 years ago

As I know there is no way to run CLI, without installing our library from pip, other than importing click function and running it. This change should make it more convenient to use.

ffigiel commented 8 years ago

Doing pip install repo_path will install entry points. We just removed the if __name__ ... thing because of import errors

Valian commented 8 years ago

Import errors were caused by relative imports. Also script should be run from root project directory, but then it works.

b-me commented 8 years ago

Please use run_cli convention introduced here https://github.com/rdev-hackaton/GitHubTimeTracker/commit/2a82aca811b4e4ff51288611d2884928ccc5b759#diff-52990ce013263e10aa527149f8e43d63R50 and make tests (there are also in this commit)

Valian commented 8 years ago

Ok, closing

ffigiel commented 8 years ago

If you install the package with -e parameter, you can call ghtt and it will run directly on the code from your repository, so there's no need to run the entry point manually.