Thank you for your interest in contributing to Policy as Code!
- Ensure you have Python 3.9+ and Pipenv installed.
Install dependencies:
pipenv install --devRun the CLI:
pipenv run main --help- Follow PEP 8 guidelines.
- Use type hints and docstrings for all functions.
- Use
os.path.join()for paths and f-strings for formatting.
Format code with Black:
pipenv run fmt- Write unit tests for all new features and bug fixes.
- Ensure all tests pass before submitting a pull request:
pipenv run test- Markdown files should adhere to standard conventions.
- Use a Markdown linter
markdownlint
Use the following comments to run the linter:
markdownlint '**.md' --disable MD013- Dependencies are vendored in the
vendor/directory for reliability and security. See vendor/README.md. - To update or add dependencies:
- Add or update the dependency using Pipenv.
pipenv run vendor- Fork the repository and create a feature branch.
- Make your changes, following the guidelines above.
- Run tests and ensure code is formatted.
- Submit a pull request with a clear description of your changes.
- Please follow our Code of Conduct.
- For help, see SUPPORT.md or open a GitHub Issue.