Thank you for your interest in contributing to PyTransDatRO! As an open-source geodetic engineering project licensed under the MIT License, we welcome bug reports, suggestions, improvements, and code contributions.
Before writing code, please review the immutable core invariants that govern this repository:
-
Pure Python Core Geodetic Library (
pytransdatro/):- The core mathematical and grid transformation engine is implemented in pure Python (standard library only).
- No external scientific C/compiled dependencies (such as NumPy or SciPy) are permitted for coordinate computation.
-
Exception:
numpyis permitted strictly for deserializing binary grid files (.spg). - The core library must never import from the web API layer (
api/) or web frameworks.
-
Zero Functional Regression Rule:
- All coordinate transformations must remain byte-for-byte identical to official ANCPI / RomGEO benchmarks with
$< 10^{-9}$ numerical tolerance across all 9,046 national benchmark control points. - Always run the benchmark suite before submitting changes:
python tools/generate_ancpi_comparison_reports.py
- All coordinate transformations must remain byte-for-byte identical to official ANCPI / RomGEO benchmarks with
-
Decoupled Three-Tier Architecture:
- Geodetic Math & Grids:
pytransdatro/(pure Python). - REST API & Endpoints:
api/(FastAPI, Pydantic, Uvicorn). - Interactive Studio & Maps:
webapp/(TypeScript, Leaflet, Vite).
- Geodetic Math & Grids:
-
Machine-Agnostic Portability:
- Never commit machine-specific absolute file paths (e.g.
D:\...orC:\Users\...). All links and references must be repository-relative.
- Never commit machine-specific absolute file paths (e.g.
- Clone the repository:
git clone https://github.com/bogdanmorosanu/PyTransDatRO.git cd PyTransDatRO - Create and activate a virtual environment (Python 3.10+):
python -m venv .venv # Windows: .venv\Scripts\activate # Linux/macOS: source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt -r requirements-api.txt -r requirements-dev.txt
- Navigate to
webapp/and install dependencies:npm --prefix webapp ci
- Build the frontend or run in development mode:
npm --prefix webapp run dev
Every pull request must pass the full automated quality suite:
ruff check pytransdatro api tests tools
ruff format --check pytransdatro api tests toolspython tools/generate_ancpi_comparison_reports.py
pytest -m "not legacy_live" -qnpm --prefix webapp test -- --run
npm --prefix webapp run build# Windows:
.\test-e2e.ps1
# Or via npm:
npm --prefix webapp run test:e2epython tools/bump_version.py --check- Branching: Create a focused topic branch from
main:git checkout -b feat/your-feature-name # or git checkout -b fix/your-bugfix-name - Conventional Commits: Write clear, descriptive commit messages:
feat(...): New feature or capabilityfix(...): Bug fix or numerical correctionrefactor(...): Code cleanup without functional changetest(...): Adding or updating test casesdocs(...): Documentation updates
- Open a Pull Request: Push your branch and open a PR against
main. Provide a clear description of your changes and reference any related issues.