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

Converted tests to use BaseRegTest #52

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
*.fmt
*.lay
*.plt
*.cgns
*.out
*.egg-info
doc/tmp.rst
doc/_build
28 changes: 18 additions & 10 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,42 @@ Compilation
pyHyp follows the standard MDO Lab build procedure.
To start, first clone the repo. For stability we recommend checking out a tagged release.

Next, find a configuration file close to your current setup in::
Next, find a configuration file close to your current setup in ``config/defaults`` and copy it to ``config/config.mk``.
For example:

$ config/defaults
.. prompt:: bash

and copy it to ``config/config.mk``. For example::

$ cp config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk config/config.mk
cp config/defaults/config.LINUX_GFORTRAN_OPENMPI.mk config/config.mk

If you are a beginner user installing the packages on a Linux desktop,
you should use the ``config.LINUX_GFORTRAN_OPENMPI.mk`` versions of the configuration
files. The ``config.LINUX_INTEL.mk`` versions are usually used on clusters.

Once you have copied the config file, compile pyHyp by running::
Once you have copied the config file, compile pyHyp by running:

.. prompt:: bash

$ make
make

If everything was successful, the following lines will be printed to
the screen (near the end)::

Testing if module hyp can be imported...
Module hyp was successfully imported.

Finally, install the Python interface with::
Finally, install the Python interface with:

.. prompt:: bash

pip install .

Testing Your Installation
-------------------------

To test your installation, you can run some of the scripts in the ``examples`` folder or run the regression tests with ``testflo -v`` from the root directory.
Some of the examples require you to have `cgnsUtilities <https://github.com/mdolab/cgnsutilities>`_ installed.
To test your installation, run the regression tests with ``testflo -v`` from the root directory.
Running the tests requires additional dependencies.
Check if you have these installed by running:

.. prompt:: bash

pip install .[testing]
10 changes: 5 additions & 5 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Tutorial
========

A complete sample script to generate a grid is given below. This
particular example is available under `examples/BWB/runBWB.py`.
particular example is available under `tests/BWB/runBWB.py`.

.. literalinclude:: ../examples/BWB/runBWB.py
.. literalinclude:: ../tests/BWB/runBWB.py

Each section of the example is now described.

.. literalinclude:: ../examples/BWB/runBWB.py
.. literalinclude:: ../tests/BWB/runBWB.py
:start-after: # rst import (start)
:end-before: # rst import (end)

Expand All @@ -23,7 +23,7 @@ explained in :ref:`pyhyp_options`.

The next line of code

.. literalinclude:: ../examples/BWB/runBWB.py
.. literalinclude:: ../tests/BWB/runBWB.py
:start-after: # rst object
:end-before: # rst run

Expand All @@ -44,7 +44,7 @@ generates the pyHyp object.
The next two lines perform the actual generation and write the
resulting grid to a cgns file:

.. literalinclude:: ../examples/BWB/runBWB.py
.. literalinclude:: ../tests/BWB/runBWB.py
:start-after: # rst run

The output of the run should look similar to the following::
Expand Down
Loading