A pythonic remotable interface to RedhawkSC and TotemSC
At least two installation modes are provided: user and developer.
User installation can be performed by running:
python -m pip install ansys-seascape
Installing PySeaScape Library in developer mode allows you to modify the source and enhance it.
Before contributing to the project, please refer to the PyAnsys Developer's guide. You will need to follow these steps:
Start by cloning this repository:
git clone https://github.com/pyansys/pyseascape
Create a fresh-clean Python environment and activate it. Refer to the official venv documentation if you require further information:
# Create a virtual environment python -m venv .venv # Activate it in a POSIX system source .venv/bin/activate # Activate it in Windows CMD environment .venv\Scripts\activate.bat # Activate it in Windows Powershell .venv\Scripts\Activate.ps1
Make sure you have the latest version of pip:
python -m pip install -U pip
Install the project in editable mode:
python -m pip install --editable ansys-seascape-library
Install additional requirements (if needed):
python -m pip install -r requirements/requirements_build.txt python -m pip install -r requirements/requirements_doc.txt python -m pip install -r requirements/requirements_tests.txt
Finally, verify your development installation by running:
python -m pip install -r requirements/requirements_tests.txt pytest tests -v
If required, you can always call the style commands (black, isort, flake8...) or unit testing ones (pytest) from the command line. However, this does not guarantee that your project is being tested in an isolated environment, which is another reason to consider using tox.
For building documentation, you can either run the usual rules provided in the Sphinx Makefile, such us:
python -m pip install -r requirements/requirements_doc.txt
make -C doc/ html
# subsequently open the documentation with (under Linux):
your_browser_name doc/html/index.html
If you would like to create either source or wheel files, start by installing the building requirements:
python -m pip install -r requirements/requirements_build.txt
Then, you can execute:
python -m build python -m twine check dist/*