Testing | |
Package | |
Other |
This library proposes an implementation for a datamodel tailored for AI and ML learning of physics problems. It has been developped at SafranTech, the research center of Safran group.
- Documentation: https://plaid-lib.readthedocs.io/
- Source code: https://github.com/PLAID-lib/plaid
- Contributing: https://github.com/PLAID-lib/plaid/blob/main/CONTRIBUTING.md
- License: https://github.com/PLAID-lib/plaid/blob/main/LICENSE.txt
- Bug reports: https://github.com/PLAID-lib/plaid/issues
- Report a security vulnerability: https://github.com/PLAID-lib/plaid/issues
To use the library, the simplest way is to install it as follows:
conda install -c conda-forge plaid
or
pip install pyplaid
To contribute to the library, you need to clone the repo using git:
git clone https://github.com/PLAID-lib/plaid.git
To configure an environment manually, you can follow the dependencies listed in environment.yml
, or generate it using conda:
conda env create -f environment.yml
Then, to install the library:
pip install -e .
Note
The development dependency Muscat is available on conda-forge
but not on PyPi
.
To check the installation, you can run the unit test suite:
pytest tests
To test further and learn about simple use cases, you can run and explore the examples:
cd examples
bash run_examples.sh # [unix]
run_examples.bat # [win]
To compile locally the documentation, you can run:
cd docs
make html
Various notebooks are executed during compilation. The documentation can then be explored in docs/_build/html
.
We use Ruff for linting and formatting.
The configuration is defined in ruff.toml
, and some folders like docs/
and examples/
are excluded from checks.
You can run Ruff manually as follows:
ruff --config ruff.toml check . --fix # auto-fix linting issues
ruff --config ruff.toml format . # auto-format code
Pre-commit is configured to run the following hooks:
- Ruff check
- Ruff format
- Pytest
The selected hooks are defined in the .pre-commit-config.yaml
file.
To run all hooks manually on the full codebase:
pre-commit run --all-files
You can also run (once):
pre-commit install
This ensures that every time you commit, all the hooks are executed automatically on the staged files.
The PLAID project welcomes your expertise and enthusiasm!
Small improvements or fixes are always appreciated.
Writing code isn’t the only way to contribute to PLAID. You can also:
- review pull requests
- help us stay on top of new and old issues
- develop tutorials, presentations, and other educational materials
- maintain and improve our documentation
- help with outreach and onboard new contributors
If you are new to contributing to open source, this guide helps explain why, what, and how to successfully get involved.
The documentation is deployed on readthedocs.