FormingWorlds / JANUS

1-D prescribed atmosphere model of planetary atmospheres that makes use of the SOCRATES radiative transfer code.
https://fwl-janus.readthedocs.io
Apache License 2.0
1 stars 0 forks source link

Testing #22

Closed lsoucasse closed 4 months ago

lsoucasse commented 4 months ago

This work adds two tests to Janus based on the two demo files (instellation and runaway_greenhouse): it basically checks all the computed values with previous ones with a given tolerance. A GitHub action is set up to run them using pytest for each push/pull request.

This should close issue #21 and #19 .

The demo scripts and the main Janus script (SocRadConv.py) are now in the examples folder. We can turn them into notebook tutorials potentially.

nichollsh commented 4 months ago

Looks great. Might be better to have the workflows run on either push or PR, not both. Seems redundant to have them both running.

I think that testing the runaway greenhouse is good, as well as this energy balance script. They both cover a wide temperature range, and are pretty key to the simulations.

lsoucasse commented 4 months ago

Looks great. Might be better to have the workflows run on either push or PR, not both. Seems redundant to have them both running.

I think that testing the runaway greenhouse is good, as well as this energy balance script. They both cover a wide temperature range, and are pretty key to the simulations.

Thanks for your feedback Harrison. I like having the tests running at each push, so that it is easier to spot potential problems. I agree then running tests at PR is redundant but to me it does not hurt.

nichollsh commented 4 months ago

Fair enough. I think that moving SocRadConv.py into examples/ makes sense too - since it's more of an executable than an importable part of the package.