Skip to content

Release builds: test_version accepts release versions; tag docs use the /stable/ URL - #1534

Merged
bruAristimunha merged 3 commits into
braindecode:masterfrom
bruAristimunha:bd-post2-fixes
Nov 2, 2026
Merged

bruAristimunha merged 3 commits into
braindecode:masterfrom
bruAristimunha:bd-post2-fixes

Conversation

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Post-2.0.0 follow-ups from the release:

  1. test/unit_tests/test_version.py used to assert is_prerelease, so the test suite inside the 2.0.0 sdist failed on its own version. The test now checks only __version__ > 1.8.1, which is the guard NeuralBench relies on.
  2. Docs URLs follow the ref. docs.yml sets BRAINDECODE_DOCS_URL to https://braindecode.org/stable/ on refs/tags/v* and to /dev/ for every other ref. docs/conf.py uses that URL for html_baseurl (canonical and sitemap), the Open Graph URL and image, and the JSON-LD block in _templates/layout.html. An unset or empty value falls back to /dev/.
  3. docs/build_agent_docs.py writes "moving development snapshot" into llms.txt only for /dev/ URLs. Release builds now say "It documents the Braindecode X release". A new test in docs/tests/test_agent_docs.py covers /dev/, /stable/ and /2.0/.

The whats_new entries are under 2.1.0 → Code health.

Verification results from the Voyager Job will be posted in a comment below.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the release-version and documentation alignment changes.

No open issues 🎉

What changed in this PR

This PR addresses post-2.0.0 release issues by allowing release versions in the version test and aligning documentation URLs and wording with release-tag builds.

Changes:

  • Retains the > 1.8.1 version guard without requiring a prerelease version.
  • Uses /stable/ documentation URLs for release tags and /dev/ otherwise.
  • Distinguishes development snapshots from releases in llms.txt, with tests covering development, stable, and versioned URLs.
File Description
test/​unit_tests/​test_version.py Allows release versions while preserving the downstream version guard.
docs/​whats_new.rst Records the release-test and documentation fixes.
docs/​tests/​test_agent_docs.py Tests URL-specific snapshot and release wording.
docs/​conf.py Configures canonical and social metadata URLs from the environment, defaulting to /dev/.
docs/​build_agent_docs.py Selects development or release wording for llms.txt.
docs/​_templates/​layout.html Uses the configured documentation URL in JSON-LD metadata.
.github/​workflows/​docs.yml Selects the documentation URL by ref and passes it to documentation generation.

Review effort: Balanced

@bruAristimunha

Copy link
Copy Markdown
Collaborator Author

Voyager Job bd2fu-t1-20261102t205415z on head a75afcac, py3.12, torch 2.15.0+cpu, sphinx 9.1.1. Every check matched what it should:

  • pre-commit run --files on the 7 changed files: exit 0 (16 hooks passed, 7 skipped, none failed).

  • test_version.py:

    • passes at 2.1.0dev0;
    • passes with version.py patched to 2.0.0;
    • fails with 1.8.1 (negative control);
    • master's old test fails at 2.0.0, which is the bug this fixes.
  • docs/tests/test_agent_docs.py: 33 passed, including the 3 new dev/stable/2.0 wording cases.

  • Importing docs/conf.py with BRAINDECODE_DOCS_URL set to each value below, html_baseurl, ogp_site_url, ogp_image and html_context["docs_url"] all came out as listed:

    BRAINDECODE_DOCS_URL resulting URL
    unset https://braindecode.org/dev/
    empty https://braindecode.org/dev/
    https://braindecode.org/stable/ https://braindecode.org/stable/
    https://braindecode.org/2.0 https://braindecode.org/2.0/
    https://braindecode.org/dev/ https://braindecode.org/dev/

@bruAristimunha
bruAristimunha merged commit d17906b into braindecode:master Nov 2, 2026
7 checks passed
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.36%. Comparing base (70f5bd2) to head (a75afca).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1534   +/-   ##
=======================================
  Coverage   91.36%   91.36%           
=======================================
  Files         170      170           
  Lines       22115    22115           
=======================================
  Hits        20206    20206           
  Misses       1909     1909           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants