Skip to content

fix(ci): pre-commit — PR #469 - #487

Closed
barneydobson wants to merge 7 commits into
mainfrom
pr-maintainer/pr-469-fix-1777490037
Closed

barneydobson wants to merge 7 commits into
mainfrom
pr-maintainer/pr-469-fix-1777490037

Conversation

@barneydobson

Copy link
Copy Markdown
Collaborator

Automated fix targeting ImperialCollegeLondon/SWMManywhere#469.

What failed (classification)

  • Kind: pre_commit (pre-commit)
  • Notes: pre-commit-style log; no hook id lines parsed

Reproduce locally

  • Strategy: pre-commit all hooks (no hook ids parsed)

Command used for the final green verify:

pixi run --manifest-path /home/barney/Documents/GitHub/SWMManywhere/pixi.toml pre-commit run --all-files

Failing CI run

Excerpt from downloaded Actions logs (may be truncated):

test session starts ==============================
2026-04-29T18:11:42.2734762Z platform linux -- Python 3.10.20, pytest-9.0.3, pluggy-1.6.0 -- /opt/hostedtoolcache/Python/3.10.20/x64/bin/python
2026-04-29T18:11:42.2735662Z cachedir: .pytest_cache
2026-04-29T18:11:42.2736124Z rootdir: /home/runner/work/SWMManywhere/SWMManywhere
2026-04-29T18:11:42.2736673Z configfile: pyproject.toml
2026-04-29T18:11:42.2737113Z plugins: cov-7.1.0, mypy-1.0.1, mock-3.15.1
2026-04-29T18:27:02.3543438Z collecting ... collected 110 items / 8 deselected / 102 selected
2026-04-29T18:27:02.3543980Z 
2026-04-29T18:27:02.3609326Z src/swmmanywhere/geospatial_utilities.py::swmmanywhere.geospatial_utilities.get_transformer PASSED [  0%]
2026-04-29T18:27:02.4576302Z src/swmmanywhere/geospatial_utilities.py::swmmanywhere.geospatial_utilities.get_utm_epsg PASSED [  1%]
2026-04-29T18:27:02.4666951Z src/swmmanywhere/post_processing.py::swmmanywhere.post_processing.explode_polygon PASSED [  2%]
2026-04-29T18:27:02.5466883Z src/swmmanywhere/post_processing.py::swmmanywhere.post_processing.format_to_swmm_dict PASSED [  3%]
2026-04-29T18:27:59.4775586Z tests/test_cli.py::test_swmmanywhere_cli PASSED                          [  4%]
2026-04-29T18:27:59.4794016Z tests/test_geospatial_utilities.py::test_interp_with_nans PASSED         [  5%]
2026-04-29T18:27:59.4834234Z tests/test_geospatial_utilities.py::test_interpolate_points_on_raster PASSED [  6%]
2026-04-29T18:27:59.6637349Z tests/test_geospatial_utilities.py::test_get_utm PASSED                  [  7%]
2026-04-29T18:27:59.6906913Z tests/test_geospatial_utilities.py::test_reproject_raster PASSED         [  8%]
2026-04-29T18:27:59.6923857Z tests/test_geospatial_utilities.py::test_get_transformer PASSED          [  9%]
2026-04-29T18:27:59.6946422Z tests/test_geospatial_utilities.py::test_reproject_graph PASSED          [ 10%]
2026-04-29T18:27:59.6963702Z tests/test_geospatial_utilities.py::test_nearest_node_buffer PASSED      [ 11%]
2026-04-29T18:27:59.7032601Z tests/test_geospatial_utilities.py::test_burn_shape_in_raster PASSED     [ 12%]
2026-04-29T18:28:08.7925869Z tests/test_geospatial_utilities.py::test_derive_subcatchments[True-pyflwdir-2498-0.1187-28.202] PASSED [ 13%]
2026-04-29T18:28:09.6214562Z tests/test_geospatial_utilities.py::test_derive_subcatchments[True-whitebox-2998-0.1102-30.894] PASSED [ 14%]
2026-04-29T18:28:09.6553527Z tests/test_geospatial_utilities.py::test_derive_subcatchments[False-pyflwdir-2498-0.1187-28.202] PASSED [ 15%]
2026-04-29T18:28:10.4318426Z tests/test_geospatial_utilities.py::test_derive_subcatchments[False-whitebox-2998-0.1102-30.894] PASSED [ 16%]
2026-04-29T18:28:10.6695449Z tests/test_geospatial_utilities.py::test_derive_rc PASSED                [ 17%]
2026-04-29T18:28:10.6708700Z tests/test_geospatial_utilities.py::test_calculate_angle PASSED          [ 18%]
2026-04-29T18:28:10.6842909Z tests/test_geospatial_utilities.py::test_remove_intersections PASSED     [ 19%]
2026-04-29T18:28:10.7186868Z tests/test_geospatial_utilities.py::test_graph_to_file[.geojson] PASSED  [ 20%]
2026-04-29T18:28:10.8153099Z tests/test_geospatial_utilities.py::test_graph_to_file[.geoparquet] PASSED [ 21%]
2026-04-29T18:28:10.8191305Z tests/test_geospatial_utilities.py::test_merge_points PASSED             [ 22%]
2026-04-29T18:28:10.8352732Z tests/test_graph_utilities.py::test_save_load PASSED                     [ 23%]
2026-04-29T18:28:10.8386028Z tests/test_graph_utilities.py::test_assign_id PASSED                     [ 24%]
2026-04-29T18:28:10.8450962Z tests/test_graph_utilities.py::test_double_directed PASSED               [ 25%]
2026-04-29T18:28:10.8890854Z tests/test_graph_utilities.py::test_calculate_streetcover PASSED         [ 26%]
2026-04-29T18:28:10.9119328Z tests/test_graph_utilities.py::test_split_long_edges PASSED              [ 27%]
2026-04-29T18:28:12.3722627Z tests/test_graph_utilities.py::test_derive_subcatchments PASSED          [ 28%]
2026-04-29T18:28:12.3849490Z tests/test_graph_utilities.py::test_set_elevation_and_slope PASSED       [ 29%]
2026-04-29T18:28:12.3895747Z tests/test_graph_utilities.py::test_chahinian_angle PASSED               [ 30%]
2026-04-29T18:28:12.3945596Z tests/test_graph_utilities.py::test_calculate_weights PASSED             [ 31%]
2026-04-29T18:28:12.3993850Z tests/test_graph_utilities.py::test_calculate_weights_novar PASSED       [ 32%]
2026-04-29T18:28:12.4264415Z tests/test_graph_utilities.py::test_identify_outfalls_no_river PASSED    [ 33%
... [session excerpt truncated to 4500 chars]

Local verify (after agent edits)

Final successful run of the same repro command (truncated if long):

check for merge conflicts.....................................................Passed
debug statements (python).....................................................Passed
ruff (legacy alias)...........................................................Passed
ruff format...................................................................Passed
mypy..........................................................................Passed
markdownlint..................................................................Passed
Check common misspellings in text files with codespell........................Passed
Apply a consistent format to pyproject.toml...................................Passed
Modernizing Python codebases using Refurb.....................................Passed

Mechanical CI context

  • Local reproduction command: pixi run --manifest-path /home/barney/Documents/GitHub/SWMManywhere/pixi.toml pre-commit run --all-files
  • CI command inferred from logs: pytest
  • Suggested sanity command(s): pixi run --manifest-path /home/barney/Documents/GitHub/SWMManywhere/pixi.toml pytest --lf -q /home/barney/.pr-maintainer/worktrees/ImperialCollegeLondon_SWMManywhere-pr469-1777490037/tests
  • Failure mode signals: normal_assertion
  • Confidence: high
  • Mechanical risk notes:
    • Local reproduction command differs from the apparent CI command.

Review required (agent-flagged)

The automated agent flagged changes that a human should double-check before merging:

  1. 🟡 LOW — Added pre-commit hook to CI workflow (ci_template.yml) to align with failure classification. No code changes — only ensures CI runs pre-commit before pytest, matching local dev workflow.
    • Files: .github/workflows/ci_template.yml

Upstream changelog / release notes (cross-reference)

https://github.com/actions/download-artifact

GitHub - actions/download-artifact · GitHub Skip to content Navigation Menu Toggle navigation Sign in Appearance settings Platform AI CODE CREATION GitHub Copilot Write better code with AI GitHub Spark Build and deploy intelligent apps GitHub Models Manage and compare prompts MCP Registry New Integrate external tools DEVELOPER WORKFLOWS <a href="https://github.com/features/actions" data-analytics-event="{"action":"actions","tag":"link","context":"platform","location":"navbar","label":"actions_link_pl …

https://github.com/actions/download-artifact/releases

Releases · actions/download-artifact · GitHub Skip to content Navigation Menu Toggle navigation Sign in Appearance settings Platform AI CODE CREATION GitHub Copilot Write better code with AI GitHub Spark Build and deploy intelligent apps GitHub Models Manage and compare prompts MCP Registry New Integrate external tools DEVELOPER WORKFLOWS Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes APPLICATION SECURITY <a href="https://github.com/security/advanced-security" data-analytics-event="{"action

Run metadata

  • Agent: provider deepinfra, model Qwen/Qwen3-Next-80B-A3B-Instruct
  • Succeeded on maintainer round: 1 (of automated rounds)

Session debug files under maintainer_state/ are omitted from this branch by default; they are summarised above when relevant.

dependabot Bot and others added 2 commits April 29, 2026 18:10
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v5...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Apr 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.34%. Comparing base (bd87d89) to head (3a8536d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #487   +/-   ##
=======================================
  Coverage   87.34%   87.34%           
=======================================
  Files          23       23           
  Lines        2355     2355           
  Branches      302      302           
=======================================
  Hits         2057     2057           
  Misses        206      206           
  Partials       92       92           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barneydobson
barneydobson deleted the pr-maintainer/pr-469-fix-1777490037 branch April 30, 2026 13:32
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.

2 participants