-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #481 from HajimeKawahara/releasev1.5
Release v1.5
- Loading branch information
Showing
243 changed files
with
19,371 additions
and
4,788 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,47 @@ | ||
Test codes for developers | ||
============================== | ||
|
||
ExoJAX has many test codes in 'tests' directory. | ||
We recommend to write the unit test code in 'tests' directory before pull-request and to perform the unit tests before your submission of the pull-request: | ||
ExoJAX has many test codes in the ``tests`` directory. The ``test`` directory contains several types of the collection of ``pytest`` code. | ||
|
||
.. code:: sh | ||
cd exojax | ||
pytest tests | ||
- ``tests/unittests``: the collection of the unit tests. The GitHub action runs the test code in this directory. | ||
- ``tests/integration``: the collection of the test codes that need longer time to run than the code in ``unittest``. | ||
|
||
You might need some files. | ||
test/unittests | ||
--------------------- | ||
|
||
- VALD data | ||
|
||
You can download them from `here <http://secondearths.sakura.ne.jp/exojax/data/>`_, but see the following warning. | ||
|
||
.. warning:: | ||
|
||
Note that if you use Windows or Mac, .gz might be unziped when downloading despite no renaming. I mean, the same name with .gz, but unziped! In this case, download ``extradata.tar`` and untar it. | ||
|
||
|
||
Unit test using pytest | ||
---------------------------- | ||
|
||
Before starting the unit test, install pytest: | ||
We recommend to write the unit test code in ``tests/unittests`` directory before pull-request and to perform the unit tests before your submission of the pull-request: | ||
|
||
.. code:: sh | ||
pip install pytest | ||
cd exojax/test/unittests | ||
pytest | ||
To test all of the unit tests, perform | ||
test/integration/unittest_long | ||
---------------------------------- | ||
|
||
.. code:: sh | ||
In essence, these are the unit tests that need longer time than the code in ``unittest``, sometimes including downloading the data. | ||
|
||
cd exojax | ||
pytest tests | ||
test/integration/comparison | ||
--------------------------- | ||
|
||
or you can test one by one | ||
The code for the comparison with external data, packages, etc | ||
|
||
.. code:: sh | ||
- ``transmission/comparison_with_kawashima_transmission.py``: comparison with Yui Kawashima's computation of the transmission spectrum | ||
- ``twostream/comparison_petitRADTRANS_*.py``: comparison with pRT | ||
- ``nonair/nonair_co_hitran_comp.py``: non-air broadening comparison with ``radis`` | ||
|
||
cd tests/auto | ||
pytest autoxs_test.py | ||
|
||
|
||
Tests for the reverse modeling (retrieval) | ||
----------------------------------------------- | ||
Others | ||
-------------- | ||
|
||
The unit test is not appropriate for the reverse modeling because it takes a lot of time. | ||
For the tests of the reverse modeling, use code in 'tests/reverse' directory. | ||
VALD data | ||
^^^^^^^^^^^^^^^^ | ||
|
||
- reverse_lpf.py simple test for HMC-NUTS using LPF | ||
- reverse_methane.py simple test for HMC-NUTS using MODIT | ||
You can download them from `here <http://secondearths.sakura.ne.jp/exojax/data/>`_, but see the following warning. | ||
|
||
.. code:: sh | ||
.. warning:: | ||
|
||
Note that if you use Windows or Mac, .gz might be unziped when downloading despite no renaming. I mean, the same name with .gz, but unziped! In this case, download ``extradata.tar`` and untar it. | ||
|
||
cd tests/reverse | ||
python reverse_lpf.py | ||
python reverse_methane.py |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.