Skip to content

enhance GeoJSON handling across resources#56

Merged
lykmapipo merged 39 commits into
developfrom
feature/custom-region
Apr 29, 2026
Merged

enhance GeoJSON handling across resources#56
lykmapipo merged 39 commits into
developfrom
feature/custom-region

Conversation

@lykmapipo

Copy link
Copy Markdown
Collaborator

This:

  • Unify GeoJSON handling across bulk downloads, events, fourwings, and datasets resources
  • Add flexible GeoJSON input support (dict, JSON string, and geospatial file paths)
  • Normalize request geometries using a shared GeoJson model and Geometry conversion
  • Expand integration test coverage and introduce shared GeoJSON fixtures and validation utilities

This:
- replace `BulkReportGeometry` with `GeoJson`-based implementation for robust GeoJSON handling
- support GeoJSON input from dictionaries, strings, and geospatial file paths
- normalize all geometry inputs to `FeatureCollection`
- add request-body helper to prepare and validate GeoJSON consistently
- update Bulk Download resource signatures and docstrings to reflect expanded GeoJSON support
- adjust and extend tests to validate normalized GeoJSON serialization and request bodies
This:
- replace `FourWingsGeometry` with `GeoJson`-based implementation
- support GeoJSON input from dictionaries, strings, and geospatial file paths
- normalize all geometry inputs to `FeatureCollection`
- add request-body helper to prepare and validate GeoJSON consistently
- update FourWings resource method signatures and docstrings to reflect expanded GeoJSON support
- adjust tests to assert normalized GeoJSON serialization in request bodies
This:
- replace `EventGeometry` with `GeoJson`-based implementation
- support GeoJSON input from dictionaries, strings, and geospatial file paths
- normalize all geometry inputs to `FeatureCollection`
- add request-body helper to prepare and validate GeoJSON consistently
- update Event resource method signatures and docstrings to reflect expanded GeoJSON support
- adjust tests to assert normalized GeoJSON serialization in request bodies
This:
- add `VESSEL-IDENTITY-FLAG-CHANGES` and `VESSEL-IDENTITY-MOU-LIST` to `VesselInsightInclude`
- update `InsightResource` docstrings to reflect expanded allowed include insight values
- update request fixture to include new insight types
…MOU support

This:
- replace `IuuListPeriod` with generic `PeriodicValue` model
- replace `IuuVesselList` with reusable `PeriodicValueList`
- add `FlagsChanges` and `MouList` models extending `PeriodicValueList`
- extend `VesselIdentity` to support `flagChanges` and `mouList`
- update fixtures to include `FLAG CHANGES` and `MOU` examples
- expand response model tests to validate new fields and counters
- improve docstrings and formatting for clarity
This:
- add direct link to GitHub Releases page
- add direct link to published package on PyPI
…cumentation

This:
- align Insights API documentation with official Global Fishing Watch API terminology
- enhance docstrings with official documentation references and data caveats
- update `VesselInsightDatasetVessel` model to use `VesselDataset` enum for dataset identifiers
- improve `VesselInsightBody` request model with explicit field aliases and clearer parameter documentation
- extend `get_vessel_insights()` to accept vessel IDs directly (`List[str]`)
- add validation tests for invalid request payload scenarios
- add unit tests verifying request serialization and default dataset handling
- improve test coverage for resource behavior when vessel IDs are passed directly
This:
- update integration tests to pass vessel IDs directly instead of `{dataset_id, vessel_id}` objects
- add integration tests for `VESSEL-IDENTITY-FLAG-CHANGES` insight type
- add integration tests for `VESSEL-IDENTITY-MOU-LIST` insight type
This:
- update caveat references and dataset examples in documentation
- update vessel input examples to use vessel ID strings instead of `{dataset_id, vessel_id}` objects
- expand examples for `FISHING`, `VESSEL-IDENTITY-IUU-VESSEL-LIST`, and `COVERAGE` insights
- expand examples for `GAP`,  `VESSEL-IDENTITY-FLAG-CHANGES`, and `VESSEL-IDENTITY-MOU-LIST` insights
- add example showing retrieval of multiple insights for multiple vessels
…ehavior

This:
- expand `VesselInclude.POTENTIAL_RELATED_SELF_REPORTED_INFO` docstring
- add official Vessel Viewer reference link for context and usage understanding
- align `VesselResource` parameter documentation with updated include description
This:
- Use shared `GeoJson` model across bulk downloads, events, and fourwings resources
- Update request models and resource method signatures to use unified GeoJson typing
- Expand bulk downloads, events, and fourwings resource tests to validate GeoJSON inputs
- Add shared resource test fixtures
…endpoint

This:
- Add unified `GeoJson` input handling to datasets resource request models and methods
- Update endpoint and resource docstrings for consistent parameter formatting and usage examples
- Add integration tests validating geometry inputs from GeoJSON and Shapefile paths
- Add resource tests covering multiple GeoJson-compatible input types
- Add shared dataset geometry fixtures
- Improve request mocking using URL regex matcher
…fixtures

This:
- Add bulk downloads integration tests validating GeoJson sources
- Normalize JSON fixture formatting for bulk report request and response payloads
This:
- Add 4wings integration tests validating GeoJson sources
- Add shared geojson fixtures
This:
- Add events integration tests validating GeoJson sources
- Add shared geojson fixtures
…odel

This:
- Replace `GeoJson` with `Geometry` in bulk download request body model
- Convert GeoJson inputs to Geometry via `GeoJson.to_geometry()` during request preparation
- Export `Geometry` from base models public API
- Add reusable `assert_valid_geometry` test helper for GeoJSON geometry validation
This:
- Replace `GeoJson` with `Geometry` in event base request body model
- Convert GeoJson inputs to Geometry via `GeoJson.to_geometry()` during request preparation
@lykmapipo lykmapipo self-assigned this Mar 31, 2026
@lykmapipo lykmapipo added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 31, 2026
Comment thread tests/integration/test_bulk_downloads_api.py Outdated
Comment thread tests/integration/test_bulk_downloads_api.py Outdated
…d docstrings

This:
- Rename SAR test to include `sar_fixed_infrastructure_data`
- Update test docstring to specify `Sentinel-1` and `Sentinel-2` data sources
This:
- Update docstrings with links to Vessels API documentation
- Update docstrings with vessel identity data caveats
This:
- Add instructions for enabling `FLAG-CHANGES` and `MOU-LIST` insights
- Update caveat links to use "Apparent fishing" terminology
enhance insights API models, documentation, and test coverage
improve releases links and vessel include documentation
…ights

add vessel identity flag change and MOU insight support
@lykmapipo lykmapipo merged commit 93e26f4 into develop Apr 29, 2026
4 checks passed
@lykmapipo lykmapipo deleted the feature/custom-region branch April 29, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants