Skip to content

Update docs version number#274

Merged
mayantaylor merged 2 commits intomainfrom
maya/v1.1-rename
Sep 11, 2024
Merged

Update docs version number#274
mayantaylor merged 2 commits intomainfrom
maya/v1.1-rename

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
@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