Contributing
Quick Start
-
Fork the
notional
repository into your account and clone a local working copy. -
Create a new feature branch for your changes.
-
Set up a local environment.
- Create a virtual environment:
python3 -m venv .venv source .venv/bin/activate
- Install dependencies (using poetry):
poetry install
- Install
pre-commit
hooks:
pre-commit install
-
Follow the standards enforced by the tools. At any time, you may use the
preflight
target to run the unit tests and code checks. -
Provide tests for new code and ensure they are passing.
-
Submit a pull request with your changes.
Pull Requests
Pull requests are highly encouraged! Please make sure the PR passes pre-commit
prior to submission.
Coding Standards
Notional uses standard Python coding practices.
Style
All code must be formatted using black
.
Additionally, all import
statements will be sorted according to isort
.
Static Analysis
Code will be scanned using flake8
.
Unit Tests
Where practical, stand-alone unit tests ae strongly encouraged. In the future, code coverage may be enforced for new commits.
If it is not practical to develop a unit test, evidence of working code must be provided in the pull request.
To run the unittests, you can set up new integration in notion, create new empty page and give integration access to the page. Then export two env variables:
export NOTION_AUTH_TOKEN="secret_tOkEn"
export NOTION_TEST_AREA="TEST_PAGE_ID (not the URL)"
before running the tests (make unit-tests
). Tests are recorded by
pytest-vcr, make reset-vcr
will reset recorded data.
Submitting Issues & Requests
Please review the open issues and feature requests. This is a great place to start if you are looking for ways to contribute!
Known Issues
See Issues on github.
Feature Requests
See Issues on github.