Contributions to systemlink-enterprise-examples are welcome from all!
systemlink-enterprise-examples is managed via git, with the canonical upstream repository hosted on GitHub.
systemlink-enterprise-examples follows a pull-request model for development. If you wish to contribute, you will need to create a GitHub account, fork this project, push a branch with your changes to your project, and then submit a pull request.
See GitHub's official documentation for more details.
This project uses Poetry for dependency management and includes automated tasks via Poe.
-
Install Poetry if you haven't already:
# On Windows (PowerShell) (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - # On macOS/Linux curl -sSL https://install.python-poetry.org | python3 -
-
Install project dependencies:
poetry install
-
Activate the virtual environment:
poetry shell
The project includes several automated tasks that you can run using Poetry and Poethepoetry:
poetry run poe test- Run the test suite using pytestpoetry run poe lint- Run flake8 linting on the codebasepoetry run poe check- Check code formatting with Black (without making changes)poetry run poe format- Format code with Blackpoetry run poe types- Run mypy type checking on the codebase
Before submitting a pull request, ensure your code passes all checks:
# Format your code
poetry run poe format
# Run linting
poetry run poe lint
# Run type checking
poetry run poe types
# Run tests
poetry run poe testYou can also run all checks at once:
poetry run poe format && poetry run poe lint && poetry run poe types && poetry run poe testThis project uses Conventional Commits
for automated versioning and changelog generation of the nisystemlink_examples
Python package.
When conventional commits matter:
- Commits to the
nisystemlink_examples/package code - Changes to
tests/,pyproject.toml, or the CI workflow - When merged to the
mainbranch
For other contributions (examples, documentation, etc.), conventional commit format is optional but still encouraged for consistency.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]-
fix:- A bug fix (triggers a PATCH version bump: 0.1.0 → 0.1.1)fix: correct calculation error in test result processing fix(simulator): handle empty response from API endpoint
-
feat:- A new feature (triggers a MINOR version bump: 0.1.0 → 0.2.0)feat: add support for querying test results by date range feat(testdata): add batch delete functionality for test results
-
feat!:orBREAKING CHANGE:- A breaking change (triggers a MAJOR version bump: 0.1.0 → 1.0.0)feat!: remove deprecated create_result method
Or with a footer:
feat: redesign simulator API BREAKING CHANGE: The create_result method has been removed. Use create_results_and_steps instead.
docs:- Documentation changes onlystyle:- Code style changes (formatting, whitespace, etc.)refactor:- Code refactoring without changing functionalitytest:- Adding or updating testschore:- Maintenance tasks, dependency updates, etc.ci:- CI/CD configuration changes
# Patch release (0.1.0 → 0.1.1)
git commit -m "fix: handle empty response from API endpoint"
# Minor release (0.1.0 → 0.2.0)
git commit -m "feat: add batch delete functionality for test results"
# Major release (1.0.0 → 2.0.0) - use commit editor for multi-line
git commit
# Then in the editor:
# feat!: redesign simulator API with new parameter structure
#
# BREAKING CHANGE: Removed create_result(), use create_results_and_steps()What triggers an automated release:
When commits following the conventional format are merged to main and affect:
nisystemlink_examples/**(package source code)tests/**(test files)pyproject.toml(package configuration).github/workflows/python-package.yml(CI/CD workflow)
The package will be automatically versioned, tagged, and published to PyPI.
Contributors within NI/Emerson: See the security scanning reference for information on security scanning tools, workflows, and best practices.
Contributors outside of NI/Emerson: If you are having issues resolving a vulnerability identified on your PR, consult with a code owner to understand your options for resolution.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
(taken from developercertificate.org)
See LICENSE for details about how systemlink-enterprise-examples is licensed.