Skip to content

⬆️ chore(deps): upgrade all dependencies to latest versions - #1

Merged
luiscosio merged 2 commits into
mainfrom
chore/upgrade-deps
Jul 20, 2026
Merged

⬆️ chore(deps): upgrade all dependencies to latest versions#1
luiscosio merged 2 commits into
mainfrom
chore/upgrade-deps

Conversation

@luiscosio

@luiscosio luiscosio commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Proactive "update everything" pass. No open Dependabot alerts; this is hygiene, not a security fix.

Dependency changes

Package Before After Notes
PyMuPDF >=1.23.0 >=1.28.0 Resolves to 1.28.0 (bundles MuPDF 1.29.0)

PyMuPDF is the repo's only dependency and it has no transitive dependencies, so this is the complete upgrade surface. Kept the existing >= style rather than converting to a == pin, since the file was not previously pinned.

Code changes required

None. The extractors touch a small and stable slice of the API — fitz.open, page.get_text, page.find_tables, page.number, doc.close, and Document indexing/slicing. All behave identically on 1.28, and the legacy import fitz alias still resolves.

Also added .venv to .gitignore so the local uv environment can't be committed.

Verification

No automated test suite exists in this repo (CLAUDE.md states this explicitly: "No automated tests exist"), and there are no GitHub Actions workflows. So instead of a test run, the upgrade was verified end-to-end against the real PDFs, with the regenerated JSON diffed against the JSON already committed to the repo. That is the strongest available signal: it proves 1.28.0 produces bit-for-bit identical extraction output.

$ uv venv && uv pip install -r requirements.txt
+ pymupdf==1.28.0

$ python -c "import fitz, pymupdf; print(pymupdf.__version__)"
fitz alias OK — PyMuPDF 1.28.0: Python bindings for the MuPDF 1.29.0 library
1.28.0

# Full re-extraction from source PDFs
$ python cnssi_1253/extract_cnssi_1253.py cnssi_1253/CNSSI_1253_2022.pdf
Total controls extracted: 1189                              PASS

$ python classified_information/extract_classified_information.py \
      classified_information/classified_information_overlay_2022.pdf
Saved controls to extracted_classified_information.json      PASS

# Output compared against the committed JSON
$ diff regenerated/extracted_cnssi_1253.json cnssi_1253/extracted_cnssi_1253.json
IDENTICAL                                                    PASS
$ diff regenerated/extracted_classified_information.json \
       classified_information/extracted_classified_information.json
IDENTICAL                                                    PASS

# Other entry points
$ python nist_catalog/nist_sorter.py nist_sp_800-53_control_catalog.json out.json
"All controls were already in correct order."                PASS
$ python cnssi_1253/extract_cnssi_1253.py <pdf> --debug-page 30
found 12 controls on page 30 (exercises find_tables)         PASS

# Superseded extractors (still fitz-based)
cnssi_1253_overlay_extractor.py                              PASS
cnssi_1253_selection_extractor.py                            PASS
classified_information_overlay_extractor.py                  PASS

# All 11 Python files
py_compile: 11/11 OK
import check: 11/11 OK

Pinned back / skipped / left broken

Nothing. No package needed to be held back and nothing is left failing.


Follow-up commit: standardize on Python 3.13

Second commit on this branch (⬆️ chore: standardize on Python 3.13), part of the org-wide move to a single Python version. 3.13 rather than 3.14 because whisperx in a sibling repo caps at <3.14.

Changes

File Change
.python-version New. Contains 3.13.
README.md Extraction section now states Python 3.13 and uses uv venv --python 3.13 + uv pip install -r requirements.txt instead of bare pip install PyMuPDF; run commands use uv run python. Dependencies table: Python 3Python 3.13.
CLAUDE.md Same 3.13 + uv treatment for the development commands, plus a note on the extractors' write-to-CWD behavior.

No requires-python change — this repo has requirements.txt only, no pyproject.toml, so there is nothing to bump and none was invented.

No .py files were modified by this commit. The version standardization is config and docs only.

Verification

Same approach as the dependency commit above, re-run on 3.13. Extractor scripts write to the current working directory with hardcoded filenames, so every regeneration was run from a scratch directory and diffed against the committed JSON, leaving the repo copies untouched.

