Skip to content

expand vessel insights types, documentation, and test coverage#242

Open
lykmapipo wants to merge 13 commits intodevelopfrom
feature/additional-insights
Open

expand vessel insights types, documentation, and test coverage#242
lykmapipo wants to merge 13 commits intodevelopfrom
feature/additional-insights

Conversation

@lykmapipo
Copy link
Copy Markdown
Collaborator

This:

  • Add support for "VESSEL-IDENTITY-FLAG-CHANGES" and "VESSEL-IDENTITY-MOU-LIST" insight types
  • Update gfw_vessel_insights() documentation to reflect newly supported insights
  • Add usage examples for flag change history and Tokyo/Paris MOU list insights
  • Update JSON test fixtures to include vessel identity flag changes and MOU list data
  • Extend unit tests with additional structural assertions across period, gap, coverage, fishing, and vessel identity insights

This:
- add `get_vessel_insights()` for interacting with the vessels insights API
- add `with_gfw_json_fixture()` helper for loading fixture JSON files in tests
This also:
- export `get_vessel_insights` and update NAMESPACE
- improve validation, error messages, and date parsing
- default API key to `gfw_auth()`
- refactor request body construction for Insights API
- update examples, fixtures, and tests to match new interface
- reformat JSON fixtures for consistency and clarity
…tion tests

This:
- add `print_request` flag to optionally print the HTTP request for debugging
- fix typo in missing API token error message
- expand unit tests to cover NULL, NA, empty string, and envvar-based key errors
- improve documentation and examples for the new debug option
…bble

This:
- improve documentation with detailed @description, @details, and @examples
- normalize Insights API response into a single-row tibble with list-columns
- update unit tests to assert tibble structure and exact response mapping
This:
- addresses and closes #162
- rename `get_vessel_insights()` to `gfw_vessel_insights()`
- update roxygen examples to use new function name
- regenerate `NAMESPACE` to export `gfw_vessel_insights` instead of `get_vessel_insights`
- update all testthat references and expectations to use `gfw_vessel_insights`
…st coverage

This:
- expand insight types to include `"VESSEL-IDENTITY-FLAG-CHANGES"` and `"VESSEL-IDENTITY-MOU-LIST"`
- update `gfw_vessel_insights()` documentation to reflect additional insight types
- add examples demonstrating retrieval of flag change insights and Tokyo/Paris MOU list insights
- update JSON test fixtures to include flag change history and MOU list presence
- extend unit tests structural assertions for period, gap, coverage, fishing, and vessel identity
@lykmapipo lykmapipo self-assigned this Mar 16, 2026
@lykmapipo lykmapipo added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 16, 2026
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.

2 participants