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

Update docs version number #274

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Update docs version number #274

merged 2 commits into from
Sep 11, 2024

Conversation

mayantaylor
Copy link
Collaborator

No description provided.

@matthiasdiener
Copy link
Contributor

matthiasdiener commented Sep 11, 2024

Can you fetch the version number from the code (e.g., how it's done in __init__.py)?

@mayantaylor
Copy link
Collaborator Author

Can you fetch the version number from the code (e.g., how it's done in __init__.py)?

To get the version number in the right format, I can use something like
version = subprocess.check_output(['git', 'describe']).rstrip().decode().split('-')[0].split('v')[1]

But I'm not sure what release should be? Right now it just seems like its the three digit version number. Also can't tell where either of these are used at all so I'm not sure how to format them.

@matthiasdiener
Copy link
Contributor

We have been using the following setup successfully (see e.g.
https://github.com/matthiasdiener/constantdict/blob/main/doc/conf.py):

  • __init__.py defines __version__
  • doc/conf.py then does:
from foobar import __version__

version = __version__
release = __version__

@mayantaylor mayantaylor merged commit 55d073b into main Sep 11, 2024
5 checks passed
@mayantaylor mayantaylor deleted the maya/v1.1-rename branch September 17, 2024 17:12
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