Refactor docs. Migrate form deprecated mkdocs to zensical - #72
Refactor docs. Migrate form deprecated mkdocs to zensical#72SommerKai wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the project documentation stack from MkDocs (under mkdocs/) to Zensical (top-level docs/ + zensical.toml), and updates automation/tooling to build, validate, and deploy the docs from the new layout.
Changes:
- Introduces
zensical.tomland replaces MkDocs build/serve usage withzensicalacross tooling and CI. - Moves/rebuilds documentation content under
docs/and updates references/paths accordingly. - Updates pre-commit hooks and workflows to validate docs and publish the new
site/output.
Reviewed changes
Copilot reviewed 11 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zensical.toml | New Zensical site configuration (nav/theme/plugins). |
| uv.lock | Updates lockfile to reflect docs toolchain dependency changes. |
| scripts/check_docs_python_fences.py | Switches docs fence scanning default root to docs/. |
| pyproject.toml | Replaces MkDocs deps/tasks with Zensical equivalents; updates changelog path. |
| mkdocs/mkdocs.yml | Removes MkDocs configuration (migration away from MkDocs). |
| docs/standardization.md | Adds standardization docs page under new docs root. |
| docs/mother/overview.md | Adds “Mother framework” overview page under docs/. |
| docs/mother/models.md | Adds models documentation and API/doc integration examples. |
| docs/mother/configurator.md | Adds settings/configurator docs and embedded config examples. |
| docs/feature_generation.md | Adds feature generation documentation under docs/. |
| docs/examples.md | Adds tutorial index linking to example notebooks. |
| docs/development/pr_approval_guidelines.md | Adds PR approval guideline doc page in new structure. |
| docs/development/dev.md | Updates dev docs to reference Zensical + new changelog path. |
| docs/chemistry.md | Adds introductory chemistry guide and cross-links to other docs. |
| docs/Changelog.md | Adds changelog file in new authoritative docs location. |
| CLAUDE.md | Updates docs commands description to reflect Zensical. |
| .pre-commit-config.yaml | Adjusts exclusions and retargets docs fence hook to docs/. |
| .gitignore | Updates ignored build output to site/ (Zensical output). |
| .github/workflows/workflow.yml | Updates CI build/deploy jobs to build Zensical docs and publish site/. |
| .github/skills/update-docs/SKILL.md | Updates internal skill doc to reference new changelog/docs paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| nav = [ | ||
| { "Home" = "index.md" }, | ||
| { "Development" = [ { "General Development" = "development/dev.md" }, { "PR Approval Process" = "development/pr_approval_guidelines.md" } ] }, |
There was a problem hiding this comment.
there exists a symlink to index.md and it works
thomasATbayer
left a comment
There was a problem hiding this comment.
There are some suggestions from copilot still open, maybe have a look.
| [project.plugins] | ||
| search = {} | ||
| "markdown-exec" = {} | ||
|
|
468631d to
140a60f
Compare
|
for the failing tabpfn embedding which works in the The difference between branches: refactor_docs_KS (failing) → uv.lock was updated with newer dependencies, including aiohttp 3.14.3 The uv.lock update on the refactor_docs_KS branch likely pulled in a newer version of PyTorch or another dependency that now uses BFloat16 by default in certain operations. The TabPFN model doesn't support BFloat16 tensors. Solution Python Additionally, update the transform() method: Python This ensures that all data passed to TabPFN models is consistently float32, preventing the BFloat16 compatibility issue. |
140a60f to
632a52a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 26 changed files in this pull request and generated 7 comments.
Suppressed comments (3)
release-preflight-report.md:4
- This is a generated report produced by
scripts/release_preflight.pyand overwritten in each workflow workspace, but it is committed as a snapshot containing the currentv1.0.6commit range. The tracked copy will become stale after the next commit and is not what CI uses; keep it as an ignored artifact (or remove it from version control) instead of publishing misleading release data.
# Release Preflight Report
Base tag: v1.0.6
Commit count: 6
scripts/release_preflight.py:71
- This new release gate contains the commit parser, report generation, and strict exit behavior, but there are no unit tests for
scripts/release_preflight.py. A small change to the regex, tag handling, or strict path can silently block releases; add focused tests for scoped/breaking commits, unsupported subjects, empty ranges, and strict/non-strict exits.
def classify(commit: Commit) -> str | None:
match = CONVENTIONAL_RE.match(commit.subject)
if not match:
return None
commit_type = match.group("type")
if commit_type not in ALLOWED_TYPES:
return None
return commit_type
scripts/release_preflight.py:32
revertis accepted by this allowlist, but semantic-release's explicitallowed_tags/other_allowed_tagsinpyproject.tomlomit it. Arevert:commit can therefore pass this strict preflight and still be rejected or ignored by the release parser. Keep this allowlist in sync with semantic-release, or addrevertto that configuration.
"revert",
| - name: Run release preflight report | ||
| id: preflight | ||
| run: | | ||
| set +e | ||
| python3 scripts/release_preflight.py --strict --output release-preflight-report.md |
| - name: Comment preflight report on PR | ||
| if: always() && github.event_name == 'pull_request' | ||
| uses: actions/github-script@v8 |
| id: preflight | ||
| run: | | ||
| set +e | ||
| python3 scripts/release_preflight.py --strict --output release-preflight-report.md |
| - 7228faa1 Add markdown extensions and update mkdocstrings configuration | ||
| - 876a5aab Potential fix for pull request finding |
|
|
||
|
|
||
| def get_commits(base_tag: str) -> list[Commit]: | ||
| raw = run_git(["log", f"{base_tag}..HEAD", "--pretty=format:%H%x09%s"]) |
|
|
||
|
|
||
| def get_commits(base_tag: str) -> list[Commit]: | ||
| raw = run_git(["log", f"{base_tag}..HEAD", "--pretty=format:%H%x09%s"]) |
| # Set global torch default dtype to avoid BFloat16 compatibility issues | ||
| torch.set_default_dtype(torch.float32) |
There was a problem hiding this comment.
@SommerKai for @4xel-C tabicl PR we made sure that tabpfn only receives float so for this the tests run through, also would agree with Copilot that local adaption woulds be less intrusive: ca45d17
- Created zensical.toml to define project metadata and navigation structure. - Configured theme features including palette toggle for light and dark modes. - Set up validation for links and included plugins for search and markdown execution.
fix pre-commit config Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Introduced several markdown extensions for enhanced functionality, including attr_list, snippets, admonition, highlight, superfences, tabbed, and emoji support. - Configured mkdocstrings for Python with a specified inventory URL, updated paths, and set options for docstring style, inherited members, and source visibility.
- Implemented a new GitHub Actions workflow for release preflight checks that runs on pull requests and main branch pushes. - Added a script to generate a release preflight report, validating commit messages against conventional standards. - Updated documentation to reflect the new preflight process and its integration with the release workflow.
…main branch and remove outdated report file
632a52a to
c0a9040
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 24 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
.github/workflows/workflow.yml:308
- On a
workflow_dispatchrun onmain,releasecan still produce a release, buttest-pypi-publishis gated togithub.event_name == 'push'. Since this job is now a required dependency and this condition also requires its result to besuccess, manual releases always skippublish-pypi. Allow the test-PyPI job for manual releases or make this dependency conditional for that event.
needs: [release, test-pypi-publish]
if: needs.release.outputs.released == 'true' && needs.test-pypi-publish.result == 'success'
scripts/release_preflight.py:96
- The report is titled "Commits missing issue or PR reference", but this check only searches
commit.subject. A normal reference such asFixes #123in the commit body is therefore falsely reported as missing. Parse the full commit message when collecting issue references, or explicitly make the report subject-only.
if not ISSUE_RE.search(commit.subject):
scripts/release_preflight.py:50
- On a push to
main,actions/checkoutupdatesorigin/mainto the same commit checked out asHEAD, so the defaultorigin/main..HEADrange is empty. The main-branch run therefore reports zero commits and never validates the commits about to be released. Use the previous push SHA/release tag as the baseline for main runs, while retainingorigin/mainfor pull requests.
def resolve_base_ref(base_ref: str) -> str:
candidates = (f"origin/{base_ref}", base_ref) if base_ref == "main" else (base_ref,)
scripts/release_preflight.py:94
- This new release gate has no unit tests for
classify, base-ref resolution, report generation, or strict exit handling. Those branches decide whether CI blocks a release, so add focused tests undertest/unit/before relying on this script.
for commit in commits:
commit_type = classify(commit)
if commit_type is None:
unknown.append(commit)
else:
categorized[commit_type].append(commit)
| set +e | ||
| python3 scripts/release_preflight.py --strict --output release-preflight-report.md |
Release PreflightAutomated check that complements semantic-release changelog generation. # Release Preflight Report
Base ref: origin/main
Commit count: 9
## Conventional commit summary
- chore: 1
- docs: 4
- feat: 1
- fix: 3
## Commits missing issue or PR reference
- c0a90406 fix: Remove changelog file reference from semantic release configuration
- 44e39758 fix: Update release preflight script to validate commits against the main branch and remove outdated report file
- 0b4168c1 feat: Add release preflight workflow and reporting script
- 4ca0b255 docs: Add changelog file configuration to pyproject.toml
- 5313e073 docs: Update README to include 'Why Mother?" section
- 637ef56e docs: Add markdown extensions and update mkdocstrings configuration
- 16da4ab6 fix: Potential fix for pull request finding
- f6c168c7 chore: uv audit
- 508e3855 docs: Add initial configuration for Zensical documentation site
## Suggested manual follow-up
- Run the update-docs skill before release for issue and milestone reconciliation.
- Confirm docs updates for release-specific changes.
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 24 changed files in this pull request and generated 4 comments.
Suppressed comments (4)
.github/workflows/workflow.yml:163
- On a push to
main,actions/checkoutupdatesorigin/mainto the pushed commit, so the script's defaultmainbase resolves to the same commit asHEADandmain..HEADis empty. The preflight therefore never validates the commits that semantic-release will process on main. Select the prior release tag/previous SHA for main runs while retaining the base branch for PRs.
python3 scripts/release_preflight.py --strict --output release-preflight-report.md
.github/workflows/workflow.yml:152
- This job runs for
pull_request, checks out the PR merge ref, and then executes repository-controlled code while grantingpull-requests: writeandissues: write. A PR can modify the workflow orscripts/release_preflight.pyand use that token to mutate issues/comments or exfiltrate credentials. Keep the untrusted preflight job read-only, and move the bot-comment operation to a separate trusted job/workflow that does not execute PR-controlled code.
permissions:
contents: read
pull-requests: write
issues: write
docs/development/dev.md:282
- The workflow only runs the comment step when
github.event.pull_request.head.repo.full_name == github.repository, so pull requests from forks receive no sticky bot comment. Qualify this statement to same-repository PRs or document the artifact-only behavior for fork PRs.
scripts/release_preflight.py:86 - The new release-preflight helper contains the base-ref resolution, commit classification, report generation, and strict-exit behavior, but no tests exercise it while this repository has an automated unit-test and coverage suite. Add unit tests for PR versus main base refs, unsupported subjects, empty ranges, and strict mode so release CI cannot silently stop auditing commits.
def build_report(base_ref: str, commits: list[Commit]) -> tuple[str, int]:
categorized: dict[str, list[Commit]] = defaultdict(list)
unknown: list[Commit] = []
| needs: release | ||
| if: needs.release.outputs.released == 'true' | ||
| needs: [release, test-pypi-publish] | ||
| if: needs.release.outputs.released == 'true' && needs.test-pypi-publish.result == 'success' |
| @@ -1,13 +1,11 @@ | |||
| # Mother-ML | |||
| # Mother-ML - A ML framework that takes care. | |||
| lines.append("") | ||
|
|
||
| if not commits: | ||
| lines.append("No commits found since the last tag. Release is likely unnecessary.") |
| def resolve_base_ref(base_ref: str) -> str: | ||
| candidates = (f"origin/{base_ref}", base_ref) if base_ref == "main" else (base_ref,) |
This pull request migrates the documentation system from MkDocs to Zensical, reorganizes documentation files, and updates related tooling and configuration throughout the repository. The changes ensure all references, scripts, and workflows point to the new
docs/directory and Zensical configuration, removing MkDocs-specific files and settings.Documentation system migration and reorganization:
mkdocs/to the top-leveldocs/directory, updating all references in scripts, configuration files, and documentation to use the new location. MkDocs configuration and directory are removed, and a newzensical.tomlconfig is introduced at the repo root. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-c785042929d7b216744f869cd6ace6657b73aaf6a5f041da1d096c2b6e34ff04R1-R57),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-9e9229c1e192de639c58ee7f515c8feed844a6571b08deffc39c317be31d05a7L1-L77),[[3]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-6d015afd5ea56e5576b919e19ae25efc518025f2e139e5b3b29a6b1bb79b2218L58-R58),[[4]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-6d015afd5ea56e5576b919e19ae25efc518025f2e139e5b3b29a6b1bb79b2218L262-R262),[[5]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-6d015afd5ea56e5576b919e19ae25efc518025f2e139e5b3b29a6b1bb79b2218L272-R272),[[6]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-b4d68dc855d0f9476d3f2ee343853bd21bf82ea9960d0cf06661baa244439dd6R1),[[7]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-d7711df238953b4a8cb6a9bd6bd8a18264b44d09ad43d0aa4fd56f7c278867b6L1))pyproject.toml,CLAUDE.md, and pre-commit hooks. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L338-R333),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L347-R342),[[3]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7L23-R23),[[4]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9L74-R74))Workflow and automation updates:
docs/structure, renaming jobs and updating artifact paths accordingly. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L226-R227),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L253-R262))Tooling and script adjustments:
docs/directory instead ofmkdocs/docs/. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-c77911b714dff270a83f2ff927f6cf794b0a546303dd8f5e87aa51de7d620000L4-R4),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-c77911b714dff270a83f2ff927f6cf794b0a546303dd8f5e87aa51de7d620000L94-R95))docs/from exclusion and updating hooks to target the new path. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9L2-R2),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9L74-R74))Dependency and changelog configuration:
pyproject.toml, and updated changelog file paths todocs/Changelog.mdthroughout configuration and documentation. ([[1]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L99-L106),[[2]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L273-R268),[[3]](https://github.com/Bayer-Group/MotherML/pull/72/files#diff-9fbf0b053168173524e7b36c20eb53181ba6fcd5ab3152a516511ac2520d9bfcL29-R36))These changes collectively modernize and streamline the documentation workflow, making it easier to maintain and build project docs using Zensical.