@@ -80,6 +80,100 @@ You can also run all checks at once:
8080poetry run poe format && poetry run poe lint && poetry run poe types && poetry run poe test
8181```
8282
83+ ## Commit Message Convention
84+
85+ This project uses [ Conventional Commits] ( https://www.conventionalcommits.org/ )
86+ for automated versioning and changelog generation of the ` nisystemlink_examples `
87+ Python package.
88+
89+ ** When conventional commits matter:**
90+
91+ - Commits to the ` nisystemlink_examples/ ` package code
92+ - Changes to ` tests/ ` , ` pyproject.toml ` , or the CI workflow
93+ - When merged to the ` main ` branch
94+
95+ For other contributions (examples, documentation, etc.), conventional commit
96+ format is optional but still encouraged for consistency.
97+
98+ ### Commit Message Format
99+
100+ ``` md
101+ <type >[ optional scope] : <description >
102+
103+ [ optional body]
104+
105+ [ optional footer(s)]
106+ ```
107+
108+ ### Common Types and Version Bumps
109+
110+ - ** ` fix: ` ** - A bug fix (triggers a ** PATCH** version bump: 0.1.0 → 0.1.1)
111+
112+ ``` md
113+ fix: correct calculation error in test result processing fix(simulator):
114+ handle empty response from API endpoint
115+ ```
116+
117+ - ** ` feat: ` ** - A new feature (triggers a ** MINOR** version bump: 0.1.0 → 0.2.0)
118+
119+ ``` md
120+ feat: add support for querying test results by date range feat(testdata): add
121+ batch delete functionality for test results
122+ ```
123+
124+ - ** ` feat!: ` ** or ** ` BREAKING CHANGE: ` ** - A breaking change (triggers a
125+ ** MAJOR** version bump: 0.1.0 → 1.0.0)
126+
127+ ``` md
128+ feat!: remove deprecated create_result method
129+ ```
130+
131+ Or with a footer:
132+
133+ ``` md
134+ feat: redesign simulator API
135+
136+ BREAKING CHANGE: The create_result method has been removed. Use
137+ create_results_and_steps instead.
138+ ```
139+
140+ ### Other Common Types (no version bump)
141+
142+ - ** ` docs: ` ** - Documentation changes only
143+ - ** ` style: ` ** - Code style changes (formatting, whitespace, etc.)
144+ - ** ` refactor: ` ** - Code refactoring without changing functionality
145+ - ** ` test: ` ** - Adding or updating tests
146+ - ** ` chore: ` ** - Maintenance tasks, dependency updates, etc.
147+ - ** ` ci: ` ** - CI/CD configuration changes
148+
149+ ### Examples
150+
151+ ``` bash
152+ # Patch release (0.1.0 → 0.1.1)
153+ git commit -m " fix: handle empty response from API endpoint"
154+
155+ # Minor release (0.1.0 → 0.2.0)
156+ git commit -m " feat: add batch delete functionality for test results"
157+
158+ # Major release (1.0.0 → 2.0.0) - use commit editor for multi-line
159+ git commit
160+ # Then in the editor:
161+ # feat!: redesign simulator API with new parameter structure
162+ #
163+ # BREAKING CHANGE: Removed create_result(), use create_results_and_steps()
164+ ```
165+
166+ ** What triggers an automated release:**
167+
168+ When commits following the conventional format are merged to ` main ` and affect:
169+
170+ - ` nisystemlink_examples/** ` (package source code)
171+ - ` tests/** ` (test files)
172+ - ` pyproject.toml ` (package configuration)
173+ - ` .github/workflows/python-package.yml ` (CI/CD workflow)
174+
175+ The package will be automatically versioned, tagged, and published to PyPI.
176+
83177## Security scanning with Snyk
84178
85179This repository uses [ Snyk] ( https://snyk.io/ ) for security scanning to identify
0 commit comments