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

Feature/29 convert wl_convert_units() to generic #30

Merged
merged 14 commits into from
Aug 12, 2021

Conversation

GegznaV
Copy link
Member

@GegznaV GegznaV commented Aug 3, 2021

Closes #29

wl(x) <- wl_new

x@label$.wavelength <-
switch(.wl_fix_unit_name(to),
Copy link
Member Author

Choose a reason for hiding this comment

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

Create a separate function that is based on this switch sentence.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will be addressed in a separate PR. See:

@GegznaV GegznaV added this to the 1.0 CRAN submission milestone Aug 12, 2021
Copy link
Contributor

@bryanhanson bryanhanson left a comment

Choose a reason for hiding this comment

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

Alright, if I understand this function I see 2 items for your consideration:

  1. This line #' @param x Data for conversion. would be clearer if it read #' @param x Data to be converted. Either a hyperSpec object or a numeric or integer vector.
  2. This UT test_that("wl_convert_units.hyperSpec works", { actually tests both ...units.hyperSpec and ...units.default You may wish to separate them.

I leave it up to you to decide if these items are worth changing. OK to merge either way.

@GegznaV
Copy link
Member Author

GegznaV commented Aug 12, 2021

Thank you, @bryanhanson, for the quick review!

@GegznaV GegznaV merged commit a14c9c8 into develop Aug 12, 2021
@GegznaV GegznaV deleted the feature/29-wl_convert_units-generic branch August 12, 2021 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert wl_convert_units into generic
2 participants