Skip to content

Modernize: ruff, setuptools-scm, CI/CD overhaul, FDS 6.10.1 test data#113

Merged
m-fehr merged 7 commits into
masterfrom
modernize
May 4, 2026
Merged

Modernize: ruff, setuptools-scm, CI/CD overhaul, FDS 6.10.1 test data#113
m-fehr merged 7 commits into
masterfrom
modernize

Conversation

@m-fehr
Copy link
Copy Markdown
Contributor

@m-fehr m-fehr commented May 4, 2026

Summary

  • Switch version management from incremental to setuptools-scm (git-tag-based)
  • Add ruff for linting and formatting, fix all violations across the codebase
  • Replace testsuite.yml + publish_n_pack.yml with modern ci.yml, release.yml, fds_compat.yml
  • Extend acceptance tests with robustness checks (times, NaN, shape consistency)
  • Add FDS 6.10.1 test data; discovered geometry breaking change (tracked separately)
  • Add FDS version compatibility table to README

Test plan

  • All 46 tests pass locally (pytest tests/ -v)
  • ruff check fdsreader/ passes
  • CI runs green on Python 3.10 / 3.11 / 3.12
  • Release workflow only triggers on tags (not on branch pushes)

Known issues

  • geom_data fails with FDS 6.10.1 due to SMV format change (BGEOM block removed) → separate issue

m-fehr added 3 commits May 3, 2026 19:19
Build system:
- Replace incremental version management with setuptools-scm (git-tag-based)
- Remove fdsreader/_version.py, use importlib.metadata.version() at runtime
- Raise minimum Python version to 3.10, add 3.11/3.12 classifiers
- Replace requirements.txt (160+ packages) with requirements-dev.txt (5 packages)

Linting:
- Add ruff configuration (line-length=120, select E/F/W/I/UP)
- Fix all ruff violations across the codebase (isinstance, wildcard imports,
  unused imports, explicit re-exports, fortran_data isinstance bug)
- Fix circular import in evac/evac_collection.py

Tests:
- Add tests/conftest.py: set CWD to tests/cases/ so acceptance tests work
  when pytest is run from the project root
- Replace unittest-style test_version_compatibility.py with pytest-based
  test_basic_read.py (6 tests covering chid, meshes, slices, devices, obstructions)
- Extend all acceptance tests with robustness checks: non-empty time arrays,
  monotonically increasing times, data shape consistency, no NaN/Inf in arrays,
  quantity metadata present

CI/CD:
- Replace testsuite.yml with ci.yml: matrix testing on Python 3.10/3.11/3.12,
  separate lint job, codecov upload
- Replace publish_n_pack.yml with release.yml: tag-driven OIDC publishing,
  beta tags go to TestPyPI, stable tags go to PyPI + GitHub Release
- Add fds_compat.yml: weekly cron job that detects new FDS releases and runs
  compatibility checks automatically
- Add .github/last_tested_fds_version.txt to track last tested FDS version

Docs:
- Add FDS version compatibility table to README
- Add CI and codecov badges to README
- Update release instructions (incremental -> git tag)
Previously the .fds input files were only accessible after extracting
the .tgz archives. By checking them in directly, contributors can
inspect and modify input files without unpacking binaries first.

This is required to regenerate test data with a new FDS version.
Regenerated test cases (steckler, bndf, devc, part, pl3d) using
FDS 6.10.1 to verify fdsreader compatibility with the current FDS release.

All output types read correctly except geometry (geom_data) which is
affected by a breaking change in the FDS 6.10.1 SMV format: the BGEOM
block referencing .gbf files was removed. This will be tracked as a
separate issue.

Also fixes water_droplets.fds for FDS 6.10+: ALLOW_UNDERSIDE_PARTICLES
was moved from &MISC to &SURF in FDS 6.9.
@m-fehr m-fehr self-assigned this May 4, 2026
@m-fehr m-fehr added the enhancement New feature or request label May 4, 2026
m-fehr added 2 commits May 4, 2026 10:07
- Add CONTRIBUTING.md: development setup, test instructions, ruff usage,
  how to regenerate test data, known critical bugs as good-first-issues
- Add codecov.yml: 50% project coverage target, 40% patch target
- Update .gitignore: ignore extracted test case directories, pickle cache
  files, ruff cache, and .claude/ internal directory
- Stage deletion of requirements.txt (replaced by requirements-dev.txt)
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

m-fehr added 2 commits May 4, 2026 10:42
- .readthedocs.yaml: auto-build docs on every push to master
- docs/conf.py: replace deleted _version import with importlib.metadata
- docs/releasing.rst: step-by-step release guide for maintainers
- docs/index.rst: add Maintainer Guide section to TOC
- pyproject.toml: add [docs] optional dependencies group
Runs ruff check --fix and ruff format automatically before each commit
to prevent lint errors from reaching CI.
@m-fehr m-fehr merged commit 3521193 into master May 4, 2026
6 checks passed
@m-fehr m-fehr deleted the modernize branch May 4, 2026 09:27
@m-fehr m-fehr mentioned this pull request May 4, 2026
@chraibi chraibi mentioned this pull request May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant