🎉 Thank you for your interest in contributing to this project! 🎉
A couple of quick items:
-
To avoid duplicate issues and PRs, please search open issue and pull requests before submitting a new one.
-
The general expectation is to submit a GitHub issue to receive feedback before submitting a pull request (PR) with changes.
- This will help ensure ideas align with the project scope.
-
Unit tests should accompany Pull Requests (PRs) whenever possible. 👈
- This could mean adding additional tests to an existing unit test file or creating a new one.
(in no particular order)
- Code
- Documentation
- Expanding Unit Test coverage (where needed)
- Helping others (ex: with issue tickets)
For minimal dependencies, the "batteries included" Python unittest
framework
is utilized. (Other testing frameworks could be considered should additional
testing features be needed.)
Testing can be invoked via make test
(more information below)
- Python 3
- GNU Make
- Docker (Engine)
Important
If your development workstation has a security access control (ex: SELinux) enabled, you will need to put it in a permissive mode for the Docker bind mounts to function.
This section consists of suggestions.
It is recommended to verify tests are successful before making any code changes. From there make your changes and run the unit tests to validate there is not code regression.
-
- If you have an existing fork of this project be sure to synchronize it!
-
From the
main
branch of your fork, create a feature branch -
Validate test cases run successfully before any changes are made
-
Verify linting and formatting checks run successfully before making any changes
-
Make modifications
-
Re-test with the existing unit tests against the modified codebase
-
Add any additional unit tests to improve testing coverage
-
Re-run the unit tests to confirm they run successfully
-
Re-run linting and formatting checks
-
Fix up any linting or formatting errors
-
When you are satisfied with the changes and it is ready for review, submit a Pull Request (PR)
This project uses GNU make
to simplify the action of interacting with several
linters and performing unit testing.
Project dependencies and Python virtual environment are managed with uv
.
- Install GNU
make
for your operating system - Install Docker (Engine)
- lint and test
make all
# or simply
make
- Removes the Docker images this Makefile utilizes
make clean
make lint
make mdlint
make ruff
make yamllint
make test
Note
This project uses Docker images to avoid shipping or depending on other projects, package managers, or languages (Node.js, Ruby).
Non-Dockerized local testing is not supported by the repo owner.
There are extra make
targets in the Makefile in case you'd prefer local
linting and formatting.
- Install GNU Make (same requirement as the main development pattern)
- Install
uv
for Python package management - Install
npm
for Node.js package management
make localclean
make localinit
make localmdl
make localruff
make localyaml
Note
This information is somewhat historical since incorporating the Makefile, but could prove useful.
Choose one of the below testing command options that suits your needs.
Important
The commands below are to be run from the top level of the project.
-
Discover and run unit tests
python -m unittest discover
-
Verbose version of unit test discovery
python -m unittest discover -v
-
Discover unit tests in specific directory (in this case,
tests
) with verbositypython -m unittest discover -s tests -v
💡 For additional unittest
command line options, refer to the
official Python unittest documentation.