Cicd combined#95
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
PR ReviewStrong infrastructure PR overall — the CI/CD direction looks good and the pre-commit/dev-experience improvements are valuable. What looks good
Requested changes
Nits
Overall: good direction, but I’d request the DCO fix and clearer CI/test-coverage expectations before merge. |
| # git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
|
|
||
| # Apply ruff format and lint autofixes across the codebase | ||
| e1a92ceab87dc0ab6517916954a430d16b2da1b6 |
There was a problem hiding this comment.
As we squash the commits this wouldn't work for the current PR, we can either (1) squash the commits as part of the changes so that there is a single commit in this PR, (2) after we merge this PR, open a new PR only for the blame ignore with the squash commit
There was a problem hiding this comment.
@antonpibm In that case, I suggest we split this PR into two parts.
First - only the ruff formatting changes - this one needs to be ignored in git blame.
Second - after we merged the first, merge the CICD work - this should not get ignored by git blame since it is authentic development work, and not a reformat.
we can insert also the git blame ignore revs with the new sha after the first pr merge into the second pr.
Technically it is not complicated to aheieve since the reformat commit was the first commit in this branch, so I can easily split it into two.
If you agree, I will do it.
There was a problem hiding this comment.
@antonpibm - ok done. The ruff reformat changes were applied on PR 102 and this PR now contains only the CICD changes with only a few fixes to make sure all the quality checks added by the CICD pass:
src/
src/granite_switch/__init__.py — the only functional source change.
- What: __version__ = "0.1.0" → read from installed package metadata (importlib.metadata.version), with a "0.0.0+unknown" fallback when running from an uninstalled source tree.
- Why: from commit "reflect package version instead of hard coding a version" — supports the new publish.yaml release workflow so the version has a single source of truth (pyproject) instead of drifting from a hardcoded literal.
src/granite_switch/tutorials/*.py (6 files: __init__.py, chroma_loader.py, rag_display.py, utils/__init__.py, utils/hf_helpers.py, vllm_server.py)
- What: each gains a single top line # SPDX-License-Identifier: Apache-2.0. Nothing else.
- Why: the new check-headers hook/CI job requires every .py to carry the SPDX header; these tutorial files were the only ones missing it, so the gate forced them in.
tests/
tests/composer/test_adapter_loader.py
- What: assert adapters == yaml_adapters → assert sorted(...) == sorted(...), plus an explanatory comment.
- Why: filesystem scan order varies by OS/filesystem; the strict-order assertion was order-dependent and would flake on GitHub runners. Parity here means same set of adapters, not same ordering.
tests/composer/test_save_load_compose.py
- What: adds pytestmark = [pytest.mark.slow, pytest.mark.requires_model].
- Why: the module downloads a base model + RAG adapters and composes a checkpoint — far too heavy for CPU runners. The marks exclude it from CPU CI selection so it runs only on the GPU cluster.
tutorials/ — all pure hygiene, zero content change (verified)
- 8 notebooks (*.ipynb) — nbstripout normalization: source stored as line-lists, metadata/outputs stripped, cell IDs renumbered, trailing newline. I verified the actual cell source is byte-identical to upstream for all 8 — only the JSON serialization format changed.
- 2 sample_run/*.json — trailing newline added by end-of-file-fixer; content confirmed identical modulo whitespace.
- tutorials/README.md — one trailing-space removed.```
There was a problem hiding this comment.
I think this PR is ready for merging
antonpibm
left a comment
There was a problem hiding this comment.
Please see the minor comments
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Ruff loads its config from pyproject.toml, so a malformed pyproject.toml makes ruff abort with a parser error instead of the clean check-toml message. Running check-toml/check-yaml first (with fail_fast) ensures syntax errors are reported by the dedicated validator, consistently between local commits and CI's --all-files run. Signed-off-by: aviv ron <rona@il.ibm.com>
check-added-large-files only inspects staged additions, so on CI's clean checkout (nothing staged) it was a no-op. --enforce-all makes it check all files under pre-commit run --all-files. uv.lock (~2.3 MB) is excluded as an intentionally large lockfile. Signed-off-by: aviv ron <rona@il.ibm.com>
check-merge-conflict returns early unless a merge is in progress, so on CI's clean checkout it was a no-op. --assume-in-merge makes it always scan, letting pre-commit run --all-files catch committed conflict markers. Signed-off-by: aviv ron <rona@il.ibm.com>
…hooks Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
uv lock resolves fine on macOS; only installing the vLLM/CUDA wheels fails. --frozen is for not mutating the lock, not because a re-resolve would fail. Also note the uv-lock pre-commit hook runs locally. Signed-off-by: aviv ron <rona@il.ibm.com>
CI's coverage run executes only tests/unit/, which exercises just the pure-Python config module. Measuring the whole granite_switch package diluted the reported coverage to ~1%, because the hf/vllm/composer/ tutorials subpackages are GPU/model-only and unreachable in CI. Add [tool.coverage.run] omit rules for those subpackages so the CI coverage number reflects the code the unit suite is actually responsible for (now ~96%). Full-project coverage continues to be measured on the GPU cluster. Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
Signed-off-by: aviv ron <rona@il.ibm.com>
….0 MVP - Shorten CLAUDE.md pre-commit section to a brief blurb pointing at the CI/CD reference doc - Rename docs/CICD_PLAN.md -> docs/CICD.md as the living reference; retitle and fix the reference in pyproject.toml - Change CHANGELOG 0.1.0 from Pre-release to MVP Signed-off-by: aviv ron <rona@il.ibm.com>
Fold the DCO / Signed-off-by requirement into GIT_WORKFLOW.md so the sign-off steps live alongside the branching and commit guidance, with a pointer to CICD.md for the full hook and CI setup. Signed-off-by: aviv ron <rona@il.ibm.com>
The rebase's notebook auto-merge left two tutorial notebooks in a state that didn't match the nbstripout hook output. Run the hook to normalize source formatting so pre-commit / CI passes. Signed-off-by: aviv ron <rona@il.ibm.com>
No description provided.