diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index fa7c2e1e6..004d8e542 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -16,6 +16,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 # Required for setuptools-scm to get version from tags - name: Set up Python uses: actions/setup-python@v6 diff --git a/docs/conf.py b/docs/conf.py index 38020b289..d2031fe75 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import sys +from datetime import datetime # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -61,16 +63,17 @@ # General information about the project. project = u'pycortex' -copyright = u'2012, James Gao' +copyright = u'2012\u2013%d, Gallant Lab' % datetime.now().year # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. import cortex # noqa -# The short X.Y version. -version = ".".join(cortex.__version__.split(".")[:2]) # The full version, including alpha/beta/rc tags. -release = cortex.version.__hardcoded_version__ +# Relies on setuptools-scm generating cortex/_version.py at install time. +release = cortex.__version__ +# The short X.Y version. +version = ".".join(release.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -280,9 +283,9 @@ # Bibliographic Dublin Core info. epub_title = u'pycortex' -epub_author = u'James Gao' -epub_publisher = u'James Gao' -epub_copyright = u'2012, James Gao' +epub_author = u'Gallant Lab' +epub_publisher = u'Gallant Lab' +epub_copyright = u'2012\u2013%d, Gallant Lab' % datetime.now().year # The language of the text. It defaults to the language option # or en if the language is not set.