Skip to content

Give cool project a cool command-line interface#11

Merged
robvanderleek merged 2 commits intogetcodelimit:mainfrom
JnyJny:feature/cli-refactor
Aug 7, 2023
Merged

Give cool project a cool command-line interface#11
robvanderleek merged 2 commits intogetcodelimit:mainfrom
JnyJny:feature/cli-refactor

Conversation

@JnyJny
Copy link
Contributor

@JnyJny JnyJny commented Aug 7, 2023

  • Refactored (natch) ./main.py into codelimit/__main__.py
  • Added typer CLI support

I've added a stanza in the pyproject.toml file that helps poetry create a stub executable so now we can do stuff like:

$ poetry shell
$ poetry install
...
$ codelimit

Additionally after publishing to PyPI, codelimit can be installed and used like:

$ python3 -m pip install codelimit
$ python3 -m codelimit --help
...
$ codelimit --help
...

I realize this is out of the blue, but Bob Belderbos turned me on to your tool this morning and I got excited about it.

- Refactored (natch) ./main.py into codelimit/__main__.py
- Added typer CLI support
@JnyJny
Copy link
Contributor Author

JnyJny commented Aug 7, 2023

FYI, I did not test the --upload functionality since I didn't know what the consequences of uploading to the URL would be.

@robvanderleek robvanderleek merged commit c1eee06 into getcodelimit:main Aug 7, 2023
@robvanderleek
Copy link
Collaborator

Hi @JnyJny 👋

Thanks a lot for your first contribution!

This project is still in its infancy 🐣 Please have patience while basic stuff is missing or broken. I really appreciate your contributions and any positive/negative feedback!

To briefly answer your questions:
I'm setting up semantic versioning for deployments to PyPi.
The --upload functionality is eventually needed to run this tool in a GH Actions flow.

KR, Rob

@JnyJny
Copy link
Contributor Author

JnyJny commented Aug 7, 2023

Thanks for accepting my PR!

I just realized I didn't provide an updated README.md to reflect the new usage and not sure if the Textual console development mode is broken now. But that's what future issue and PRs are for I guess!

@robvanderleek
Copy link
Collaborator

I've updated the README 👍
At this point of the project (pre-alpha) I'm committing smaller changes directly to main, let me know if that's inconvenient for you.

For pyinstaller I needed to change the relative imports back into regular imports. Not sure how I want to distribute this app (definitely through PyPi, but also as a single binary through homebrew). Very interested in your feedback on that topic.

Textual development mode is still broken, need to look into that.

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