Contributing to the App¶
Where to start¶
- Bug reports: open an issue at https://github.com/rsp2k/nautobot-ssot-fortinet/issues. Include the FortiOS version, the Nautobot version, and (if relevant) the redacted output of the failing Job.
- Feature requests: same place. Easier for me to evaluate if you describe the operational scenario rather than just the requested feature.
- Pull requests: see below.
Pull request workflow¶
- Fork the repo + create a feature branch (
git checkout -b feat/your-feature). - Set up the dev environment per
dev_environment.md. - Make your changes; add tests for any new behavior. The bar is "the existing test suite + the new tests still pass on
pytest -qin under 1 second." - Run
ruff check src/ tests/andruff format src/ tests/— both must come up clean. - Update the relevant docs page (
docs/admin/*ordocs/user/*ordocs/dev/*) for any operator- or developer-facing change. - Commit with a descriptive message. Format follows the existing repo style — no
Co-authored-bylines for AI assistants. - Push your branch and open a draft PR initially. Once you've self-reviewed, mark it ready for review.
Code style¶
- Python 3.10+ type hints throughout.
- Module docstrings explain what the file is for and what design choices it reflects, not just what it does. The audience is a future maintainer (possibly future-you).
- Function docstrings include doctest examples where the input/output relationship is non-obvious. Doctest output is verified by reading; we don't currently run them.
- Pure functions in
utils/; I/O inclients/anddiffsync/adapters/; data shapes indiffsync/models/.
Adding a new FortiOS mapping rule¶
When you discover a FortiOS field that we don't yet handle correctly:
- Add a unit test in
tests/test_utils_fortios.pythat reproduces the failing translation. The test should fail onmain. - Add the mapping helper or extend the existing one in
src/nautobot_ssot_fortinet/utils/fortios.py. - Update the relevant table in
docs/user/external_interactions.md. This is required — that doc is the operational reference for what FortiOS shapes the integration handles. - Run the live e2e harnesses if you have a FortiGate to test against, otherwise note in the PR that fixture coverage only.
Adding push support for a new object kind¶
See extending.md. The push direction has more edge cases than pull (every transformation needs a clean inverse, every FortiOS payload field needs to be specified exactly right). Always test with dry_run=True first.
Release process¶
Maintainer-only:
- Bump the version in
pyproject.tomlto today's date (YYYY.MM.DD). - Add a new section to
CHANGELOG.mdsummarizing the changes. - Add a corresponding file under
docs/admin/release_notes/version_<YYYY.MM.DD>.md. - Run the two-stage PII audit per the repo's CLAUDE.md instructions.
git commit -am "Release vYYYY.MM.DD"+git tag vYYYY.MM.DD+git push --follow-tags.rm -rf dist/ && uv build && uv publish --token $PYPI_TOKEN.- Create a GitHub Release pointing at the tag, linking to the changelog section.
Code of conduct¶
Standard professional norms. Be kind. Assume good faith. If something is unclear, ask before being snippy about it.