From 7bab82a653e044780416f79ce2dc8fec8f062c25 Mon Sep 17 00:00:00 2001 From: jayantbhakar Date: Sun, 30 Oct 2022 17:28:36 +0530 Subject: [PATCH] added documentation for using refdata --- .../development/running_tests.rst | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/contributing/development/running_tests.rst b/docs/contributing/development/running_tests.rst index 702ee0b088d..45b752f865a 100644 --- a/docs/contributing/development/running_tests.rst +++ b/docs/contributing/development/running_tests.rst @@ -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 `_). +(`tardis-refdata `_). +`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 ===========================