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

R functions to write tests on #86

Open
14 tasks
lilyclements opened this issue May 11, 2022 · 4 comments
Open
14 tasks

R functions to write tests on #86

lilyclements opened this issue May 11, 2022 · 4 comments

Comments

@lilyclements
Copy link
Collaborator

lilyclements commented May 11, 2022

Check if we can remove the following R files without it impacting elsewhere:

  • convert_to_dec_deg.R
  • get_lon_from_data.R
  • get_lat_from_data.R
  • lat_lon_dataframe.R

Need to create tests on:

  • Export functions (possibly: call prepare function, export as CSV. Run export function (creates second CSV). Read in both CSVs, and check same data frame. Use short data to test this.)
  • Plot functions
  • make_factor
  • prepare_geoclim_* functions
  • spells function
  • CPT (perhaps split this into a prepare and export function)
  • summarise_inventory_data function
  • wwr_export (should output textfile should be this text. so can write it and compare)
  • export_climat_messages function
  • export_* functions contain ... parameters. Please add tests that pass ... parameters that have an observable impact on the converted file
@lilyclements
Copy link
Collaborator Author

@lloyddewit how are you testing export functions in python?

@lloyddewit
Copy link
Collaborator

@lloyddewit how are you testing export functions in python?

@lilyclements I duplicate the tests in the test_*.R files here.

Currently, in the main branch, there aren't any tests for the export_*.R functions.

However, @HawardKetoyoMsatsi has submitted several PRs that propose tests for the export functions. In the Python layer, I initially implemented the tests in PR #78 . I'll also implement the tests in the other PRs, plus any other tests that are added.

In summary, if you (or @HawardKetoyoMsatsi ) can add new export tests, then I'll add these tests to the Python layer.

@lloyddewit
Copy link
Collaborator

@lilyclements I added a new task to the PR description:

  • export_* functions contain ... parameters. Please add tests that pass ... parameters that have an observable impact on the converted file

Currently the Python wrapper does not support ... parameters but I would like to add this feature so I'd really appreciate a test that I could run directly in R, and also via the Python wrapper.

To start, it's enough for me if you could specify a single test just as a comment in this PR.

Thanks!

@lloyddewit
Copy link
Collaborator

@lilyclements I added a new task to the PR description to add a test for:

  • export_climat_messages function

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

No branches or pull requests

2 participants