You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/geos_ats.rst
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,18 @@ Primary entry point for running integrated tests.
26
26
Other machine-specific options for ATS can be viewed by running `run_geos_ats --ats help`
27
27
28
28
29
+
Debugging
30
+
------------------
31
+
32
+
If for any reason you need to debug the geos_ats package, we recommend that you create a local copy of this entry point in the `build/integratedTests` directory: `geosPythonPackages/geos_ats_package/geos_ats/debug_geos_ats.py`.
33
+
This script is designed as a debugger entry point, and will read the autogenerated run script that was built during setup.
34
+
To use it, you must either have geos_ats installed in your target python environment, or a copy of geosPythonPackages in the expected location (`/usr/workspace/[username]/geosPythonPackages`).
35
+
36
+
We recommend that you use VSCode with the Python extension to debug geos_ats.
37
+
To begin the debugging session, you simply need to load the entry script, set any initial breakpoints you desire, then select the Debug run option.
38
+
Note that this approach can only be used to debug the python code associated with tests, and not the underlying GEOS tests.
Copy file name to clipboardExpand all lines: docs/index.rst
+45-10Lines changed: 45 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,30 +8,65 @@ Python Tools
8
8
Python Tools Setup
9
9
---------------------------------
10
10
11
-
The preferred method to setup the GEOSX python tools is to run the following command in the build directory:
11
+
The preferred method to setup the GEOS python tools is to run the following command in the build directory:
12
12
13
13
.. code-block:: bash
14
14
15
15
make geosx_python_tools
16
16
17
17
18
-
This will attempt to install the required packages into the python distribution indicated via the `Python3_EXECUTABLE` cmake variable (also used by pygeosx).
18
+
The ats setup command also sets up the python tools:
19
19
20
-
If the user does not have write access for the target python distribution, the installation will attempt to create a new virtual python environment (Note: this requires that the virtualenv package be installed).
20
+
.. code-block:: bash
21
+
22
+
make ats_environment
23
+
24
+
25
+
These will attempt to install the required packages into the python distribution indicated via the `Python3_EXECUTABLE` cmake variable (also used by pygeosx).
21
26
If any package dependencies are missing, then the install script will attempt to fetch them from the internet using pip.
22
-
After installation, these packages will be available for import within the associated python distribution, and a set of console scripts will be available within the GEOSX build bin directory.
27
+
After installation, these packages will be available for import within the associated python distribution, and a set of console scripts will be available within the GEOS build bin directory.
28
+
29
+
30
+
.. note::
31
+
To re-install or update an installed version of geosPythonTools, you can run the `make geosx_python_tools_clean` and `make geosx_python_tools` commands.
32
+
33
+
34
+
Manual Installation
35
+
---------------------------------
36
+
37
+
In some cases, you may need to manually install or update geosPythonPackages.
38
+
To do this, you can clone a copy of the geosPythonPackages repository and install them using pip:
23
39
24
-
Alternatively, these packages can be installed manually into a python environment using pip:
25
40
26
41
.. code-block:: bash
27
42
28
-
cd GEOSX/src/coreComponents/python/modules/geosx_mesh_tools_package
To upgrade an existing installation, the python executable in the above command should correspond to the version you indicated in your host config. If you have previously built the tools, this version will be linked in the build directory: `build_dir/bin/python`.
53
+
54
+
55
+
Development & Debugging
56
+
---------------------------
57
+
58
+
Be default, the python environment setup commands target the "main" branch of geosPythonTools.
59
+
To target another version of the tools, you can set the `GEOS_PYTHON_PACKAGES_BRANCH` cmake variable to the name of another valid branch (or git tag) in the host config file.
60
+
In this case, the code will pull the most recent commit of the desired branch when building geosPythonTools.
61
+
62
+
63
+
.. note::
64
+
If you are working on significant updates to geosPythonTools, you should open a testing branch in the main GEOS repository that defines the `GEOS_PYTHON_PACKAGES_BRANCH` variable. This will ensure that your changes are tested as part of the GEOS CI.
65
+
30
66
31
-
cd ../geosx_xml_tools_package
32
-
pip install --upgrade .
67
+
If you need to debug one of the packages in geosPythonTools, we recommend using VSCode with the Python extension installed.
68
+
Some of the packages contain specific entry point scripts that can be used to assist in this process.
0 commit comments