Skip to content

Add a schema file for the configuration file - #435

Merged
nfelt14 merged 10 commits into
tektronix:mainfrom
nfelt14:config-schema-file
May 16, 2025
Merged

nfelt14 merged 10 commits into
tektronix:mainfrom
nfelt14:config-schema-file

Conversation

@nfelt14

@nfelt14 nfelt14 commented May 15, 2025 •

Copy link
Copy Markdown
Collaborator

Proposed changes

This adds a schema file that can be used to provide auto-complete and help when working in the config file. It will also require a PR to the https://github.com/SchemaStore/schemastore repo to add the schema file to the list of schemas so that all users can benefit from the schema file.

Addresses #338

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Functionality update (non-breaking change which updates or changes existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have created (or updated) an Issue to track the status of this update/change and updated the link in this PR description (see above in the Proposed changes section) using the wording Addresses #<issue_number>
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • Basic linting passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

nfelt14 added 6 commits May 5, 2025 12:55
…files.

Updated the dataclasses with annotations to provide descriptions.
… for the serial config options.

Removed the requirement for the type and title on every property, since that data just got in the way when using the IDE auto-complete feature.
Also updated docs to indicate that the address of a device should be expressed as a string in the config file.
…ig files.

Also, added a step to check that the generated schema has valid links
# Conflicts:
#	docs/configuration.md
#	pyproject.toml
#	src/tm_devices/helpers/constants_and_dataclasses.py
@nfelt14
nfelt14 temporarily deployed to package-build May 15, 2025 22:51 — with GitHub Actions Inactive
@nfelt14
nfelt14 temporarily deployed to package-build May 15, 2025 22:53 — with GitHub Actions Inactive
@codecov

codecov Bot commented May 15, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8679017) to head (7c477a0).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #435   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          161       161           
  Lines         4718      4734   +16     
  Branches       431       431           
=========================================
+ Hits          4718      4734   +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nfelt14
nfelt14 temporarily deployed to package-build May 15, 2025 23:19 — with GitHub Actions Inactive
PACKAGE_NAME: Final[str] = "tm_devices"
"""Constant string with the name of this package."""

VISA_RESOURCE_EXPRESSION_REGEX: "Final[re.Pattern[str]]" = re.compile( # pylint: disable=unsubscriptable-object,useless-suppression

Check notice

Code scanning / CodeQL

Unused global variable

The global variable 'VISA_RESOURCE_EXPRESSION_REGEX' is not used.
@nfelt14
nfelt14 temporarily deployed to package-build May 15, 2025 23:25 — with GitHub Actions Inactive
@nfelt14 nfelt14 added enhancement New feature or request ci/cd Improvements or additions to the CI/CD process python labels May 15, 2025
@nfelt14
nfelt14 marked this pull request as ready for review May 16, 2025 00:47
@nfelt14
nfelt14 requested review from a team as code owners May 16, 2025 00:47
@nfelt14
nfelt14 temporarily deployed to package-build May 16, 2025 16:35 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented May 16, 2025 •

Copy link
Copy Markdown

Breaking API Changes

src/tm_devices/helpers/constants_and_dataclasses.py:0: PYVISA_PY_BACKEND:
Public object was removed

src/tm_devices/helpers/constants_and_dataclasses.py:0: SYSTEM_DEFAULT_VISA_BACKEND:
Public object was removed

src/tm_devices/helpers/constants_and_dataclasses.py:0: PACKAGE_NAME:
Public object was removed

src/tm_devices/helpers/constants_and_dataclasses.py:0: VISA_RESOURCE_EXPRESSION_REGEX:
Public object was removed

src/tm_devices/helpers/standalone_functions.py:0: <module>:
Public object was removed

Link to workflow run

@github-actions

github-actions Bot commented May 16, 2025 •

Copy link
Copy Markdown

Test Results (macos)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 101 101
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 40 40
tests/test_device_manager.py 17 17
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 76 76
tests/test_ieee_scpi_cmds.py 1 1
tests/test_logging.py 4 4
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_schema.py 7 7
tests/test_scopes.py 9 9
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 425 425
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 6 6
TOTAL 746 746

Link to workflow run

@github-actions

github-actions Bot commented May 16, 2025 •

Copy link
Copy Markdown

Test Results (windows)

path passed subtotal
tests\test_afgs.py 2 2
tests\test_alias_dict.py 1 1
tests\test_all_device_drivers.py 101 101
tests\test_alternative_connection_addresses.py 19 19
tests\test_awgs.py 4 4
tests\test_config_parser.py 40 40
tests\test_device_manager.py 17 17
tests\test_devices_legacy_tsp_ieee_cmds.py 3 3
tests\test_extension_mixin.py 1 1
tests\test_generate_waveform.py 6 6
tests\test_helpers.py 76 76
tests\test_ieee_scpi_cmds.py 1 1
tests\test_logging.py 4 4
tests\test_margin_testers.py 5 5
tests\test_pi_device.py 1 1
tests\test_psu.py 1 1
tests\test_rest_api_device.py 10 10
tests\test_schema.py 7 7
tests\test_scopes.py 9 9
tests\test_singleton.py 1 1
tests\test_smu.py 4 4
tests\test_ss.py 1 1
tests\test_tm_devices.py 425 425
tests\test_unsupported_device_type.py 1 1
tests\test_verification_functions.py 6 6
TOTAL 746 746

Link to workflow run

@github-actions

github-actions Bot commented May 16, 2025 •

Copy link
Copy Markdown

Test Results (ubuntu)

path passed subtotal
tests/test_afgs.py 2 2
tests/test_alias_dict.py 1 1
tests/test_all_device_drivers.py 101 101
tests/test_alternative_connection_addresses.py 19 19
tests/test_awgs.py 4 4
tests/test_config_parser.py 40 40
tests/test_device_manager.py 17 17
tests/test_devices_legacy_tsp_ieee_cmds.py 3 3
tests/test_extension_mixin.py 1 1
tests/test_generate_waveform.py 6 6
tests/test_helpers.py 76 76
tests/test_ieee_scpi_cmds.py 1 1
tests/test_logging.py 4 4
tests/test_margin_testers.py 5 5
tests/test_pi_device.py 1 1
tests/test_psu.py 1 1
tests/test_rest_api_device.py 10 10
tests/test_schema.py 7 7
tests/test_scopes.py 9 9
tests/test_singleton.py 1 1
tests/test_smu.py 4 4
tests/test_ss.py 1 1
tests/test_tm_devices.py 425 425
tests/test_unsupported_device_type.py 1 1
tests/test_verification_functions.py 6 6
TOTAL 746 746

Link to workflow run

@nfelt14
nfelt14 enabled auto-merge (squash) May 16, 2025 16:56
@nfelt14
nfelt14 merged commit 13e8656 into tektronix:main May 16, 2025

This branch was previously deployed

1 inactive deployment
package-build — 7c477a00 Deployed May 16, 2025 by nfelt14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Improvements or additions to the CI/CD process enhancement New feature or request python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants