CI matrix, linting, CLI parsing, and modernize type hints + flowfield/numba fixes#8
CI matrix, linting, CLI parsing, and modernize type hints + flowfield/numba fixes#8sergioald wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
LDSFL_Meander/.github/workflows/tests.yml
Line 42 in b615dbd
In this workflow, all three python-version matrix jobs run the actions/upload-artifact@v4 step and try to create the same coverage-xml artifact. The upload-artifact v4 documentation says artifact names must be unique and matrix jobs with the same name will hit conflict errors (https://github.com/actions/upload-artifact#not-uploading-to-the-same-artifact), so two of the three CI legs will fail after tests pass unless the name includes ${{ matrix.python-version }} or similar.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ] | ||
|
|
||
| [project.scripts] | ||
| ldsfl-run = "run_ldsfl:main" |
There was a problem hiding this comment.
Ship the module targeted by the console script
The new ldsfl-run entry point imports run_ldsfl:main, but this project’s setuptools config only discovers packages matching ldsfl* under [tool.setuptools.packages.find], so the top-level run_ldsfl.py module is not included in a normal wheel. Setuptools only performs automatic py_modules discovery when both packages and py_modules are left unspecified (https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery), so installed users will get ModuleNotFoundError: run_ldsfl when invoking ldsfl-run unless the module is moved into ldsfl or explicitly listed as a py-module.
Useful? React with 👍 / 👎.
Motivation
Description
smoke-testsjob to a Python-version matrix (3.10,3.11,3.12) and parameterizeactions/setup-python; addruffas apre-commithook with--fixenabled and register aldsfl-runscript entry inpyproject.toml.run_ldsfl.parse_caseswith a stricter parser that supports ranges (e.g.1,3-5), de-duplicates and validates input, expose it as an argparse type, and updaterun_ldsfl.mainto use it; add more robust parsing tests and update smoke/integration tests accordingly.typingannotations to PEP 604/explicittuple[...]andX | Nonestyles, remove unused imports, and modernise return annotations (e.g.-> tuple[...]) across flowfield, periodic flowfield, semiana, geometry, and other modules.RuntimeWarningusage (withstacklevel), avoid large temporary allocations, usezip(..., strict=True)where appropriate, and tidy ThreadPoolExecutor worker typing and behaviour; add safer checks for non-finite migration speed indxdy2.resistance.py, move some numpy/pandas imports to top-level modules, and add a more informative final-warningstacklevelwhen saving snapshots fails.Testing
pre-commit run --all-fileslocally to apply formatting/lint fixes (hook added to repo); this completed successfully.pytest -qand coverage (python -m pytest --cov=ldsfl --cov-report=term-missing --cov-report=xml), and the updated unit tests (includingtests/test_cli_config.py) passed.3.10/3.11/3.12(configured in.github/workflows/tests.yml) which runspre-commitandpytestas described above.