Skip to content

Commit

Permalink
Fetch docsite version number from git tags (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzi authored Aug 1, 2023
1 parent 5600fbf commit 5a31491
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
copyright = '2022-2023 Chan Zuckerberg Initiative'
author = 'Chan Zuckerberg Initiative'

import cellxgene_census
import git
repo = git.Repo(search_parent_directories=True)
tags = sorted(repo.tags, key=lambda t: t.tag.tagged_date)
latest_tag = tags[-1]

version = cellxgene_census.__version__
version = str(latest_tag)

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nbsphinx
myst-parser
sphinx-rtd-theme
sphinx-rtd-theme
gitpython

0 comments on commit 5a31491

Please sign in to comment.