Skip to content

Conversation

@jfriedri-ni
Copy link
Contributor

@jfriedri-ni jfriedri-ni commented Nov 17, 2025

What does this Pull Request accomplish?

  • Adds a new example named system that
    • uses System Configuration API to detect hardware and software on the local host
    • uses Metadata Store API to publish that information to the NI Data Store
    • uses Data Store API to retrieve the corresponding records from the database

Why should this Pull Request be merged?

What testing has been done?

  • poetry run mypy
  • poetry run nps lint
  • poetry run system
    Scanning system for metadata...
    Publishing detected system metadata...
    Querying system metadata...
    
    TestResult ID: 2b8c6a96-9429-4ca8-abc5-68872ddd1a17
    - Operator: 02496b8e-775e-4ff0-96db-cac9aa8e138c
    - Test Station: 91564c43-8ed5-4c1b-a720-744d6de85da4
    - Installed Software: 118 packages
    - Available Hardware: 11 devices
    

```pwsh
> poetry init

This command will guide you through creating your pyproject.toml config.

Package name [system]:  system_example
Version [0.1.0]:  0.1.0.dev0
Description []:  Example demonstrating how to detect, publish, and query system hardware and software resources
Author [Joe Friedrichsen <joe.friedrichsen@emerson.com>, n to skip]:  n
License []:  MIT
Compatible Python versions [>=3.11]:  >=3.10

Would you like to define your main dependencies interactively? (yes/no) [yes] no
Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file
```
- Authors, maintainers
- Keywords, classifiers
- URLs, scripts
- Dependencies and tool configs
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@jfriedri-ni jfriedri-ni requested a review from csjall as a code owner November 17, 2025 16:56
Copilot AI review requested due to automatic review settings November 17, 2025 16:56
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 pull request adds a new example demonstrating how to detect system hardware and software resources using the NI System Configuration API and publish that metadata to the NI Data Store.

Key Changes:

  • Implements system resource detection using nisyscfg library to enumerate hardware devices and software components
  • Publishes detected metadata (operator, test station, hardware items, software items) to NI Data Store
  • Provides a complete example with documentation and dependencies

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/system/src/system.py Main implementation detecting system resources and publishing to data store
examples/system/pyproject.toml Poetry project configuration with dependencies for nisyscfg and ni-datastore
examples/system/README.md Documentation explaining the example's purpose and usage
examples/system/src/init.py Package initialization with module docstring
examples/system/poetry.toml Poetry configuration for virtualenv management
examples/system/poetry.lock Locked dependency versions generated by Poetry

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

@dixonjoel
Copy link
Collaborator

Please add this to the example docs here

Copy link
Collaborator

@dixonjoel dixonjoel left a comment

Choose a reason for hiding this comment

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

Mostly looks good. Waiting for a passing PR and a couple comment responses.

jfriedri-ni and others added 5 commits November 17, 2025 11:15
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jfriedri-ni
Copy link
Contributor Author

Please add this to the example docs here

It looks like only the notebooks are described on that page -- the overview example isn't there, so I didn't add system either. I can both if you like, however.

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@dixonjoel
Copy link
Collaborator

Please add this to the example docs here

It looks like only the notebooks are described on that page -- the overview example isn't there, so I didn't add system either. I can both if you like, however.

Yes, that would be great if you don't mind.

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@jfriedri-ni
Copy link
Contributor Author

It looks like only the notebooks are described on that page -- the overview example isn't there, so I didn't add system either. I can both if you like, however.

Yes, that would be great if you don't mind.

I updated the example index to include the standalone script examples.

Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
Signed-off-by: Joe Friedrichsen <114173023+jfriedri-ni@users.noreply.github.com>
@jfriedri-ni jfriedri-ni merged commit 1a0712f into main Nov 17, 2025
26 checks passed
@jfriedri-ni jfriedri-ni deleted the users/jfriedri/add-sysapi-metadata-example-ab3435917 branch November 17, 2025 21:31
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.

4 participants