Skip to content

ci: read pyscn report keys in either spelling - #416

Draft
thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:ci/pyscn-report-key-tolerance
Draft

ci: read pyscn report keys in either spelling#416
thodson-usgs wants to merge 1 commit into
DOI-USGS:mainfrom
thodson-usgs:ci/pyscn-report-key-tolerance

Conversation

@thodson-usgs

Copy link
Copy Markdown
Collaborator

Summary

pyscn 1.30.0 renamed the analyze report keys from CamelCase to snake_case. The
project-root sanity check in code-health.yml reads them by their 1.29.x
spelling, so any pin bump past 1.29.x would raise KeyError and take out the one
guard that distinguishes a degraded run (few imports resolved, artificially
higher score) from a genuinely improved one.

  • Read either spelling, and if a future report shape matches neither, say so
    plainly and point at the fix (update the check against the pinned version)
    rather than dying on a KeyError.
  • Record why the two pyscn analyze invocations stand: passing --json and
    --html together exits 1 with "only one output format flag can be specified"
    after running the analysis, so a combined run pays for the work and writes no
    report. Still true in 1.30.1.

Verification

Checked the report shape against pyscn 1.29.0 (CamelCase) and 1.30.1
(snake_case); the check reads both. Workflow-only change — no package code, so
the test/type/structure gates are unaffected.

pyscn 1.30.0 renamed the analyze report keys from CamelCase to snake_case,
so the project-root sanity check would raise KeyError on any pin bump past
1.29.x -- losing the one guard that tells a degraded run (few imports
resolved, higher score) from an improved one. Read either spelling, and say
so plainly if a future shape matches neither.

Also record why the two pyscn invocations stand: passing --json and --html
together exits 1 with 'only one output format flag can be specified' after
running the analysis, so a combined run costs the work and writes nothing.
Verified against pyscn 1.29.0 and 1.30.1.
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