Fix docs version display and update copyright to Gallant Lab#614
Fix docs version display and update copyright to Gallant Lab#614
Conversation
Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/41950809-07dd-430b-87f2-4ddec13fd55a Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com>
|
@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 |
Agent-Logs-Url: https://github.com/gallantlab/pycortex/sessions/ae4fcda2-0fdc-4f72-bc69-e452100f7565 Co-authored-by: mvdoc <6150554+mvdoc@users.noreply.github.com>
You're right — relying on the hardcoded fallback defeats the purpose of setuptools-scm. In |
At release time, the docs website displayed
1.3.0.dev0instead of1.3.0because 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: Usecortex.__version__directly, which is populated by setuptools-scm's generatedcortex/_version.pyat install time, rather than relying on a hardcoded fallback:.github/workflows/build_docs.yml: Addedfetch-depth: 0to theactions/checkoutstep so setuptools-scm can discover git tags and produce the correct version during docs builds (matching whatpublish.ymlalready does).docs/conf.py— copyright: Updated from2012, James Gaoto2012–<current year>, Gallant Labusingdatetime.now().yearso the year stays current automatically.docs/conf.py— epub metadata: Updatedepub_author,epub_publisher, andepub_copyrighttoGallant Labwith 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.