Skip to content

Commit da72718

Browse files
committed
Adding geos_ats to docs
1 parent 0be516b commit da72718

File tree

4 files changed

+63
-15
lines changed

4 files changed

+63
-15
lines changed

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
python_modules = ('geosx_mesh_tools_package',
2222
'geosx_xml_tools_package',
2323
'geosx_mesh_doctor',
24+
'geos_ats_package',
2425
'hdf5_wrapper_package',
2526
'pygeosx_tools_package',
2627
'timehistory_package')
@@ -61,7 +62,7 @@
6162
]
6263

6364

64-
autodoc_mock_imports = ["pygeosx", "pylvarray", "meshio", "lxml", "mpi4py", "h5py"]
65+
autodoc_mock_imports = ["pygeosx", "pylvarray", "meshio", "lxml", "mpi4py", "h5py", "ats"]
6566

6667
# The suffix(es) of source filenames.
6768
# You can specify multiple suffix as a list of string:

docs/geos_ats.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
GEOS ATS
3+
==========
4+
5+
The `geos_ats` python package includes tools for managing integrated tests for GEOS.
6+
It is built using the `Automated Test System <https://ats.readthedocs.io/en/latest/>`_ (ATS) package.
7+
The available console scripts for this package and its API are described below.
8+
9+
10+
run_geos_ats
11+
----------------
12+
13+
Primary entry point for running integrated tests.
14+
15+
.. argparse::
16+
:module: geos_ats.command_line_parsers
17+
:func: build_command_line_parser
18+
:prog: run_geos_ats
19+
20+
21+
.. note::
22+
Arguments can be passed to the underlying ATS system with the `--ats` argument.
23+
24+
25+
.. note::
26+
Other machine-specific options for ATS can be viewed by running `run_geos_ats --ats help`
27+
28+
29+
API
30+
------
31+
32+
33+
Restart Check
34+
^^^^^^^^^^^^^^^
35+
36+
.. automodule:: geos_ats.helpers.restart_check
37+
:members:
38+
39+
40+
Curve Check
41+
^^^^^^^^^^^^^^^
42+
43+
.. automodule:: geos_ats.helpers.curve_check
44+
:members:
45+
46+

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Packages
4343

4444
hdf5_wrapper
4545

46+
geos_ats
47+
4648
geosx_mesh_tools
4749

4850
geosx_xml_tools

geos_ats_package/geos_ats/helpers/restart_check.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,21 @@ def compareFloatArrays(self, path, arr, base_arr):
195195
Compares two arrays ARR and BASEARR of floating point values.
196196
Entries x1 and x2 are considered equal iff:
197197
198-
|x1 - x2| <= ATOL * ( 1 + max(|x2|) )
199-
- or -
200-
|x1 - x2| <= RTOL * |x2|.
198+
abs(x1 - x2) <= ATOL * ( 1 + max(abs(x2)) )
199+
or
200+
abs(x1 - x2) <= RTOL * abs(x2).
201201
202202
To measure the degree of difference a scaling factor q
203203
is introduced. The goal is now to minimize q such that:
204204
205-
|x1 - x2| <= ATOL * ( 1 + max(|x2|) ) * q
206-
- or -
207-
|x1 - x2| <= RTOL * |x2| * q.
205+
abs(x1 - x2) <= ATOL * ( 1 + max(abs(x2)) ) * q
206+
or
207+
abs(x1 - x2) <= RTOL * abs(x2) * q.
208208
209-
If RTOL * |x2| > ATOL * ( 1 + max(|x2|) )
210-
q = |x1 - x2| / (RTOL * |x2|)
209+
If RTOL * abs(x2) > ATOL * ( 1 + max(abs(x2)) )
210+
q = abs(x1 - x2) / (RTOL * abs(x2))
211211
else
212-
q = |x1 - x2| / ( ATOL * ( 1 + max(|x2|) ) ).
212+
q = abs(x1 - x2) / ( ATOL * ( 1 + max(abs(x2)) ) ).
213213
214214
If the maximum value of q over all the
215215
entries is greater than 1.0 then the arrays are considered
@@ -667,12 +667,11 @@ def findMaxMatchingFile(file_path):
667667
find and return the path of the greatest matching file/folder or None if no match is found.
668668
669669
FILE_PATH [in]: The pattern to match.
670-
670+
671671
Examples:
672-
".*" will return the file/folder with the greatest name in the current directory.
673-
674-
"test/plot_*.hdf5" will return the file with the greatest name in the ./test directory
675-
that begins with "plot_" and ends with ".hdf5".
672+
'.*' will return the file/folder with the greatest name in the current directory.
673+
'test/plot_*.hdf5' will return the file with the greatest name in the ./test directory
674+
that begins with 'plot' and ends with '.hdf5'.
676675
"""
677676
file_directory, pattern = os.path.split(file_path)
678677
if file_directory == "":

0 commit comments

Comments
 (0)