Contributing¶
Development Setup¶
-
Clone the repositories:
-
Set up NetBox per its documentation
-
Install the plugin in editable mode:
-
Add
'netbox_map'toPLUGINSin yourconfiguration.py -
Run migrations:
Running Tests¶
cd netbox/netbox
NETBOX_CONFIGURATION=netbox.configuration_testing python manage.py test netbox_map.tests -v2
With coverage:
NETBOX_CONFIGURATION=netbox.configuration_testing python -m coverage run --source=netbox_map manage.py test netbox_map.tests
coverage report
Linting¶
The project uses ruff with configuration aligned to NetBox's own style:
cd netbox-map
ruff check netbox_map/ # Check for issues
ruff check --fix netbox_map/ # Auto-fix
ruff format netbox_map/ # Format code
Or via make:
Pull Request Process¶
- Open or reference a GitHub issue describing the change
- Create a feature branch from
main - Make your changes with tests
- Ensure
ruff checkpasses - Ensure all tests pass
- Submit a pull request referencing the issue
Code Style¶
- Follow existing patterns in the codebase
- Use NetBox conventions for models, views, serializers, and forms
- Line length: 120 characters
- Single quotes for strings
- Import sorting handled by ruff (isort rules)
Building Documentation¶
Then open http://127.0.0.1:8000 to preview.