Skip to content

Cicd combined#95

Open
aviv1ron1 wants to merge 27 commits into
generative-computing:mainfrom
aviv1ron1:cicd-combined
Open

Cicd combined#95
aviv1ron1 wants to merge 27 commits into
generative-computing:mainfrom
aviv1ron1:cicd-combined

Conversation

@aviv1ron1

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov-commenter

Copy link
Copy Markdown

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 ☂️

@njs2017

njs2017 commented Jul 15, 2026

Copy link
Copy Markdown

PR Review

Strong infrastructure PR overall — the CI/CD direction looks good and the pre-commit/dev-experience improvements are valuable.

What looks good

  • Clear workflow split across CI, DCO, GPU tests, and publish
  • Good use of uv and caching
  • Nice contributor-experience improvements in CONTRIBUTING.md, CHANGELOG.md, and Makefile targets
  • README link fixes and .git-blame-ignore-revs are good cleanup

Requested changes

  1. DCO sign-offs
    The PR appears to include commits without DCO sign-off, so the DCO workflow will fail. Please re-sign the branch, e.g.:

    git rebase --signoff origin/main
  2. CI coverage gaps
    tests/composer/ and tests/hf/ are excluded from CPU CI, and GPU tests are manual-only. Please document the intended coverage model clearly in the PR / docs so reviewers know which paths are protected automatically vs manually.

  3. Custom hook maintenance
    .pre-commit/validate_links.py adds a fair amount of custom validation logic. It would help to add at least basic tests for:

    • ci/check_headers.py
    • ci/add_signoff.py
    • ci/check_dco.py
    • ideally the link/import validator too

Nits

  • There is some purely cosmetic churn (newline-only changes like .github/CODEOWNERS, .gitignore)
  • A few workflow commands differ in their use of --frozen; worth making that consistent where possible

Overall: good direction, but I’d request the DCO fix and clearer CI/test-coverage expectations before merge.

@aviv1ron1
aviv1ron1 marked this pull request as ready for review July 16, 2026 11:05
Comment thread CLAUDE.md
Comment thread docs/CICD_PLAN.md Outdated
Comment thread CLAUDE.md
Comment thread .git-blame-ignore-revs Outdated
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# Apply ruff format and lint autofixes across the codebase
e1a92ceab87dc0ab6517916954a430d16b2da1b6

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.```

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is ready for merging

Comment thread CHANGELOG.md Outdated

@antonpibm antonpibm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the minor comments

aviv1ron1 added 18 commits July 21, 2026 14:41
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants