Skip to content

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

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 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 jgarte force-pushed the add-version-cli branch from ed42d58 to 78d56a7 Compare July 25, 2023 23:34
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
@jgarte jgarte force-pushed the add-version-cli branch from 78d56a7 to 94dbea8 Compare July 25, 2023 23:35
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
@jgarte jgarte force-pushed the add-version-cli branch from 94dbea8 to f8ccfc6 Compare July 25, 2023 23:36
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
@jgarte jgarte force-pushed the add-version-cli branch from f8ccfc6 to 2e0c03d Compare July 25, 2023 23:41
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
@jgarte jgarte force-pushed the add-version-cli branch from 2e0c03d to eadd2ee Compare July 25, 2023 23:42
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 25, 2023
@jgarte jgarte force-pushed the add-version-cli branch from eadd2ee to 14f1bec Compare July 25, 2023 23:52
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.

jgarte added a commit to jgarte/griffe that referenced this pull request Jul 26, 2023
@jgarte jgarte force-pushed the add-version-cli branch from 14f1bec to 0b3f2b4 Compare July 26, 2023 12:49
jgarte added a commit to jgarte/griffe that referenced this pull request Jul 26, 2023
@jgarte jgarte force-pushed the add-version-cli branch from 0b3f2b4 to 0a9692d Compare July 26, 2023 12:55
@jgarte jgarte force-pushed the add-version-cli branch from 0a9692d to 4022d8e Compare July 26, 2023 13:40
@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
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