Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.34 KB

CONTRIBUTING.md

File metadata and controls

50 lines (38 loc) · 1.34 KB

Contributing

If you've spotted a problem with this package or have a new feature request please open an issue or a submit a PR.

Set up dev environment

git clone https://github.com/PaddleHQ/paddle-python-sdk && \
cd paddle-python-sdk && \
pip install .[dev]

Pre-commit hooks

After installing dev dependencies, install pre-commit hooks to run codestyle requirements:

pre-commit install

Run tests

Python pytest tests can be run either by changing into the paddle-python-sdk, activating the venv, and running pytest, or by running pytest directly

cd paddle-python-sdk && .venv/bin/pytest
cd paddle-python-sdk && \
source .venv/bin/activate && \
pytest

You can run specific tests by passing a parameter to pytest. For example, you can run all tests within a directory:

pytest tests/Unit

Or you can run an individual test within a file:

pytest tests/Unit/Notification/test_Verifier.py::TestVerifier::test_validate_paddle_signature_header_integrity

Use the command deactivate to exit the venv.

Codestyle

This project uses flake8 to enforce codestyle requirements.

To format code run:

black .