Library to locate Ansys products in a local machine.
At least two installation modes are provided: user and developer.
In order to install ansys-tools-path
, make sure you
have the latest version of pip. To do so, run:
python -m pip install -U pip
Then, you can simply execute:
python -m pip install ansys-tools-path
Installing ansys-tools-path
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 need to follow these steps:
Start by cloning this repository:
git clone https://github.com/ansys/ansys-tools-path
Create a fresh-clean Python environment and activate it:
# 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 required build system and doc, testing, and CI tools:
python -m pip install .[tests] python -m pip install .[doc] python -m pip install .[build]
Install the project in editable mode:
python -m pip install --editable ansys-tools-path
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 the reason why tools like tox exist.
The style checks take advantage of pre-commit. Developers are not forced but encouraged to install this tool via:
python -m pip install pre-commit && pre-commit install
For building documentation, you can either run the usual rules provided in the Sphinx Makefile, such us:
make -C doc/ html && your_browser_name doc/html/index.html
If you would like to create either source or wheel files, start by installing the building requirements and then executing the build module:
python -m pip install .[build]
python -m build
python -m twine check dist/*