Skip to content

Add version() function#299

Open
peterdesmet wants to merge 13 commits into
mainfrom
version
Open

Add version() function#299
peterdesmet wants to merge 13 commits into
mainfrom
version

Conversation

@peterdesmet

@peterdesmet peterdesmet commented Jun 18, 2026

Copy link
Copy Markdown
Member

Fix #262

  • Add version() function to detect what version of the Data Package standard is used.
  • Unlike camtrapdp, does NOT store the version as an attribute or property to the Data Package (it's always determined anew with version())
  • I did not implement a version()<- function as described in Detect Data Package version with version() function #262: setting/upgrading a version will be more complex and require a upgrade_package() function.

Extra:

  • Ignore positai

@peterdesmet
peterdesmet requested a review from sannegovaert June 18, 2026 15:36
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (397009d) to head (b35c08d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #299   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        24    +1     
  Lines          672       687   +15     
=========================================
+ Hits           672       687   +15     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@peterdesmet peterdesmet added this to the 1.3.0 milestone Jun 19, 2026

@sannegovaert sannegovaert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread R/version.R
#' Determines what version of the [Data Package standard](
#' https://datapackage.org/) is used by a Data Package, based on the
#' [`$schema`](https://datapackage.org/standard/data-package/#dollar-schema)
#' property.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to list the current options at the end of this sentence:
"1.0", "2.0", ">=2.0"

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.

Detect Data Package version with version() function

2 participants