1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
# Contributing
## The basics
Your help is appreciated and welcome!
The _master_ branch is meant to hold the release code. At any time this should be
identical to the code available on PyPI.
PRs will be pushed on the _development_ branch if the actual package code is changed. When the time comes this branch
will be merged to the _master_ branch and a new release will be issued.
PRs that deal with documentation, and other adjacent files (README for example) can be pushed to the _master_ branch.
When submitting PRs please take into account:
- the project's goals
- PEP8 and the style guide below
## Developer instructions
Clone the repository with submodules, make sure you have a C compiler installed, then install the development dependencies (we recommend using a virtual environment):
```bash
python -m venv .venv # create virtual environment in .venv
source .venv/bin/activate # activate virtual environment (POSIX)
.venv\Scripts\activate.bat # activate virtual environment (Windows)
pip install --requirement requirements.txt # install development dependencies (includes asammdf in editable mode)
```
Now you can start developing. If you are using VSCode, the virtual environment should be detected automatically. If not, open the command panel `Ctrl + Shift + P` and search for `Python: Select Interpreter`.
## Testing
You can use tox to run tests locally. Example for the unit tests with Python version 3.10:
```console
tox -e py310
```
Otherwise, you can just push and the tests will be run by GitHub Actions.
## Style guide
Just run [`ruff format`](https://docs.astral.sh/ruff/formatter/) on modified files before sending the PR. There is no need to reinvent the wheel here!
**Tip**: install Git hooks using pre-commit `pre-commit install --install-hooks`
|