feat: add tutorial expand, opcli-minimal backend, spread jobs --exclude#52
Open
javierdelapuente wants to merge 2 commits into
Open
feat: add tutorial expand, opcli-minimal backend, spread jobs --exclude#52javierdelapuente wants to merge 2 commits into
javierdelapuente wants to merge 2 commits into
Conversation
…jobs --exclude filter - Add `opcli tutorial expand` command that extracts shell commands from Markdown and RST tutorial files (ported from operator-ci-poc) - Add `opcli-minimal` virtual backend type for lightweight spread setups that only need opcli (no concierge/Juju); local prepare installs uv+opcli, CI prepare is empty - Add `--exclude` option to `opcli spread jobs` for fnmatch-based filtering of jobs by raw spread selector string (e.g. `--exclude 'my-docs-ci:*'`) - Add tests for all new functionality (test_tutorial.py, TestOpcliMinimalBackend, TestSpreadJobsExclude in test_spread.py) - Update AGENTS.md and docs/ISD283.md Closes #12 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix RST code-block extractor: handle internal blank lines and skip directive option lines (:caption:, :linenos:, etc.) that were previously emitted as shell commands - Add _parse_rst_code_block_body helper (reduces complexity, fixes bugs) - Fix error messages to report line numbers instead of byte offsets - Add no_args_is_help=True to tutorial command group - Fix tutorial group help text (remove incorrect 'and run') - Expand 'opcli tutorial expand --help' docstring with marker syntax docs - Fix 'spread jobs' docstring: 'JSON array' -> 'GitHub Actions matrix object' - Improve --exclude help text with selector format example - Use fnmatch.fnmatchcase for deterministic case-sensitive selector matching - Fix ISD283.md: document real Markdown SPREAD syntax (no '<!-- SPREAD END -->') - Add 3 new RST tests: internal blank lines, directive options Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #12.
Changes
opcli tutorial expand— New command that extracts shell commands from Markdown (.md) and RST (.rst) tutorial files and prints them to stdout as a shell script. Typical usage in atask.yaml:opcli-minimalvirtual backend type — A lightweight virtual backend forspread.yamlthat installs only uv + opcli (no concierge, no Juju). Users write their owntask.yaml. In CI the prepare script is empty since the workflow installs opcli before spread runs. Coexists withintegration-test.opcli spread jobs --exclude— Repeatable flag that filters jobs from the output matrix using fnmatch glob patterns matched against raw spread selector strings (e.g.--exclude 'my-docs-ci:*').Tests
tests/unit/test_tutorial.pytests/unit/test_spread.py(TestOpcliMinimalBackend,TestSpreadJobsExclude)Closes #12