Quickstart ---------- In this section, you will find information on how to quickly run this module after a few simple steps. In order to use the most up-to-date function version of the Partial Pressures EoS module, replace ```` in the following instructions by the version indicated on the |CE-registry|_ webpage. On the Calculation Engine (CE) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to run the Partial Pressures module on the MUSES |CE|_, refer to the `user manual's Quick Start Guide `__ to find instructions and exemples on how to submit jobs and retrieve the run outputs. Partial Pressures module's characteristics to know when running on CE: - **Name:** ``'partial_press'`` is the name of the module in the |CE-registry|_ Locally ~~~~~~~ Using Docker ^^^^^^^^^^^^ The quickest way to run the Partial Pressures module on your machine is by using the Docker container. First, make sure that you have `Docker `__ locally installed on your machine. 1. Pull Docker image '''''''''''''''''''' The recommended way to obtain the Partial Pressures Docker container is to pull the latest version from the GitLab Container Registry:: docker pull registry.gitlab.com/nsf-muses/partial-pressures:{TAG} 2. Run the module from the container '''''''''''''''''''''''''''''''''''' In order to run this container, you must at least have a minimal project directory, with an **input/** folder containing a |config|_ file that is used to define the module's parameters for the run, and and **output/** folder. More information about the content of the |config|_ file can be found in the module's |specs|_ and can be changed based on the user's requirements. A code block for how the config.yaml file is also provided below. .. code-block:: yaml chis_input_directory: input/New_chis/ chis_file_extension: _30-2000.dT1 output_format: csv Once you have defined the parameters of your choice, you can run the container:: export DOCKER_IMAGE_NAME=registry.gitlab.com/nsf-muses/partial_pressures export DOCKER_IMAGE_TAG= docker run -it --rm --name Part_Press \ -v "${PWD}/input:/opt/input" \ -v "${PWD}/output:/opt/output" \ $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG python MUSES_Wrapper.py input/config.yaml The output files will appear in the **output/** directory upon completion. Without Docker ^^^^^^^^^^^^^^ In order to run the module without Docker, one has to copy the |repo|_ on their local machine, and install the required libraries listed in |requir|_. Start by downloading the |repo|_ on your machine, either by going to the webpage and downloading it, or by using the command line:: git clone --depth 1 --branch https://gitlab.com/nsf-muses/partial-pressures.git 1. Install required packages '''''''''''''''''''''''''''' If you are willing to run the module locally, you need an up-to-date version of `python3 `__ installed, including the following packages (listed in |requir|_): - `numpy `__ - `pyyaml `__ - `openapi-core `__ - `muses_porter `__ **Note:** we do recommend the use of a Python virtual environment to avoid potential conflicts with your local package installation. To create and activate a virtual environment, execute the following commands:: python3 -m venv .venv source .venv/bin/activate Whenever you need to deactivate the virtual environment, simply type ``deactivate``. These libraries can all be easily installed using the ``pip`` package manager. Moreover, one can proceed by calling directly |requir|_, using:: pip install --user -r partial-pressures/requirements.txt If the installation of the Porter fails by this method, see more detailed instructions in the Porter `README `__. 2. Run the module ''''''''''''''''' 1. Once all of the dependencies are successfully installed, all that's left to do is run the module. First make sure that you have created a |config|_ file containing the module configuration in the **input/** directory. Then run:: python3 MUSES_Wrapper.py input/config.yaml The output files will appear in the **output/** directory upon completion. 2. Alternatively, you can run the source code directly using the source code:: python src/Partial_Pressure_Equations.py ./input/Chis/ ./output extension --output_format_extension csv .. ------------------- | Fixed variables | ------------------- .. |repo| replace:: Partial Pressures repository .. _repo: https://gitlab.com/nsf-muses/partial-pressures .. |requir| replace:: **requirements.txt** .. _requir: https://gitlab.com/nsf-muses/partial-pressures/-/blob/main/requirements.txt?ref_type=heads .. |config| replace:: **config.yaml** .. _config: https://gitlab.com/nsf-muses/partial-pressures/-/blob/main/input/config.yaml?ref_type=heads .. |specs| replace:: OpenAPI specifications .. _specs: https://gitlab.com/nsf-muses/partial-pressures/-/blob/main/api/OpenAPI_Specifications-PartPress.yaml?ref_type=heads .. |CE| replace:: CE .. _CE: https://ce.musesframework.io/ .. |CE-registry| replace:: CE modules registry .. _CE-registry: https://ce.musesframework.io/ce/modules/