Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 2.45 KB

CONTRIBUTING.md

File metadata and controls

78 lines (56 loc) · 2.45 KB

Contributing

Contributions are encouraged and welcome!! Please use the issue page to submit feature requests or bug reports. Issues with attached PRs will be given priority and have a much higher likelihood of acceptance. Please also open an issue and associate it with any submitted PRs.

We are actively seeking additional maintainers. If you're interested, please contact me.

Installation

django-render-static uses Poetry for environment, package and dependency management. Poetry greatly simplifies environment bootstrapping. Once it's installed.

poetry install -E all

External Dependencies

Some of the tests require npm to be installed.

Documentation

django-render-static documentation is generated using Sphinx with the readthedocs theme. Any new feature PRs must provide updated documentation for the features added. To build the docs run:

cd ./doc
poetry run doc8 --ignore-path build --max-line-length 100
poetry run make html

Static Analysis

django-render-static uses Pylint for Python linting and mypy for type checking. Header imports are also standardized using isort. Before any PR is accepted the following must be run, and static analysis tools should not produce any errors or warnings. Disabling certain errors or warnings where justified is acceptable:

./check.sh
poetry run python -m readme_renderer ./README.md

Running Tests

django-render-static is setup to use django-pytest to allow pytest to run Django unit tests. All the tests are housed in tests/tests.py. Before a PR is accepted, all tests must be passing and the code coverage must be at 100%.

To run the full suite:

poetry run pytest

To run a single test, or group of tests in a class:

poetry run pytest <path_to_tests_file>::ClassName::FunctionName

For instance to run all tests in DefinesToJavascriptTest, and then just the test_classes_to_js test you would do:

poetry run pytest tests/tests.py::DefinesToJavascriptTest
poetry run pytest tests/tests.py::DefinesToJavascriptTest::test_classes_to_js