Skip to content

Conversation

@js3110
Copy link
Collaborator

@js3110 js3110 commented Jan 2, 2026

Issue

Closes #836

Description

If units are not known by the units package, the app was crashing due to the simplify_units function for simplifying the volume units. I have updated this function to return a warning rather than stop if the units are not recognised, so that more non-traditional units (eg cells) can still be used.

Definition of Done

  • App does not crash if non traditional units are used
  • Gives warning that simplification was not possible

How to test

Using dummy_RO_cells in testthat/data folder, run through and check that the app doesn't crash with the units, or try your own dataset with different units.

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented

Notes to the Reviewer

I have added the dummy dataset to make it easier to test, we can remove it before I merge or keep it for testing purposes, let me know what you think is best :)

@js3110 js3110 linked an issue Jan 2, 2026 that may be closed by this pull request
@js3110 js3110 marked this pull request as ready for review January 2, 2026 14:01
@js3110 js3110 requested review from Gero1999, Shaakon35, jitendar-reddy and m-kolomanski and removed request for Gero1999 January 2, 2026 14:02
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.

Bug: App crashes if unknown units in AVALU or DOSEU

2 participants