From 3492939fd9b29bf060faa76fe940e7606ef033fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:06:13 +0000 Subject: [PATCH 1/3] Initial plan From 31921e14fd8e2f1676d341de23f22d3e92308ebe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:09:55 +0000 Subject: [PATCH 2/3] Fix website version number and update copyright for release Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/41950809-07dd-430b-87f2-4ddec13fd55a Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com> --- docs/conf.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 38020b289..64f6e9210 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,10 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import os +import re +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 +64,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 +# Strip any dev/pre-release suffixes (e.g. ".dev0") to get the clean release version. +_raw_version = cortex.version.__hardcoded_version__ +release = re.sub(r'(\.dev\d+|\.post\d+\.dev\d+)$', '', _raw_version) # The short X.Y version. -version = ".".join(cortex.__version__.split(".")[:2]) -# The full version, including alpha/beta/rc tags. -release = cortex.version.__hardcoded_version__ +version = ".".join(release.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -280,9 +284,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. From a32f042fe4e63cc16e2815eaf2ab4c22b75e6297 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:18:19 +0000 Subject: [PATCH 3/3] Use setuptools-scm version instead of hardcoded fallback for docs Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/ae4fcda2-0fdc-4f72-bc69-e452100f7565 Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com> --- .github/workflows/build_docs.yml | 2 ++ docs/conf.py | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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 64f6e9210..d2031fe75 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,6 @@ # serve to show the default. import os -import re import sys from datetime import datetime @@ -70,9 +69,9 @@ # |version| and |release|, also used in various other places throughout the # built documents. import cortex # noqa -# Strip any dev/pre-release suffixes (e.g. ".dev0") to get the clean release version. -_raw_version = cortex.version.__hardcoded_version__ -release = re.sub(r'(\.dev\d+|\.post\d+\.dev\d+)$', '', _raw_version) +# The full version, including alpha/beta/rc tags. +# Relies on setuptools-scm generating cortex/_version.py at install time. +release = cortex.__version__ # The short X.Y version. version = ".".join(release.split(".")[:2])