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

Add some basic tests #8

Closed
gareth-j opened this issue Mar 1, 2023 · 3 comments
Closed

Add some basic tests #8

gareth-j opened this issue Mar 1, 2023 · 3 comments
Assignees

Comments

@gareth-j
Copy link
Contributor

gareth-j commented Mar 1, 2023

No description provided.

@gareth-j
Copy link
Contributor Author

gareth-j commented Mar 1, 2023

I added some very simple tests for load_json with #9

@EricSaboya EricSaboya added this to the March 2023 Code Retreat milestone Mar 15, 2023
@brendan-m-murphy brendan-m-murphy self-assigned this Aug 15, 2023
@brendan-m-murphy
Copy link
Contributor

I'm going to add a test that runs a full inversion. Hopefully I can make this reasonably fast.

So far, the things I can think of testing with a full inversion are:

  1. the inversion runs without errors
  2. by storing the result of the inversion with the current set up (and fixing random seeds), checking if the results are equal (or very close to) the stored result. Since assessing if the results of an inversion are "correct" is pretty difficult, I want to be able to test if changes are altering the way the inversion works. (For initial tidying of the code, I don't want to change the actual results.)

If anyone has any other testable ideas, let me know. These first tests are just for checking that changes don't break the code. As I tidy things up, I should be able to test individual components.

I will probably just use CH4 data and one site, but I could add more types of data. It would be nice to create synthetic data, but I haven't thought about what that would look like.

Later, I'll make tests for performance. I think running pytest on Blue Pebble should work, so I should be able to run "profiling" tests there. Maybe it would be easier to just write some scripts for performance testing, since they need to be run on BP (or Blue Crystal). Anyway, the current goal is to get enough tests to be able to change the code without worrying that it's breaking.

@gareth-j
Copy link
Contributor Author

Done with #25

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

3 participants