Skip to content

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

Merged
mvdoc merged 3 commits intomainfrom
copilot/update-pycortex-version-number
Apr 4, 2026
Merged

Fix docs version display and update copyright to Gallant Lab#614
mvdoc merged 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.

@mvdoc mvdoc marked this pull request as ready for review April 4, 2026 18:42
@mvdoc mvdoc merged commit 5fdd3f5 into main Apr 4, 2026
@mvdoc mvdoc deleted the copilot/update-pycortex-version-number branch April 4, 2026 18:42
mvdoc added a commit to mvdoc/pycortex that referenced this pull request Apr 4, 2026
…widget-dvTkg

* origin/main:
  FIX NaN values in Volume/Vertex rendering as black instead of transparent (gallantlab#612)
  Fix docs version display and update copyright to Gallant Lab (gallantlab#614)
  Disable flatmap tilt by default; respect allow_tilt checkbox in controls (gallantlab#618)
  Split 'r' hotkey: fold-only vs full view reset (gallantlab#617)
  Bump codecov/codecov-action from 5 to 6 (gallantlab#615)
  FIX deprecated scipy APIs (gallantlab#609)

# Conflicts:
#	docs/conf.py
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