From 47d26fe29ea1312dd7d9b584331a01363dc2a90e Mon Sep 17 00:00:00 2001 From: Mario van den Berg <122263648+MariovdBerg@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:25:21 +0200 Subject: [PATCH 1/2] moved src-files to folder prflcheck --- CHANGELOG.md | 1 + README.md | 27 ++++++++++++++++----------- example_usage.py | 6 +++++- pytest.ini | 3 ++- ruff.toml | 4 +++- src/{ => prflcheck}/__init__.py | 0 src/{ => prflcheck}/checks.py | 0 src/{ => prflcheck}/convert_string.py | 0 src/{ => prflcheck}/model.py | 0 src/{ => prflcheck}/profiel_enums.py | 0 src/{ => prflcheck}/reader.py | 0 src/{ => prflcheck}/writer.py | 0 test/conftest.py | 2 +- test/test_checks.py | 2 +- test/test_convert_string.py | 2 +- test/test_encoding.py | 4 ++-- test/test_example_usage.py | 2 +- test/test_model.py | 2 +- test/test_reader.py | 2 +- test/test_writer.py | 11 ++++++++++- todo.txt | 3 ++- 21 files changed, 47 insertions(+), 24 deletions(-) rename src/{ => prflcheck}/__init__.py (100%) rename src/{ => prflcheck}/checks.py (100%) rename src/{ => prflcheck}/convert_string.py (100%) rename src/{ => prflcheck}/model.py (100%) rename src/{ => prflcheck}/profiel_enums.py (100%) rename src/{ => prflcheck}/reader.py (100%) rename src/{ => prflcheck}/writer.py (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1738090..6babc84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ its own deviations from the C# code are listed at the end of the 2.0.0 section. | C# (`daas.fn`) | Python 2.0.0 | |---|---| +| Namespace `daas.fn` | Package `prflcheck` (folder `src/prflcheck/`): `from prflcheck import Profiel` | | `new Profiel(profielData)`, `new Profiel(naam, profielData)` | `Profiel.from_string(text)` or `Profiel.from_file(path)` | | `new Profiel(id, damtype, damhoogte, richting, kruinhoogte, voorland, damwandmodule, memo, profielpunten)` | `Profiel.from_punten(punten, voorland=..., id=..., damtype=..., damwand=..., ...)` | | `profiel.Controleer()` | `profiel.check()` | diff --git a/README.md b/README.md index 3db7b89..dbbb647 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ profiles (`.prfl`): cross-sections of a dike with an optional foreland (voorland ## Installation The module is not (yet) an installable package: there is no `pyproject.toml`, so `pip install` -does not work. The code lives in the folder `src` and is imported as `src`. +does not work. The code is the package `prflcheck` in the folder `src/prflcheck/`, and is +imported as `prflcheck`. ### From source @@ -28,25 +29,27 @@ cd ProfielCheckPython python example_usage.py ``` -Scripts in the project folder can then use `from src import ...` directly. +### Using the package -### Direct use from another project - -Add the project folder (the folder that *contains* `src`) to the Python path: +Add the folder `src` (the folder that *contains* `prflcheck`) to the Python path, for +example at the top of your script: ```python import sys -sys.path.append(r"C:\path\to\ProfielCheckPython") +sys.path.append(r"C:\path\to\ProfielCheckPython\src") -from src import Profiel, ProfielPunt, ProfielError +from prflcheck import Profiel, ProfielPunt, ProfielError ``` +Or set the environment variable `PYTHONPATH` to that folder. `example_usage.py` and the tests +already do this themselves. + ## Quick Start ### Creating a profile ```python -from src import Damwandmodule, DamType, Profiel, ProfielPunt, ProfielVersion +from prflcheck import Damwandmodule, DamType, Profiel, ProfielPunt, ProfielVersion # Profile points: x (m), z (m+NAP), roughness punten = [ @@ -85,7 +88,7 @@ are `NaN` (numbers) or `GEEN` (dam type and dam wall). ### Reading a profile ```python -from src import Profiel +from prflcheck import Profiel profiel = Profiel.from_file("profile_v4.prfl") # version 3 or 4, detected from VERSIE text = profiel.to_string(3) # the same profile in the version 3 format @@ -135,11 +138,13 @@ Dutch `description`: | 130 | Dam wall (crest height) above the end of the foreland | | 800, 801 | Invalid dam type or dam wall module | -The limits are constants in `src/checks.py`. A missing (`NaN`) crest height or roughness +The limits are constants in `src/prflcheck/checks.py`. A missing (`NaN`) crest height or roughness is reported as an error. ## Module Structure +The package `prflcheck` (folder `src/prflcheck/`) contains: + - **model.py**: `ProfielPunt`, `ProfielDeel` and `Profiel` (data only) - **reader.py**: `read_file()`, `read_string()` for version 3 and 4 - **writer.py**: `write_string()` for version 3 and 4 @@ -171,7 +176,7 @@ The tests use pytest, pytest-cov and ruff (`requirements-dev.txt`). On Windows: ```bash python -m venv .venv .venv/Scripts/python -m pip install -r requirements-dev.txt -.venv/Scripts/python -m pytest --cov=src --cov-branch +.venv/Scripts/python -m pytest --cov=prflcheck --cov-branch .venv/Scripts/python -m ruff check src test example_usage.py ``` diff --git a/example_usage.py b/example_usage.py index 9f5963f..dac437f 100644 --- a/example_usage.py +++ b/example_usage.py @@ -5,10 +5,14 @@ python example_usage.py """ +import sys import tempfile from pathlib import Path -from src import DamType, Damwandmodule, Profiel, ProfielPunt, ProfielVersion +# Het package staat in src/ en is (nog) niet geïnstalleerd: zet src/ op het pad +sys.path.insert(0, str(Path(__file__).resolve().parent / "src")) + +from prflcheck import DamType, Damwandmodule, Profiel, ProfielPunt, ProfielVersion # noqa: E402 PROFIEL_V3 = """VERSIE 3.0 DAM 0 diff --git a/pytest.ini b/pytest.ini index 330cc3c..c440ff9 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] testpaths = test -pythonpath = . +# src/ voor het package prflcheck, . voor example_usage.py +pythonpath = src . addopts = -ra diff --git a/ruff.toml b/ruff.toml index 9f3cff9..a976c2d 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,7 +1,9 @@ line-length = 120 target-version = "py39" +# Mappen met eigen code, zodat imports van prflcheck als first-party worden gesorteerd +src = ["src", "."] [lint] select = ["E", "F", "W", "B", "I", "UP"] # De foutmeldingen in ProfielError zijn bewust lange regels -per-file-ignores = { "src/profiel_enums.py" = ["E501"] } +per-file-ignores = { "src/prflcheck/profiel_enums.py" = ["E501"] } diff --git a/src/__init__.py b/src/prflcheck/__init__.py similarity index 100% rename from src/__init__.py rename to src/prflcheck/__init__.py diff --git a/src/checks.py b/src/prflcheck/checks.py similarity index 100% rename from src/checks.py rename to src/prflcheck/checks.py diff --git a/src/convert_string.py b/src/prflcheck/convert_string.py similarity index 100% rename from src/convert_string.py rename to src/prflcheck/convert_string.py diff --git a/src/model.py b/src/prflcheck/model.py similarity index 100% rename from src/model.py rename to src/prflcheck/model.py diff --git a/src/profiel_enums.py b/src/prflcheck/profiel_enums.py similarity index 100% rename from src/profiel_enums.py rename to src/prflcheck/profiel_enums.py diff --git a/src/reader.py b/src/prflcheck/reader.py similarity index 100% rename from src/reader.py rename to src/prflcheck/reader.py diff --git a/src/writer.py b/src/prflcheck/writer.py similarity index 100% rename from src/writer.py rename to src/prflcheck/writer.py diff --git a/test/conftest.py b/test/conftest.py index 790287b..10e9d9a 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -2,7 +2,7 @@ import pytest -from src import ProfielPunt +from prflcheck import ProfielPunt TESTPROFILES_DIR = Path(__file__).parent / "testprofiles" diff --git a/test/test_checks.py b/test/test_checks.py index c60f9fc..986ecea 100644 --- a/test/test_checks.py +++ b/test/test_checks.py @@ -2,7 +2,7 @@ import pytest -from src import Damwandmodule, Profiel, ProfielError, ProfielPunt, checks +from prflcheck import Damwandmodule, Profiel, ProfielError, ProfielPunt, checks from .conftest import punten diff --git a/test/test_convert_string.py b/test/test_convert_string.py index 70d8e4b..97649f1 100644 --- a/test/test_convert_string.py +++ b/test/test_convert_string.py @@ -3,7 +3,7 @@ import pytest -from src import format_float, parse_float, parse_int +from prflcheck import format_float, parse_float, parse_int @pytest.mark.parametrize("tekst, verwacht", [ diff --git a/test/test_encoding.py b/test/test_encoding.py index e47a461..52a4d30 100644 --- a/test/test_encoding.py +++ b/test/test_encoding.py @@ -2,8 +2,8 @@ import pytest -from src import Profiel, ProfielError, read_file -from src.reader import VERVANGTEKEN +from prflcheck import Profiel, ProfielError, read_file +from prflcheck.reader import VERVANGTEKEN TEKST = "VERSIE 4.0\nID X\nVOORLAND 0\nKRUINHOOGTE 8.0\nDIJK 2\n0 2 0.8\n8 3 0.8\nMEMO\nDijk bij Één, café\n" diff --git a/test/test_example_usage.py b/test/test_example_usage.py index 7285c1c..98b3c9b 100644 --- a/test/test_example_usage.py +++ b/test/test_example_usage.py @@ -1,7 +1,7 @@ """Houdt example_usage.py werkend: de voorbeelden moeten de verwachte uitkomst geven.""" import example_usage -from src import ProfielError +from prflcheck import ProfielError def test_voorbeelden_1_tot_4_zijn_geldig(capsys): diff --git a/test/test_model.py b/test/test_model.py index 169120b..0cbedcc 100644 --- a/test/test_model.py +++ b/test/test_model.py @@ -2,7 +2,7 @@ import pytest -from src import DamType, Damwandmodule, Profiel, ProfielDeel, ProfielDeelType, ProfielPunt +from prflcheck import DamType, Damwandmodule, Profiel, ProfielDeel, ProfielDeelType, ProfielPunt from .conftest import punten diff --git a/test/test_reader.py b/test/test_reader.py index 7521586..0220c29 100644 --- a/test/test_reader.py +++ b/test/test_reader.py @@ -3,7 +3,7 @@ import pytest -from src import DamType, Damwandmodule, Profiel, ProfielError, ProfielPunt, read_file, read_string +from prflcheck import DamType, Damwandmodule, Profiel, ProfielError, ProfielPunt, read_file, read_string from .conftest import fixture_path diff --git a/test/test_writer.py b/test/test_writer.py index f87fda9..d5c3cd3 100644 --- a/test/test_writer.py +++ b/test/test_writer.py @@ -2,7 +2,16 @@ import pytest -from src import DamType, Damwandmodule, Profiel, ProfielError, ProfielPunt, ProfielVersion, read_file, write_string +from prflcheck import ( + DamType, + Damwandmodule, + Profiel, + ProfielError, + ProfielPunt, + ProfielVersion, + read_file, + write_string, +) from .conftest import fixture_path, punten diff --git a/todo.txt b/todo.txt index 4ba7c3e..9a27bf9 100644 --- a/todo.txt +++ b/todo.txt @@ -2,4 +2,5 @@ Open - Ruwheid (ERROR121): de C#-code had geen ruwheidscontrole en geen foutcode 121 (de constanten RUWHEIDLAAG en RUWHEIDHOOG bestonden wel). Nog bevestigen met de Hydra-documentatie dat de controle zo klopt: alleen dijkdelen, grenzen 0.5 en 1.0 zelf toegestaan. -- Packaging: pyproject.toml, package-naam (nu 'src'), installatie-instructies in README.md kloppen nog niet. +- Packaging: het package prflcheck staat in src/prflcheck/ (src-layout). Nog nodig: pyproject.toml, + zodat 'pip install -e .' werkt, en de installatie-instructies in README.md daarop aanpassen. From 7bfc2fee9271c2fbe4d20248ea9cad0dae40facc Mon Sep 17 00:00:00 2001 From: Mario van den Berg <122263648+MariovdBerg@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:39:01 +0200 Subject: [PATCH 2/2] Created repo as package --- .github/workflows/ci.yml | 38 +++++++++++++++++++ .gitignore | 4 ++ CHANGELOG.md | 10 +++++ README.md | 55 ++++++++++++++++----------- example_usage.py | 9 ++--- pyproject.toml | 81 ++++++++++++++++++++++++++++++++++++++++ pytest.ini | 5 --- requirements-dev.txt | 3 -- ruff.toml | 9 ----- todo.txt | 2 - 10 files changed, 169 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 pyproject.toml delete mode 100644 pytest.ini delete mode 100644 requirements-dev.txt delete mode 100644 ruff.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..89672f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: [main, develop] + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: python -m pip install -e ".[dev]" + - run: python -m ruff check src test example_usage.py + - run: python -m pytest --cov + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: python -m pip install build twine + - run: python -m build + - run: python -m twine check --strict dist/* + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ diff --git a/.gitignore b/.gitignore index d25a420..e42b3b4 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ htmlcov/ # Other *.zip + +# Build output +build/ +dist/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 6babc84..c1c0762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ProfielCheckPython is a conversion of the C# library `daas.fn` 1.0.1.0 by Rolf W A first Python conversion (2025) was an intermediate step and was not released separately; its own deviations from the C# code are listed at the end of the 2.0.0 section. +## [Unreleased] + ## [2.0.0] - 2026-10-19 ### API: from C# to Python @@ -76,6 +78,11 @@ its own deviations from the C# code are listed at the end of the 2.0.0 section. - Test suite with pytest (256 tests, 100% branch coverage), including boundary tests for every validation limit and round-trip tests for v3 and v4. Linting with ruff. - `example_usage.py`, README, this changelog, and `LICENSE` (EUPL-1.2). +- **Installable package:** `pyproject.toml` (build backend hatchling), so `pip install .` + works and a wheel and source distribution can be built for PyPI under the name + `prflcheck`. The version number is read from `prflcheck.__version__`. The settings of + pytest, coverage and ruff are in `pyproject.toml`, the development tools in the `dev` extra + (`pip install -e ".[dev]"`). GitHub Actions runs the tests and builds the package. ### Changed @@ -129,3 +136,6 @@ C# library `daas.fn` for .NET Framework by Rolf Waterman, © HKV Services 2016, `Profiel.cs`, `ProfielPunt.cs`, `ProfielDeel.cs`, `ProfielCheck.cs`, `ProfielEnums.cs`, `ConvertString.cs` and `EnumeratorExtensions.cs`. Reads and writes Hydra/Ringtoets profiles (version 3 and 4) and validates them with `Controleer()`. + +[Unreleased]: https://github.com/MariovdBerg/ProfielCheckPython/compare/v2.0.0...HEAD +[2.0.0]: https://github.com/MariovdBerg/ProfielCheckPython/releases/tag/v2.0.0 diff --git a/README.md b/README.md index dbbb647..2fe0de2 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # ProfielCheckPython -A Python port of the HKV C# library for reading, writing and validating Hydra/Ringtoets +A Python port of the HKV C# library for reading, writing and validating Hydra-NL/HydraRing profiles (`.prfl`): cross-sections of a dike with an optional foreland (voorland) and dam. **Authors:** Rolf Waterman (original C# code), Mario van den Berg, Claude **Copyright:** © 2025-2026 HKV lijn in water B.V.; original C# code © 2016, 2017 HKV Services -**License:** [EUPL-1.2](LICENSE) -**Version:** 2.0.0 (see [CHANGELOG.md](CHANGELOG.md); not compatible with the C# library or 1.0.1.0) +**License:** [EUPL-1.2](https://github.com/MariovdBerg/ProfielCheckPython/blob/main/LICENSE) +**Version:** 2.0.0 (see [CHANGELOG.md](https://github.com/MariovdBerg/ProfielCheckPython/blob/main/CHANGELOG.md); not compatible with the C# library or 1.0.1.0) ## Overview @@ -17,33 +17,28 @@ profiles (`.prfl`): cross-sections of a dike with an optional foreland (voorland ## Installation -The module is not (yet) an installable package: there is no `pyproject.toml`, so `pip install` -does not work. The code is the package `prflcheck` in the folder `src/prflcheck/`, and is -imported as `prflcheck`. +The package is called `prflcheck` (folder `src/prflcheck/`) and has no dependencies. +Install it from GitHub: -### From source +```bash +pip install git+https://github.com/MariovdBerg/ProfielCheckPython.git +``` + +Or from a local clone, in editable mode for development: ```bash git clone https://github.com/MariovdBerg/ProfielCheckPython.git cd ProfielCheckPython +pip install -e . python example_usage.py ``` -### Using the package - -Add the folder `src` (the folder that *contains* `prflcheck`) to the Python path, for -example at the top of your script: +Then import it as usual: ```python -import sys -sys.path.append(r"C:\path\to\ProfielCheckPython\src") - from prflcheck import Profiel, ProfielPunt, ProfielError ``` -Or set the environment variable `PYTHONPATH` to that folder. `example_usage.py` and the tests -already do this themselves. - ## Quick Start ### Creating a profile @@ -171,16 +166,32 @@ This demonstrates: ## Testing -The tests use pytest, pytest-cov and ruff (`requirements-dev.txt`). On Windows: +The tests use pytest, pytest-cov and ruff (the `dev` extra in `pyproject.toml`, which also +installs `build` and `twine`). The tests run against the installed package. On Windows: ```bash python -m venv .venv -.venv/Scripts/python -m pip install -r requirements-dev.txt -.venv/Scripts/python -m pytest --cov=prflcheck --cov-branch +.venv/Scripts/python -m pip install -e ".[dev]" +.venv/Scripts/python -m pytest --cov .venv/Scripts/python -m ruff check src test example_usage.py ``` -On Linux or macOS, use `.venv/bin/python` instead of `.venv/Scripts/python`. +On Linux or macOS, use `.venv/bin/python` instead of `.venv/Scripts/python`. GitHub Actions +runs the tests on Python 3.9 to 3.14 on Linux and Windows (`.github/workflows/ci.yml`). + +## Building and Publishing + +The version number is set in one place, `__version__` in `src/prflcheck/__init__.py`. +To make a release, update it, add a section to `CHANGELOG.md`, and build and check the +distributions: + +```bash +.venv/Scripts/python -m build +.venv/Scripts/python -m twine check dist/* +``` + +This creates a wheel and a source distribution in `dist/`. Upload them to PyPI with +`twine upload dist/*`. ## Requirements @@ -194,7 +205,7 @@ Copyright © 2025-2026 HKV lijn in water B.V. (Python code) Licensed under the EUPL -This work is licensed under the [European Union Public Licence v1.2](LICENSE) (EUPL-1.2), +This work is licensed under the [European Union Public Licence v1.2](https://github.com/MariovdBerg/ProfielCheckPython/blob/main/LICENSE) (EUPL-1.2), an open-source licence with copyleft: you may use, change and distribute the code, also commercially, provided that you keep the copyright notices, include the licence, mark your changes, and distribute changed versions under the EUPL (or a compatible licence listed in diff --git a/example_usage.py b/example_usage.py index dac437f..a4bb43e 100644 --- a/example_usage.py +++ b/example_usage.py @@ -1,18 +1,15 @@ """ Voorbeelden van het gebruik van de ProfielCheckPython-module. -Uitvoeren vanuit de hoofdmap van het project: +Uitvoeren vanuit de hoofdmap van het project, met prflcheck geïnstalleerd +(pip install -e .): python example_usage.py """ -import sys import tempfile from pathlib import Path -# Het package staat in src/ en is (nog) niet geïnstalleerd: zet src/ op het pad -sys.path.insert(0, str(Path(__file__).resolve().parent / "src")) - -from prflcheck import DamType, Damwandmodule, Profiel, ProfielPunt, ProfielVersion # noqa: E402 +from prflcheck import DamType, Damwandmodule, Profiel, ProfielPunt, ProfielVersion PROFIEL_V3 = """VERSIE 3.0 DAM 0 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..46707d1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,81 @@ +[build-system] +requires = ["hatchling>=1.27"] +build-backend = "hatchling.build" + +[project] +name = "prflcheck" +dynamic = ["version"] +description = "Read, write and validate Hydra-NL/HydraRing profiles (.prfl)" +readme = "README.md" +requires-python = ">=3.9" +license = "EUPL-1.2" +license-files = ["LICENSE"] +authors = [ + { name = "Rolf Waterman" }, + { name = "Mario van den Berg", email = "M.vandenBerg@hkv.nl" }, +] +keywords = ["hydra-nl", "hydraring", "ringtoets", "profiel", "dijk", "prfl"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Natural Language :: Dutch", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Scientific/Engineering :: Hydrology", +] +dependencies = [] + +[project.optional-dependencies] +dev = ["pytest", "pytest-cov", "ruff", "build", "twine"] + +[project.urls] +Homepage = "https://github.com/MariovdBerg/ProfielCheckPython" +Source = "https://github.com/MariovdBerg/ProfielCheckPython" +Issues = "https://github.com/MariovdBerg/ProfielCheckPython/issues" +Changelog = "https://github.com/MariovdBerg/ProfielCheckPython/blob/main/CHANGELOG.md" + +# Eén bron voor het versienummer: __version__ in het package +[tool.hatch.version] +path = "src/prflcheck/__init__.py" + +[tool.hatch.build.targets.wheel] +packages = ["src/prflcheck"] + +[tool.hatch.build.targets.sdist] +include = [ + "src/prflcheck", + "test", + "example_usage.py", + "README.md", + "CHANGELOG.md", + "LICENSE", +] + +[tool.pytest.ini_options] +testpaths = ["test"] +# prflcheck wordt geïnstalleerd getest (pip install -e .), . is nodig voor example_usage.py +pythonpath = ["."] +addopts = "-ra" + +[tool.coverage.run] +source = ["prflcheck"] +branch = true + +[tool.ruff] +line-length = 120 +target-version = "py39" +# Mappen met eigen code, zodat imports van prflcheck als first-party worden gesorteerd +src = ["src", "."] + +[tool.ruff.lint] +select = ["E", "F", "W", "B", "I", "UP"] +# De foutmeldingen in ProfielError zijn bewust lange regels +per-file-ignores = { "src/prflcheck/profiel_enums.py" = ["E501"] } diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index c440ff9..0000000 --- a/pytest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[pytest] -testpaths = test -# src/ voor het package prflcheck, . voor example_usage.py -pythonpath = src . -addopts = -ra diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index f56102b..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest -pytest-cov -ruff diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index a976c2d..0000000 --- a/ruff.toml +++ /dev/null @@ -1,9 +0,0 @@ -line-length = 120 -target-version = "py39" -# Mappen met eigen code, zodat imports van prflcheck als first-party worden gesorteerd -src = ["src", "."] - -[lint] -select = ["E", "F", "W", "B", "I", "UP"] -# De foutmeldingen in ProfielError zijn bewust lange regels -per-file-ignores = { "src/prflcheck/profiel_enums.py" = ["E501"] } diff --git a/todo.txt b/todo.txt index 9a27bf9..35e6048 100644 --- a/todo.txt +++ b/todo.txt @@ -2,5 +2,3 @@ Open - Ruwheid (ERROR121): de C#-code had geen ruwheidscontrole en geen foutcode 121 (de constanten RUWHEIDLAAG en RUWHEIDHOOG bestonden wel). Nog bevestigen met de Hydra-documentatie dat de controle zo klopt: alleen dijkdelen, grenzen 0.5 en 1.0 zelf toegestaan. -- Packaging: het package prflcheck staat in src/prflcheck/ (src-layout). Nog nodig: pyproject.toml, - zodat 'pip install -e .' werkt, en de installatie-instructies in README.md daarop aanpassen.