Skip to content

ci: 💚 refactor ci/cd#10

Merged
amd989 merged 4 commits intomasterfrom
hotfix/cicd
Mar 26, 2026
Merged

ci: 💚 refactor ci/cd#10
amd989 merged 4 commits intomasterfrom
hotfix/cicd

Conversation

@amd989
Copy link
Copy Markdown
Owner

@amd989 amd989 commented Mar 26, 2026

Summary

  • Upgrade Python version matrix from 3.8–3.10 to 3.11–3.13 and bump all backend dependencies to compatible versions
  • Fix all static analysis issues: 0 flake8 errors, 0 black reformats, 0 pyre type errors, 69/69 tests passing
  • Add pyre type stubs for typedstruct, png, toml, and rewrite serial stubs for self-contained resolution

Details

Python version & dependency upgrades

All pinned dependencies have been bumped to current releases with flexible version ranges:

Package Before After
python ^3.11 (CI: 3.8/3.9/3.10) ^3.11 (CI: 3.11/3.12/3.13)
flask ^2.3.0 ^3.0
flask-caching 1.10.1 ^2.1
Flask-WTF ^1.1.0 ^1.2
waitress 2.1.1 ^3.0
whitenoise 6.0.0 ^6.5
pyre-extensions 0.0.27 ^0.0.29
black 22.3.0 ^24.0
flake8 4.0.1 ^7.0
freezegun 1.2.1 ^1.4
green 3.4.1 ^4.0
pyfakefs 4.5.6 ^5.3
pyre-check 0.9.10 0.9.25

Removed python-language-server (unmaintained, not needed).

pyre type checking (159 → 0 errors)

  • Rewrote .pyre_configuration to use site-package search paths for all third-party deps and exclude frontend/
  • Created type stubs: stubs/typedstruct/__init__.pyi, stubs/png/__init__.pyi, stubs/toml/__init__.pyi
  • Rewrote stubs/serial/__init__.pyi to be fully self-contained (no broken submodule imports)
  • Fixed mariner/server/api.py return types to Union[str, Response] for Flask 3.x compatibility
  • Used none_throws() for proper type narrowing on nullable file uploads
  • Added type annotations to test classes for pyre strict mode
  • Removed stale # pyre-fixme comments from printer.py and test_mars.py

Test fixes

  • assertEqualsassertEqual (removed in Python 3.12)
  • setUpPyfakefs(additional_skip_names=["importlib.metadata"]) to prevent pyfakefs from breaking Flask's werkzeug version lookup
  • _get_config.cache_clear() before fake filesystem setup to avoid stale LRU-cached config
  • Updated test expectations to match corrected layer calculation from prior commit
  • freezegun bumped to ^1.4 for Python 3.13 support (uuid._uuid_generate_time was removed)

Lint fixes

  • Added node_modules to .flake8 exclude list (new flake8 was picking up vendored Python in node_modules)
  • Added # noqa: E701 for inline exception class definitions (black/flake8 disagreement)
  • black 24.x auto-reformatted minor whitespace changes

CI workflow

  • Python matrix: ["3.8", "3.9", "3.10"]["3.11", "3.12", "3.13"]
  • Coverage artifact upload pinned to matrix.python-version == '3.11'

Test plan

  • poetry run flake8 — 0 errors
  • poetry run black --check . — 0 reformats needed
  • poetry run pyre check — 0 type errors
  • poetry run green — 69/69 tests pass
  • CI green on Python 3.11, 3.12, 3.13

@amd989 amd989 force-pushed the hotfix/cicd branch 2 times, most recently from 84b3e44 to fdab0cf Compare March 26, 2026 11:30
@amd989 amd989 changed the title ci: repair ci/cd ci: 💚 refactor ci/cd Mar 26, 2026
@amd989 amd989 merged commit 9df9f29 into master Mar 26, 2026
10 checks passed
@amd989 amd989 deleted the hotfix/cicd branch March 26, 2026 13:54
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