Contributing
Contributions to django-controlcenter are welcome. Please follow these guidelines to ensure a smooth process.
Pull Request Guidelines
As the original author has limited time for new features, pull requests are the best way to contribute. A good pull request should:
- Branch from
master: Create your feature branch from themasterbranch. - Provide Tests: Add tests for any new features or bug fixes.
- Add Documentation: If you add a new feature, please update the documentation.
- Update Changelog: Add a note about your change to the changelog in
README.rstunder the next version.
Development Setup
-
Clone the repository:
git clone https://github.com/byashimov/django-controlcenter.git cd django-controlcenter -
Create a virtual environment:
python -m venv venv source venv/bin/activate -
Install in editable mode:
pip install -e . pip install tox
Running Tests
This project uses tox to test against multiple Python and Django versions. This is the preferred way to run tests.
-
Install
tox:pip install tox -
Run all test environments:
tox -
Run tests for a specific environment:
To run tests for a single environment defined in
tox.ini, use the-eflag. For example, to test with Python 3.8 and Django 4.0:# The environment name format is py{python_version}-django{django_version} # Example from tox.ini: py{38,39,310}-django{4} tox -e py38-django4
You can also run tests directly using the test project's manage.py script for quicker feedback during development:
python test_project/manage.py test
Frontend Development
The project's CSS is compiled from Stylus files using Grunt.
-
Install Node.js dependencies:
npm install -
Compile styles:
If you make changes to the
.stylfiles incontrolcenter/stylus/, you need to recompile them.# Run a one-time build grunt # Watch for changes and rebuild automatically grunt watch