You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently .github/workflows/install_and_test.yml runs on every PR push
(synchronize/opened/reopened), including non-code changes such as .gitignore
or the tasks/ plan churn, wasting a full ~15-minute suite run. Add a `paths`
filter to the `pull_request` trigger so CI runs only when the change can
affect its outcome (library code, tests, dependency metadata, the workflow
and its PySCF config, lint config).
Detailed Plan — #11 Trigger CI only on code changes
Integration branch: agent_settings (stacked on main).
Feature branch: ci_paths_filter (created from the integration branch).
Problem: .github/workflows/install_and_test.yml triggers on every PR push
(synchronize/opened/reopened) regardless of what changed. Non-code
changes — e.g. .gitignore, the tasks/ plan churn removed in 818500b — waste a full ~15-minute suite run per push. The workflow should
run only when a change can affect its outcome.
Reuse analysis
The pull_request trigger lives at the top of the existing workflow; only the on: block needs a paths: filter — no job/step changes.
"Can affect outcome" set, from the workflow's own inputs: the library
(grad_dft/**), the tests (tests/**), dependency metadata it installs
(requirements.txt, setup.py), the workflow itself and the PySCF config
it consumes (PYSCF_CONFIG_FILE=.github/workflows/pyscf_conf.py → .github/**),
and the lint configs (.pylintrc, .pre-commit-config.yaml) that The black/pylint hooks have never been enforced: reformat and add a lint job to CI #7 will
put into CI.
Tests never read data/ or models/, so those are excluded (docs,
notebooks, .gitignore, .opencode/skills/** etc. also skip CI).
No pyproject.toml exists — setup.py + requirements.txt are the only
dependency sources (single source of truth per setup.py:18).
Subtasks
S1: Add a paths filter to the pull_request trigger
Code: in .github/workflows/install_and_test.yml, replace the on: block:
on:
pull_request:
types:
- synchronize
- opened
- reopened# Only run CI when a change can affect its outcome: library code, tests,# dependency metadata, the workflow/config it consumes, or lint config.# Docs/notebooks/plan-file-only changes skip CI.paths:
- 'grad_dft/**'
- 'tests/**'
- 'requirements.txt'
- 'setup.py'
- '.github/**'
- '.pylintrc'
- '.pre-commit-config.yaml'
Notes:
.github/** covers both the workflow file and pyscf_conf.py, so editing
either self-validates.
Whitelist semantics: a PR touching only non-listed paths skips CI entirely
(paths-ignore would risk an empty-list skip on code-only PRs; whitelist is
the requested "only on code changes").
Actions ignore paths for unchanged pushes naturally; the filter is purely
additive to the existing types.
Tests: no pytest surface exists for workflows (CI does not run pre-commit
checks; the file is YAML). Validation instead:
Correct Design: whitelist (paths) rather than paths-ignore, per the
user's "only on code changes" — the listed paths are exactly the workflow's
inputs.
No-tolerance/assertion impact: none — no test code touched.
PR #8 CI is green at `agent_settings` @ a4f1f89.\n\nAdded a `paths` whitelist to the `pull_request` trigger matching exactly the workflow's inputs: `grad_dft/`, `tests/`, `requirements.txt`, `setup.py`, `.github/` (workflow + pyscf_conf.py), `.pylintrc`, `.pre-commit-config.yaml`. Docs/notebooks/plan-file-only PRs now skip CI; the change is self-validating because `.github/` is in the filter.\n\nNote: the first run at a4f1f89 failed on `test_pw92[sol1]` — an `AssertionError: blksize > 0` inside pyscf `pbc/df/fft_ao2mo.py:198` (memory-estimate flake, unrelated to this change; same code was green at f969172 and locally). Rerun of the failed job passed. Proposed as a separate issue.
Activity
Anya497 commentedon Oct 7, 2026
Detailed Plan — #11 Trigger CI only on code changes
Integration branch:
agent_settings(stacked onmain).Feature branch:
ci_paths_filter(created from the integration branch).Problem:
.github/workflows/install_and_test.ymltriggers on every PR push(
synchronize/opened/reopened) regardless of what changed. Non-codechanges — e.g.
.gitignore, thetasks/plan churn removed in818500b— waste a full ~15-minute suite run per push. The workflow shouldrun only when a change can affect its outcome.
Reuse analysis
on:block needs apaths:filter — no job/step changes.(
grad_dft/**), the tests (tests/**), dependency metadata it installs(
requirements.txt,setup.py), the workflow itself and the PySCF configit consumes (
PYSCF_CONFIG_FILE=.github/workflows/pyscf_conf.py→.github/**),and the lint configs (
.pylintrc,.pre-commit-config.yaml) that The black/pylint hooks have never been enforced: reformat and add a lint job to CI #7 willput into CI.
data/ormodels/, so those are excluded (docs,notebooks,
.gitignore,.opencode/skills/**etc. also skip CI).pyproject.tomlexists —setup.py+requirements.txtare the onlydependency sources (single source of truth per
setup.py:18).Subtasks
S1: Add a
pathsfilter to the pull_request triggerCode: in
.github/workflows/install_and_test.yml, replace theon:block:Notes:
.github/**covers both the workflow file andpyscf_conf.py, so editingeither self-validates.
(
paths-ignorewould risk an empty-list skip on code-only PRs; whitelist isthe requested "only on code changes").
pathsfor unchanged pushes naturally; the filter is purelyadditive to the existing
types.Tests: no pytest surface exists for workflows (CI does not run pre-commit
checks; the file is YAML). Validation instead:
python -c "import yaml; yaml.safe_load(...)")..pyfile undergrad_dft/andtests/matches thegrad_dft/**/tests/**globs (no exclusion holes)..github/**is inthe filter) — the filter is self-validating on the PR.
Docs: no user-facing change; the inline comment in the workflow records
the intent (single source of truth = the workflow file).
Quality checks: no duplication (single
on:block); no job logic touched;scope limited to the trigger.
Commit:
(#11-S1): run CI only when the change can affect its outcomeplus a standalone
Closes #11.Acceptance criteria mapping
.gitignore,tasks/, docs, notebooks)pathswhitelist onpull_requestgrad_dft/**,tests/**,requirements.txt,setup.py,.github/**,.pylintrc,.pre-commit-config.yaml.github/**in the filter re-triggers CI on pushon:block editedpathsfilter to thepull_requesttrigger)user-facing surface affected)
pre-commit run --all-filesno-op beyond Python scope)on:block, no duplication, no job changes)Design Notes
paths) rather thanpaths-ignore, per theuser's "only on code changes" — the listed paths are exactly the workflow's
inputs.
(#11-S1): run CI only when the change can affect its outcome
Anya497 commentedon Oct 7, 2026
PR #8 CI is green at `agent_settings` @ a4f1f89.\n\nAdded a `paths` whitelist to the `pull_request` trigger matching exactly the workflow's inputs: `grad_dft/`, `tests/`, `requirements.txt`, `setup.py`, `.github/` (workflow + pyscf_conf.py), `.pylintrc`, `.pre-commit-config.yaml`. Docs/notebooks/plan-file-only PRs now skip CI; the change is self-validating because `.github/` is in the filter.\n\nNote: the first run at a4f1f89 failed on `test_pw92[sol1]` — an `AssertionError: blksize > 0` inside pyscf `pbc/df/fft_ao2mo.py:198` (memory-estimate flake, unrelated to this change; same code was green at f969172 and locally). Rerun of the failed job passed. Proposed as a separate issue.
Agent settings. Tests fixes (#8)