$ uv venv --python 3.13
Using CPython 3.13.11
$ uv pip install -r requirements.txt
+ pymupdf==1.28.0                                            PASS
$ python -V && python -c "import fitz"
Python 3.13.11
PyMuPDF 1.28.0 / MuPDF 1.29.0, Python 3.13 on darwin          PASS

# .python-version is actually honored (no --python flag passed)
$ rm -rf .venv && uv venv
Using CPython 3.13.11                                         PASS

# Re-extraction from source PDFs, run from a scratch dir
$ python .../cnssi_1253/extract_cnssi_1253.py .../CNSSI_1253_2022.pdf
Total controls extracted: 1189                                PASS
$ python .../classified_information/extract_classified_information.py \
      .../classified_information_overlay_2022.pdf
extracted_classified_information.json written                 PASS

# Diffed against the committed JSON — the load-bearing check
$ diff scratch/extracted_cnssi_1253.json cnssi_1253/extracted_cnssi_1253.json
IDENTICAL                                                     PASS
$ diff scratch/extracted_classified_information.json \
       classified_information/extracted_classified_information.json
IDENTICAL                                                     PASS

# sha256 cross-check of the same four files
9d070c3e…618c07  scratch/extracted_cnssi_1253.json
9d070c3e…618c07  cnssi_1253/extracted_cnssi_1253.json
067e4d95…50050f  scratch/extracted_classified_information.json
067e4d95…50050f  classified_information/extracted_classified_information.json
                                                              PASS

$ python nist_catalog/nist_sorter.py nist_sp_800-53_control_catalog.json scratch/out.json
1189 controls across 20 families
"All controls were already in correct order."                 PASS

# All tracked Python files on 3.13
$ python -m compileall $(git ls-files '*.py')
11/11 compiled OK                                             PASS
import check (3 active extractors/sorter): 3/3 OK             PASS

$ git status --porcelain   # committed JSON never overwritten
(clean)                                                       PASS

Both JSON diffs were byte-identical, confirmed independently by diff and by sha256. Python 3.13 changes nothing about extraction output.

Not run

There is no test suite in this repo (CLAUDE.md: "No automated tests exist") and no CI — no .github/ directory and no workflow files exist. So no tests and no pipeline were run, because there are none to run. The extraction diff above is the substitute signal.

Pinned back / skipped / left broken

Nothing. One deliberate non-change: README.md still shows python -m http.server 8000 for serving the static site locally. That is a generic static file server for index.html, unrelated to the extraction toolchain and to any pinned version, so it was left alone.

PyMuPDF >=1.23.0 -> >=1.28.0 (resolves to 1.28.0, MuPDF 1.29.0).
This is the only runtime dependency; there are no transitive deps.

No code changes were required. The extractors use a small, stable slice
of the API (fitz.open, page.get_text, page.find_tables, page.number,
doc.close, Document indexing/slicing), all unchanged across 1.23 -> 1.28.
The `import fitz` alias still works on 1.28.

Verified by re-running both PDF extractors against the committed source
PDFs and diffing the output: extracted_cnssi_1253.json (1189 controls)
and extracted_classified_information.json are byte-identical to the
JSON already in the repo.

Also gitignores .venv so the local uv environment is never committed.
Org-wide standardization on Python 3.13 (3.13 rather than 3.14 because
whisperx in a sibling repo caps at <3.14).

- Add .python-version pinning 3.13
- README + CLAUDE.md: document 3.13 and switch setup/run commands to uv
- Note the extractors' write-to-CWD behavior so verification runs don't
  clobber the committed JSON

No pyproject.toml exists here, so there is no requires-python to change.

Verified on 3.13: PyMuPDF 1.28.0 resolves; both extractors regenerate
output byte-identical to the committed JSON (diff clean, sha256 match);
nist_sorter reports ordering already correct; all 11 tracked .py files
compile. No test suite and no CI exist in this repo.
@luiscosio
luiscosio merged commit c39a0d6 into main Jul 20, 2026
2 checks passed
@luiscosio
luiscosio deleted the chore/upgrade-deps branch July 20, 2026 02:14
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.

1 participant