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

added documentation for using particular refdata files for unit testing #2142

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/contributing/development/running_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,38 @@ tests, you can run this with:

Running the more advanced unit tests requires TARDIS Reference data that can be
downloaded
(`tardis_refdata <https://github.com/tardis-sn/tardis-refdata>`_).
(`tardis-refdata <https://github.com/tardis-sn/tardis-refdata>`_).
`Git LFS <https://www.atlassian.com/git/tutorials/git-lfs>`_ is used
to download the large refdata files in the tardis-refdata repository.

However, it is not required to download the entire repository. Firstly it is
important to identify the refdata files that are needed. Sometimes, it is possible
that a preused fixture that is also being used in the current tests is using some
refdata. So, it is advised to check for such cases beforehand.

After identifying the refdata files to be used in the unit tests, those particular
files can be downloaded using ``git lfs``

.. code-block:: shell

> git lfs pull --include=filename

It is important to maintain the same directory structure as the tardis-refdata repo
i.e. the lfs files should be in the same directory tree exactly as in tardis-refdata
repository.

Finally, the tests can be run using the following command

.. code-block:: shell

> pytest tardis --tardis-refdata=/path/to/tardis-refdata/

Or, to run tests for a particular file or directory

.. code-block:: shell

> pytest tardis/path/to/test_file_or_directory --tardis-refdata=/path/to/tardis-refdata/

Generating Plasma Reference
===========================

Expand Down