Move the documentation site to CTRLRun/ctrlrun-docs - #133
Conversation
A clone of this repository was 529 files and more than half of them were the website:
163 pages, the Mintlify configuration, the renderers, the browser demos and the Vercel
function behind the site's form. The sdist carried them too, video included. They are
CTRLRun/ctrlrun-docs now, with their history; this repository keeps the library, its
specifications, its README assets and its tests. 529 files becomes 291, and the sdist
2.9M becomes 1.4M.
`pip install ctrlrun` is unchanged: pyyaml and click, and nothing else. `griffe` leaves
the dev extra with the reference generator that needed it.
What did not move is the guarantee that a page describes the shipped library. Every check
that needs both trees runs in the other repository, which resolves a checkout of this one
from $CTRLRUN_SOURCE and **raises** when there is none, and this repository's CI runs those
checks from there against the commit being proposed -- the `docs` job. So a change here
that makes a page wrong is red on this repository's own pull request, and there is still
one implementation of every rule rather than two that drift.
Five test files were split rather than moved, each along a line that was already there:
- `test_cookbook.py` keeps the three tests that only run `examples/cookbook/`;
- `test_packaging.py` keeps the dependency rule and loses four tests that read a page;
- `test_release_v0_6.py` keeps T181, the packaging half, and T180 goes where it can read
all five documents it scans;
- `test_verify_action.py` keeps the composite action's twenty-seven tests;
- `test_readme_assets.py` keeps what this repository ships and loses the comparison with
the site's copies of it.
**Four of those tests had begun skipping rather than failing** once the pages moved: each
guarded its read with `pytest.skip("no repository checkout")`, written for an sdist where
the pages are pruned, which after the move read as "nothing to check". They fail on a
missing page now, in the repository that has one. The suite's skip count and every skip
reason are back to exactly what they were before this change.
The test-count badge is written in the `docs` job, which `needs: check` -- a stronger
ordering than the two steps in one job it replaces, because a step's order is a convention
and `needs:` is enforced.
`notify-docs` needs a DOCS_DISPATCH_TOKEN secret to tell the other repository that the
library changed. Until it is set the step warns and does nothing, and the backstop is that
repository's weekly scheduled run.
The network guard that `test_examples.py` and `test_cookbook.py` had each written for
themselves is one definition in `tests/conftest.py` now.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Important Review skippedToo many files! This PR contains 295 files, which is 195 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (295)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A clone of this repository was 529 files and more than half of them were the website: 163
pages, the Mintlify configuration, the renderers, the browser demos and the Vercel function
behind the site's form. The sdist carried them too, video included.
They are CTRLRun/ctrlrun-docs now, with their
history. This repository keeps the library, its specifications, its README assets and its
tests.
docs/pip install ctrlrunWhat did not move
The guarantee that a page describes the shipped library. Every check that needs both trees
runs in the other repository, which resolves a checkout of this one from
$CTRLRUN_SOURCEor
../ctrlrunand raises when there is none — a check that cannot find the code is ared run, never a green one that verified nothing. This repository's CI runs those checks
from there against the commit being proposed, so a change here that makes a page wrong is
red on its own pull request, and there is one implementation of every rule rather than two
that drift.
Five test files split rather than moved
Each along a line that was already there:
test_cookbook.pyexamples/cookbook/test_packaging.pyCLAIMS.mdoradapters.mdtest_release_v0_6.pytest_verify_action.pyverify.mdtest_readme_assets.pyFour of those tests had begun skipping rather than failing once the pages moved: each
guarded its read with
pytest.skip("no repository checkout"), written for an sdist where thepages are pruned, which after the move read as "nothing to check". They fail on a missing page
now, in the repository that has one. The suite's skip count and every skip reason are back to
exactly what they were before this change: 47, all Postgres or an uninstalled adapter.
Other changes
docsjob, whichneeds: check. That is a strongerordering than the two steps in one job it replaces: a step's order is a convention,
needs:is enforced.
badgegaineddocsas an upstream because that is where the artifact isproduced now.
notify-docstells the other repository the library changed. It needs aDOCS_DISPATCH_TOKENsecret; until that is set the step warns and does nothing, and thebackstop is that repository's weekly scheduled run.
griffeleaves the dev extra with the reference generator that needed it.test_examples.pyandtest_cookbook.pyhad each written forthemselves is one definition in
tests/conftest.py.Verification
Both suites run from a fresh clone, not the working tree:
ruff format --check,ruff check,mypy --strict srcclean../ctrlrunfound by the sibling default.mdx, nodocs/docs/, nodocs_audit, nowebsite-formctrlrun verifystill reports 11/11 and 6/6 with 5 N/Actrlrun demoruns in 0.1s with no networkOne thing this cannot do
The Mintlify content directory is still
/docsin this repository. It has to be repointed atthe other repository's root, once, in the Mintlify dashboard, or the site keeps building from
a directory with no pages left in it.