Skip to content

Add new function: get_bibliography()#602

Open
PietrH wants to merge 65 commits into
mainfrom
587-get_bibliography
Open

Add new function: get_bibliography()#602
PietrH wants to merge 65 commits into
mainfrom
587-get_bibliography

Conversation

@PietrH

@PietrH PietrH commented Jun 29, 2026

Copy link
Copy Markdown
Member
  • Added a new function get_bibliography() that creates a data.frame of references based on a detections-like input data.frame.
  • Refactored check_value() to no longer use assertthat, and offer a shorter and more stylish message. When possible, offering suggestions for possible typo's:

check_value("2001_Loire", list_acoustic_project_codes(), name = "acoustic_project_code")
Error:
! Can't find acoustic_project_code: "2001_Loire" in: "2004_Gudena",
"2011_bovenschelde", "2011_Loire", …, "zeeschelde", or "ZRM_network". Did you mean
"2011_Loire"?

  • This change only affects check_value() calls on the client, I have not made any changes to {etnservice} which retains the same behavior as before this PR. This means that the messages generated by the API will remain very long (include all possible candidate codes) and will offer no suggestions. I can not inherit this function, because all OpenCPU messages are fetched as pure text, and the etn R package uses {cli}.
  • Is this change to the error messaging worth mentioning in NEWS?
  • Updated related documentation and field_definitions.tsv
  • The resulting bibliography now refers to the R package and the ETN data platform by it's paper. Both of these references are hard coded, for the R package only the version number automatically updates. I had a lot of trouble getting the output of citation("etn") to be consistent over platforms, and to get it into the shape that I wanted. So we ended up landing on hardcoding it in.
  • I might have to add a bit more to field_definitions.tsv, what do you think?
  • I've used the qs2 serializer for test fixtures (cached HTTP responses) to save space. See: https://qsbase.r-universe.dev/articles/qs2/vignette.html, related to Reduce package size: fixtures are quite big #491

@PietrH PietrH linked an issue Jun 29, 2026 that may be closed by this pull request
25 tasks
@PietrH PietrH self-assigned this Jun 29, 2026
@PietrH PietrH added this to the STRAITS 2026 milestone Jun 29, 2026
PietrH and others added 3 commits June 30, 2026 16:37
@PietrH PietrH force-pushed the 587-get_bibliography branch from 1e5510f to dd5872a Compare June 30, 2026 14:46
@PietrH PietrH mentioned this pull request Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.43590% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.05%. Comparing base (3a12c56) to head (ff43e93).

Files with missing lines Patch % Lines
R/utils.R 93.18% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #602      +/-   ##
==========================================
+ Coverage   94.80%   95.05%   +0.25%     
==========================================
  Files          33       34       +1     
  Lines        1559     1639      +80     
==========================================
+ Hits         1478     1558      +80     
  Misses         81       81              

☔ 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.

@PietrH PietrH marked this pull request as ready for review July 2, 2026 13:41
@PietrH PietrH requested review from CLAUMEMO and peterdesmet July 2, 2026 16:03
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.

get_bibliography()

1 participant