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

feat: Add --version and -V cli flag. #187

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

jgarte
Copy link
Contributor

@jgarte jgarte commented Jul 25, 2023

Hi,

This PR adds --version and -V command line flags to griffe.

Should I also add the version information to the common options?

This PR also closes #186.

I also added two commits fixing a typo in a docstring and improving the return description.

Screenshot

image

jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

See my comments. If you think it's better to hardcode the version (I know it has benefits), then we should also automate its update through PDM: https://pdm-backend.fming.dev/metadata/#writing-dynamic-version-to-file.

src/griffe/__init__.py Outdated Show resolved Hide resolved
src/griffe/cli.py Outdated Show resolved Hide resolved
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 26, 2023
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 26, 2023
@jgarte
Copy link
Contributor Author

jgarte commented Aug 1, 2023

Hi @pawamoy, is there anything I should change/update in this PR that you haven't mentioned yet?

@pawamoy
Copy link
Member

pawamoy commented Aug 1, 2023

Didn't get time to review again, will do tomorrow 🙂
Thanks for the updates!

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Sometimes packages are installed without metadata information, so I guard against that by delaying retrieval of the version, and fallback on a 0.0.0 version. Let me know what you think 🙂

@pawamoy pawamoy merged commit a41515f into mkdocstrings:main Aug 4, 2023
16 checks passed
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.

Add version CLI flag.
2 participants