Skip to content

Conversation

@adamarnesen
Copy link
Member

@adamarnesen adamarnesen commented Dec 2, 2025

Justification

This is the first step to creating a python package to contain details of examples that we don't want to include directly in notebooks. This change introduces the python package structure (directories), tests, and some poetry tasks that are used in GitHub actions for automatically testing on PR and submission

Implementation

  1. Add very basic python code as part of the initial package prototype. This includes the python code as well as the poetry setup for building (in pyproject.toml)
    2. Most of the poetry and pipeline information was reused from https://github.com/ni/nisystemlink-clients-python
  2. Introduce poe tasks for
    1. test using pytest
    2. linting using flake8 (also includes flake8 configuration)
    3. checking formatting using black
    4. automatically formatting using black
    5. checking types with mypy
  3. Update CONTRIBUTING to talk about how
  4. Added python-package workflow for GitHub to run tests on PR and submissions

Testing

Added new python tests. These are mostly stubs but establish the tooling

Checklist

@adamarnesen adamarnesen self-assigned this Dec 2, 2025
@adamarnesen adamarnesen changed the title Adamarnesen/add demo python package Initial release of demo python package, tests, pipeline, semantic releases Dec 2, 2025
@adamarnesen adamarnesen changed the title Initial release of demo python package, tests, pipeline, semantic releases fix: Initial release of demo python package, tests, pipeline, semantic releases Dec 2, 2025
@adamarnesen adamarnesen changed the title fix: Initial release of demo python package, tests, pipeline, semantic releases Add stubs for python package as well as pipelines for testing Dec 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes the foundational Python package structure for nisystemlink-examples with comprehensive testing and quality assurance infrastructure. It introduces a basic Simulator class as a starting point and sets up automated CI/CD pipelines.

Key Changes

  • Created Python package structure with nisystemlink_demo module containing test data utilities
  • Configured development tooling: pytest for testing, black for formatting, flake8 for linting, mypy for type checking
  • Added GitHub Actions workflow for automated testing across Python 3.9-3.13
  • Updated CONTRIBUTING.md with detailed development workflow and Poetry usage instructions

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Project configuration with dependencies and Poetry/Poe task definitions
poetry.lock Locked dependency versions (auto-generated)
nisystemlink_demo/__init__.py Package entry point with version and exports
nisystemlink_demo/testdata/__init__.py Test data module initialization
nisystemlink_demo/testdata/simulator.py Stub Simulator class implementation
tests/__init__.py Test package initialization
tests/testdata/__init__.py Test subpackage initialization
tests/testdata/test_simulator.py Unit test for Simulator class
.github/workflows/python-package.yml CI/CD pipeline configuration
.flake8 Flake8 linting configuration
CONTRIBUTING.md Enhanced contribution guidelines with development setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

adamarnesen and others added 6 commits December 3, 2025 13:24
remove python 3.9

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
add `pass` to init

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
add type annotation

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@adamarnesen adamarnesen merged commit d7d5549 into main Dec 3, 2025
5 checks passed
@adamarnesen adamarnesen deleted the adamarnesen/add-demo-python-package branch December 3, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants