Contribute#
Overall guidance on contributing to a PyAnsys library appears in the Contributing topic in the PyAnsys Developer’s Guide. Ensure that you are thoroughly familiar with this guide before attempting to contribute to PyMotorCAD.
The following contribution information is specific to PyMotorCAD.
Clone the repository#
Run this code to clone and install the latest version of PyMotorCAD in development mode:
git clone https://github.com/ansys/pymotorcad
cd pymotorcad
pip install --editable ansys-motorcad-core
Post issues#
Use the PyMotorCAD Issues page to submit questions, report bugs, and request new features. When possible, use these issue templates:
Bug report template
Feature request template
Documentation issue template
If your issue does not fit into one of these categories, create your own issue.
To reach the project support team, email pyansys.core@ansys.com.
View PyMotorCAD documentation#
Documentation for the latest stable release of PyMotorCAD is hosted at PyMotorCAD Documentation.
In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.
Adhere to code style#
PyMotorCAD is compliant with the PyAnsys code style. it uses the tool pre-commit to enforce the code style. You can install and activate this tool with this code:
pip install pre-commit
pre-commit run --all-files
You can also install this tool as a pre-commit hook by running this command:
pre-commit install
This way, it’s not possible for you to push code that fails the style checks. For example:
$ pre-commit install
$ git commit -am "Add a new feature."
black....................................................................Passed
blacken-docs.............................................................Passed
isort....................................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
pydocstyle...............................................................Passed
check for merge conflicts................................................Passed
debug statements (python)................................................Passed
Validate GitHub Workflows................................................Passed