006 download rinf topology#9
Merged
Merged
Conversation
…oad-rinf-topology # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…ed issues that might occur
…uirement (long straight stretches were dismissed)
There was a problem hiding this comment.
Pull request overview
Adds feature 006 to automatically retrieve railway topology (netelements + netrelations) from the ERA RINF SPARQL endpoint when a local network file is not provided, and surfaces this across the Rust core, CLI, Python bindings, and .NET bindings. The PR also extends timestamp parsing to accept naive ISO-8601 datetimes (interpreted in host local time) in addition to RFC3339.
Changes:
- Introduces
tp-coreretrieval workflow (resolve_topology, retrieval models, SPARQL client/query builders, topology validation) and exports it from the public API. - Updates CLI, Python, and .NET surfaces to support “no network provided ⇒ auto-retrieve via RINF”, including new option/config types and new .NET “*Auto” entry points + typed exception mapping.
- Expands timestamp parsing to accept RFC3339 or naive ISO-8601 inputs (local timezone), and updates docs/tests accordingly.
Reviewed changes
Copilot reviewed 52 out of 63 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tp-py/src/lib.rs | Python bindings: optional network + RINF retrieval options; error mapping updates. |
| tp-py/README.md | Python docs: timestamps + RINF retrieval usage. |
| tp-py/python/tp_lib/init.py | Python wrapper signatures updated for optional network + RINF options. |
| tp-py/python/tests/test_projection.py | Python tests: precedence + unreachable-endpoint cases; minor assertion cleanup. |
| tp-py/python/tests/test_path_calculation.py | Python tests: auto-retrieval failure + precedence scenarios. |
| tp-net/src/lib.rs | Rust FFI: adds auto-retrieval entry points and typed error envelope support. |
| tp-net/README.md | .NET docs: RINF retrieval usage + timestamp semantics. |
| tp-net/csharp/TpLib.cs | C# API: adds ProjectGnssAuto / CalculateTrainPathAuto and auto-error deserializer. |
| tp-net/csharp/Tests/ProjectionTests.cs | C# tests for auto projection precedence and endpoint failure. |
| tp-net/csharp/Tests/PathCalculationTests.cs | C# tests for auto path precedence and endpoint failure. |
| tp-net/csharp/NativeMethods.g.cs | C# P/Invoke declarations for the new auto FFI entry points. |
| tp-net/csharp/Models.cs | Adds RinfRetrievalOptions model for .NET callers. |
| tp-net/csharp/Exceptions.cs | Adds typed RINF exception hierarchy for .NET. |
| tp-core/tests/rinf_topology.rs | Offline integration tests for retrieval via mocked SPARQL client. |
| tp-core/tests/fixtures/rinf_smoke_netrelations.json | Fixture SPARQL JSON for netrelations retrieval. |
| tp-core/tests/fixtures/rinf_smoke_netelements.json | Fixture SPARQL JSON for netelements retrieval. |
| tp-core/tests/contract/rinf_query_shape_test.rs | Contract tests for SPARQL query shape. |
| tp-core/tests/contract.rs | Registers the new RINF contract test module. |
| tp-core/src/workflow.rs | Implements retrieval-area construction, validation, and resolve_topology. |
| tp-core/src/temporal.rs | Adds flexible timestamp parsing (RFC3339 or naive local time). |
| tp-core/src/models/retrieval.rs | Adds retrieval domain models/constants/status enums. |
| tp-core/src/models.rs | Re-exports retrieval models in tp-core public model surface. |
| tp-core/src/lib.rs | Exposes new retrieval APIs and SPARQL helpers in the top-level crate API. |
| tp-core/src/io/rinf.rs | Adds SPARQL client trait + ureq client + query builders + parsing/mapping helpers. |
| tp-core/src/io/geojson/detections.rs | Uses flexible timestamp parsing for detection timestamps. |
| tp-core/src/io/geojson.rs | Uses flexible timestamp parsing; adds write_network_geojson. |
| tp-core/src/io/csv/detections.rs | Uses flexible timestamp parsing for detection timestamps. |
| tp-core/src/io/csv.rs | Switches to shared flexible timestamp parsing. |
| tp-core/src/io.rs | Exports the new RINF IO module + network writer. |
| tp-core/src/errors.rs | Adds RINF retrieval error variants. |
| tp-core/Cargo.toml | Adds dependencies needed for RINF retrieval. |
| tp-cli/tests/cli_integration_test.rs | CLI tests for supplied-topology reporting and RINF failure exit codes + ignored live test. |
| tp-cli/src/main.rs | CLI: makes network optional for path flows; adds RINF flags and fetch-topology command. |
| tp-cli/README.md | CLI docs: auto retrieval and new fetch-topology command. |
| test-data/rinf-kvg/gnss.geojson | New GNSS fixture for RINF download feature walkthrough. |
| test-data/rinf_uncovered_gnss.geojson | New GNSS fixture for uncovered-area testing. |
| test-data/rinf_smoke_gnss.geojson | New GNSS fixture for covered-area smoke testing. |
| test-data/rinf_empty_gnss.geojson | New GNSS fixture for invalid/empty-input testing. |
| test-data/README.md | Adds RINF download feature walkthrough + screenshots/commands. |
| specs/006-download-rinf-topology/tasks.md | Task checklist for feature 006 implementation/verification. |
| specs/006-download-rinf-topology/spec.md | Feature spec for auto RINF topology retrieval. |
| specs/006-download-rinf-topology/research.md | Research notes: query shape, validation rules, retrieval geometry. |
| specs/006-download-rinf-topology/quickstart.md | Quickstart validation guide for CLI/Python/.NET. |
| specs/006-download-rinf-topology/plan.md | Implementation plan for feature 006. |
| specs/006-download-rinf-topology/data-model.md | Retrieval data model documentation. |
| specs/006-download-rinf-topology/contracts/api.md | API contracts for CLI/Python/.NET and SPARQL boundary. |
| specs/006-download-rinf-topology/checklists/requirements.md | Spec quality checklist. |
| README.md | Root docs: timestamp semantics + RINF retrieval overview + CLI examples. |
| Cargo.toml | Workspace deps: adds ureq + url. |
| .github/workflows/ci.yml | CI: adds ruff and runs it in Python job. |
| .github/agents/copilot-instructions.md | Updates generated contributor guidance to include feature 006. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.