Skip to content

Commit

Permalink
ci: Update workflow name and add Python 3.12 classifier (#70)
Browse files Browse the repository at this point in the history
* ci: Update workflow name.

* build: manually add python 3.12 classifier

* fix: Move attribute instantiation before any function calls in the DeviceManager init.
  • Loading branch information
nfelt14 authored Oct 25, 2023
1 parent 713f17d commit c8a5cec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Publish package
name: Publish to GitHub & PyPI
on:
workflow_dispatch:
inputs:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ classifiers = [
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
"Topic :: Scientific/Engineering",
"Topic :: System :: Hardware :: Hardware Drivers"
"Topic :: System :: Hardware :: Hardware Drivers",
"Programming Language :: Python :: 3.12" # TODO: remove this once poetry automatically adds it
]
description = "Manage connections and interactions with Test & Measurement devices."
documentation = "https://tm-devices.readthedocs.io/en/latest/"
Expand Down
13 changes: 7 additions & 6 deletions src/tm_devices/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,18 @@ def __init__(
self.__verbose_visa = False
self.__devices: Dict[str, Union[PIDevice, RESTAPIDevice]] = AliasDict()
self._external_device_drivers = external_device_drivers
# initialize for __set_options()
self.__verbose: bool = NotImplemented
self.__teardown_cleanup_enabled: bool = NotImplemented
self.__setup_cleanup_enabled: bool = NotImplemented
self.__visa_library: str = NotImplemented

# Create the config
self.__config = DMConfigParser()
if config_options is not None:
self.__config.update_options(config_options)
if self.__config.options.check_for_updates: # pragma: no cover
check_for_update()

# initialize for __set_options
self.__verbose: bool = NotImplemented
self.__teardown_cleanup_enabled: bool = NotImplemented
self.__setup_cleanup_enabled: bool = NotImplemented
self.__visa_library: str = NotImplemented
# actually populate the options
self.__set_options(verbose)

Expand Down

0 comments on commit c8a5cec

Please sign in to comment.