Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first functions to support reading Camtrap DP #15

Merged
merged 25 commits into from
Mar 14, 2024
Merged

Conversation

peterdesmet
Copy link
Member

@peterdesmet peterdesmet commented Mar 6, 2024

read_camtrap_dp()

  • Will abort if an unrecognized version is supplied. This stops unnecessary reading of files
  • Read a dataset (with frictionless::read_package()
  • Reads data as df
  • Converts to latest version if necessary using convert()
  • Has a test for unsupported versions

convert()

  • Will convert a dataset to the latest version
  • Currently only supports one Camtrap DP version (1.0), so no conversion is done, but the template is there to support it in the future

version()

  • Inspired by camtraptor::get_version()
  • But also requires camtrap-dp to be present
  • Can also derive the version attribute
  • Does not have stringr dependency
  • Has tests

@peterdesmet
Copy link
Member Author

@sangovae can you review this pull request (PR)? Ping me on chat if you have questions. /cc @damianooldoni

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 85.36585% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 85.36%. Comparing base (b92a901) to head (9ecceb0).

Files Patch % Lines
R/convert.R 25.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           main      #15       +/-   ##
=========================================
+ Coverage      0   85.36%   +85.36%     
=========================================
  Files         0        3        +3     
  Lines         0       41       +41     
=========================================
+ Hits          0       35       +35     
- Misses        0        6        +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peterdesmet peterdesmet mentioned this pull request Mar 13, 2024
@peterdesmet peterdesmet merged commit 4316ffb into main Mar 14, 2024
9 checks passed
@peterdesmet peterdesmet deleted the first_functions branch March 14, 2024 11:05
@peterdesmet peterdesmet added this to the code sprint (v1) milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants