Repository navigation
ci: prepare manual pre-alpha PyPI publishing - #17
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
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.
Prepare
mlbundle 0.1.0a1for the first explicitly owner-requested PyPI upload to reserve the name. Publishing remains manual, restricted tomain, and gated by the existingpypi_envenvironment and itsUlloaSPapproval. This PR does not publish, trigger a publish run, create a tag/release, or change repository settings.publish.ymlhas two jobs: reusable CI and upload. CI builds one immutable wheel/sdist artifact, checks metadata/README with strict Twine validation, checks archive contents and identical package bytes, runs isolated base-wheel smoke checks, and installs that exact wheel for the full Ubuntu/Windows test suites. Lint/types also gate the reusable workflow's completion. Upload only downloads those same files; it never rebuilds. Only upload hasid-token: write, with OIDC andpypa/gh-action-pypi-publish@release/v1; no token or secret is added. A single concurrency group prevents overlapping publish runs. Read-only GitHub API checks confirmpypi_envrequires reviewerUlloaSPand permits branchmainonly.The version and lockfile, package version assertions and deterministic ZIP expectations are updated. README links and the Documentation project URL now target
main, installation uses--pre, and README/SECURITY clearly disclose the unfinished format and lack of independent security review. The narrowly revised publishing rule stays in the 300-line root AGENTS.md. Owner instructions live indocs/publishing.md.Publishing happens only on the owner's explicit request for that specific version. The owner, or an agent on that explicit request, runs the workflow. Agents never run or approve it on their own initiative or add another publish path, token or secret. No GitHub releases or version tags are created; tags still means GitHub repository topics.
Publishing steps for the owner, or an agent on the owner's explicit request:
develop, integrate this change intomainthrough the usual reviewed process.mlbundle, ownerUlloaSP, repositorymlbundle, workflowpublish.yml, environmentpypi_env. Confirmpypi_envstill requiresUlloaSPand permits onlymain.main, and run it once.distributionswheel/sdist artifact, then arrange the explicitly authorizedpypi_envapproval.0.1.0a1PyPI files and install on Python 3.14 withpython -m pip install --pre "mlbundle[sklearn]".Local verification (Python 3.14.7 / uv 0.12.19):
uv sync: lock regenerated; version changed from0.1.0to0.1.0a1without dependency changes.uv run ruff check .:All checks passed!;uv run ruff format --check .:166 files already formatted.uv run pyright:0 errors, 0 warnings, 0 informations.uv run pytest:1476 passed in 93.33s; branch-inclusive coverage91.88%(80% required). Ran against the installed built wheel with sync disabled; an external pytest plugin changed the test process's working directory to temp before collection, keeping CatBoost writes outside the checkout.--no-syncand--cov-config=C:/software/mlbundle/pyproject.toml:1476 passed in 88.50s, branch-inclusive91.88%;Required test coverage of 80.0% reached.7 passed in 5.80s.111 passed in 0.86s; includes non-main refs, existing versions, HTTP failures, network/timeout failures, and old/pre-release writer versions.uv build: wheel and source archive built successfully;uvx twine check --strict dist/*: bothPASSED.uv run python scripts/package_smoke.py create <temp>/smoke.mlbundle: sklearn export/load/predict and composite fixtureOK;contents dist: type marker/catalog/license present, package bytes match, no tests/caches/CatBoost output/work artifacts.base wheel: import/help/inspect OK; optional libraries absent; composite inspect and bounded missing dependencyOK;mlbundle.__version__prints0.1.0a1; CLI inspect ofC:/software/models/best_BP_SHAP.mlbundleexits 0 with claims explicitly unverified.best_BP_SHAP.mlbundleandbest_BP_SHAP.onnx.mlbundle, both written by0.1.0; source SHA-256 values unchanged. CatBoost runs from temp.142656bytes; sdist111528bytes, 99 archive entries each. Both metadata records show0.1.0a1,Requires-Python: >=3.14, MIT license, all six extras and the four expected project URLs. Both include LICENSE and py.typed; archive inventories were inspected.actionlint 1.7.12in an external temp folder: both workflows pass with exit 0 and no diagnostics.pypienvironment references, no relative README links. All source/test/document/workflow/TOML files are at most 300 lines; AGENTS.md 300, README.md 297, SECURITY.md 280.Not verified: actual PyPI/OIDC upload and the owner's approval gate, which require the later explicitly owner-requested workflow. Only two
C:/software/models/*.mlbundlefiles exist, so the third file mentioned in the original brief could not be checked. No validator change was needed: writer versions are compared within each bundle, not against the installed reader.Latest PR CI passed for commit
f7386ea38706fa61ffb3433b80e362e9a035b53a: run 38375627342. Ubuntu:1476 passed in 92.09s; Windows:1476 passed in 125.24s. Both measured branch-inclusive91.88%and printedRequired test coverage of 80.0% reached. Build, lint, types, strict Twine checks and both clean base-wheel smoke checks passed. The test command explicitly reads the coverage configuration while running from temp, preserving branch measurement and the 80% minimum. The PR remains unmerged.