Skip to content

Latest commit

 

History

History
132 lines (82 loc) · 3.25 KB

README.rst

File metadata and controls

132 lines (82 loc) · 3.25 KB

PySeaScape Library

A pythonic remotable interface to RedhawkSC and TotemSC

How to install

At least two installation modes are provided: user and developer.

For users

User installation can be performed by running:

python -m pip install ansys-seascape

For developers

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:

  1. Start by cloning this repository:

    git clone https://github.com/pyansys/pyseascape
  2. 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
  3. Make sure you have the latest version of pip:

    python -m pip install -U pip
  4. Install the project in editable mode:

    python -m pip install --editable ansys-seascape-library
  5. 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
  6. Finally, verify your development installation by running:

    python -m pip install -r requirements/requirements_tests.txt
    pytest tests -v

Style and Testing

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.

Documentation

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

Distributing

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/*