The Land Consumption Plugin created in partnership with WWF Österreich.
To run your plugin locally requires the following setup:
- Set up the infrastructure locally in
develmode - Copy your .env.base_template to
.env.baseand update it - Copy your .env_template to
.envand update it - Run
poetry run python land_consumption/plugin.py
If you want to run your plugin through Docker, refer to the Plugin Showcase.
We use pytest as testing engine.
Ensure all tests are passing on the unmodified repository by running poetry run pytest.
To get a coverage report of how much of your code is run during testing, execute
poetry run pytest --ignore test/test_plugin.py --cov.
We ignore test/test_plugin.py when assessing coverage because the core tests run the whole plugin to be sure
everything successfully runs with a very basic configuration.
Yet, they don't actually test functionality and therefore artificially inflate the test coverage results.
To get a more detailed report including which lines in each file are not tested,
run poetry run pytest --ignore test/test_plugin.py --cov --cov-report term-missing
It is important that the code created by the different plugin developers adheres to a certain standard.
We use ruff for linting and formatting the code as part of our pre-commit hooks.
Please activate pre-commit by running poetry run pre-commit install.
It will now run automatically before each commit and apply fixes for a variety of lint errors to your code.
Note that we have increased the maximum number of characters per line to be 120 to make better use of large modern displays.