Skip to content

Fix docs version display and update copyright to Gallant Lab#614

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/update-pycortex-version-number
Draft

Fix docs version display and update copyright to Gallant Lab#614
Copilot wants to merge 3 commits intomainfrom
copilot/update-pycortex-version-number

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

At release time, the docs website displayed 1.3.0.dev0 instead of 1.3.0 because the docs build workflow used a shallow checkout, preventing setuptools-scm from discovering git tags and generating the correct version. Copyright was also stale (2012, James Gao).

Changes

  • docs/conf.py — version: Use cortex.__version__ directly, which is populated by setuptools-scm's generated cortex/_version.py at install time, rather than relying on a hardcoded fallback:
    release = cortex.__version__
    version = ".".join(release.split(".")[:2])
  • .github/workflows/build_docs.yml: Added fetch-depth: 0 to the actions/checkout step so setuptools-scm can discover git tags and produce the correct version during docs builds (matching what publish.yml already does).
  • docs/conf.py — copyright: Updated from 2012, James Gao to 2012–<current year>, Gallant Lab using datetime.now().year so the year stays current automatically.
  • docs/conf.py — epub metadata: Updated epub_author, epub_publisher, and epub_copyright to Gallant Lab with matching dynamic year.

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Fix website version number for pycortex release Fix docs version display and update copyright to Gallant Lab Mar 27, 2026
Copilot AI requested a review from mvdoc March 27, 2026 20:11
@mvdoc
Copy link
Copy Markdown
Contributor

mvdoc commented Mar 27, 2026

@copilot this is not good. we don't want to rely on the hardcoded version because then we'll have to keep it in sync. we want to fetch the correct version number upon release/deployment based either on the tag or the version generated by setuptools

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot this is not good. we don't want to rely on the hardcoded version because then we'll have to keep it in sync. we want to fetch the correct version number upon release/deploymen...

You're right — relying on the hardcoded fallback defeats the purpose of setuptools-scm. In a32f042, I changed docs/conf.py to use cortex.__version__ directly (which comes from cortex/_version.py generated by setuptools-scm at install time), and also added fetch-depth: 0 to the build_docs.yml checkout step so setuptools-scm can discover git tags and produce the correct version during docs builds.

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.

Ensure website uses correct version number of pycortex at release

2 participants