Skip to content

Commit 8f4802e

Browse files
authored
Merge branch 'master' into users/sam/feat/asset-api-endpoints
2 parents fa5fd90 + 3bbd6b4 commit 8f4802e

File tree

151 files changed

+2172
-2092
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+2172
-2092
lines changed

.flake8

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ max-line-length = 119
44
# but keep line length to 88 in general
55
# - use "black" to auto-format
66

7+
# D400 and D205 are because we sometimes split the first line of the docstring
8+
# F821 is temporary, until code is complete and stuff like ObjectDisposedException is gone
79
ignore =
8-
# D400 and D205 are because we sometimes split the first line of the docstring
9-
*.py E203, W503, D100,D101,D102,D105,D106,D107, D400,D205, D415
10-
# temporary, until code is complete and stuff like ObjectDisposedException is gone:
11-
*.py F821
10+
E203,
11+
W503,
12+
D100,
13+
D101,
14+
D102,
15+
D105,
16+
D106,
17+
D107,
18+
D400,
19+
D205,
20+
D415,
21+
F821
1222

1323
# Config for flake8-docstrings
1424
docstring-convention = google

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
14+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Install poetry
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
32+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
3333
# Do not run in parallel to limit parallel integration tests stomping on each other
3434
max-parallel: 1
3535
steps:
@@ -59,7 +59,7 @@ jobs:
5959
run: pipx install poetry
6060
- uses: actions/setup-python@v4
6161
with:
62-
python-version: 3.9
62+
python-version: "3.10"
6363
cache: "poetry"
6464
- run: poetry install
6565
- name: Semantic release

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-20.04
10+
os: ubuntu-lts-latest
1111
tools:
12-
python: "3.9"
12+
python: "3.10"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
<!--next-version-placeholder-->
44

5+
## v2.22.0 (2025-12-10)
6+
7+
### Feature
8+
9+
* Add optional take to DataFrame Service export table data request model ([#177](https://github.com/ni/nisystemlink-clients-python/issues/177)) ([`2932991`](https://github.com/ni/nisystemlink-clients-python/commit/293299130297ef1ef800ebd94c4d0ab97ae06977))
10+
11+
## v2.21.0 (2025-12-10)
12+
13+
### Feature
14+
15+
* Rev minimum python version to 3.10 and add python 3.14 ([#168](https://github.com/ni/nisystemlink-clients-python/issues/168)) ([`d414904`](https://github.com/ni/nisystemlink-clients-python/commit/d4149043ac2f1eff97cb7cf6e65b771839bd6e3c))
16+
517
## v2.20.0 (2025-12-01)
618

719
### Feature

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To contribute to this project, it is recommended that you follow these steps:
3737

3838
## Testing
3939

40-
Before running any tests, you must have a supported version of Python (3.9+) and [Poetry](https://python-poetry.org/docs/) installed locally.
40+
Before running any tests, you must have a supported version of Python (3.10+) and [Poetry](https://python-poetry.org/docs/) installed locally.
4141

4242
It is also helpful to install SystemLink Server and configure the NI Web Server
4343
to run on localhost.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Requirements
1818
**nisystemlink-clients** has the following requirements:
1919

2020
* Access to a SystemLink Server or SystemLink Enterprise installation
21-
* CPython 3.9+
21+
* CPython 3.10+
2222

2323
.. _installation_section:
2424

examples/dataframe/export_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"0001-01-01T00:00:00Z" if index_column.data_type == DataType.Timestamp else "0"
2727
)
2828

29-
# Export table data with query options
29+
# Export the first 100,000 rows of table data with query options
3030
request = ExportTableDataRequest(
3131
columns=[index_column.name],
3232
order_by=[ColumnOrderBy(column=order_column.name, descending=True)],
@@ -37,6 +37,7 @@
3737
value=filter_value,
3838
)
3939
],
40+
take=100000,
4041
response_format=ExportFormat.CSV,
4142
)
4243

nisystemlink/clients/artifact/_artifact_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Implementation of ArtifactClient"""
22

3-
from typing import BinaryIO, Optional
3+
from typing import BinaryIO
44

55
from nisystemlink.clients import core
66
from nisystemlink.clients.core._uplink._base_client import BaseClient
@@ -18,7 +18,7 @@
1818

1919

2020
class ArtifactClient(BaseClient):
21-
def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
21+
def __init__(self, configuration: core.HttpConfiguration | None = None):
2222
"""Initialize an instance.
2323
2424
Args:

nisystemlink/clients/assetmanagement/_asset_management_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
on_exception=retry.CONNECTION_ERROR,
1919
)
2020
class AssetManagementClient(BaseClient):
21-
def __init__(self, configuration: Optional[HttpConfiguration] = None):
21+
def __init__(self, configuration: HttpConfiguration | None = None):
2222
"""Initialize an instance.
2323
2424
Args:
@@ -127,7 +127,7 @@ def delete_assets(self, ids: List[str]) -> models.DeleteAssetsResponse:
127127
@post("assets/{assetId}/file", args=[Path("assetId"), Field("fileIds")])
128128
def link_files(
129129
self, asset_id: str, file_ids: List[str]
130-
) -> Optional[models.LinkFilesPartialSuccessResponse]:
130+
) -> models.LinkFilesPartialSuccessResponse | None:
131131
"""Link files to an asset.
132132
133133
Args:
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import datetime
2-
from typing import Dict, List, Optional
2+
from typing import Dict, List
33

44
from nisystemlink.clients.core._uplink._json_model import JsonModel
55
from pydantic import Field
@@ -17,98 +17,98 @@
1717
class Asset(JsonModel):
1818
"""Model for an object describing an asset with all of its properties."""
1919

20-
model_name: Optional[str] = None
20+
model_name: str | None = None
2121
"""Gets or sets model name of the asset."""
2222

23-
model_number: Optional[int] = None
23+
model_number: int | None = None
2424
"""Gets or sets model number of the asset."""
2525

26-
serial_number: Optional[str] = None
26+
serial_number: str | None = None
2727
"""Gets or sets serial number of the asset."""
2828

29-
vendor_name: Optional[str] = None
29+
vendor_name: str | None = None
3030
"""Gets or sets vendor name of the asset."""
3131

32-
vendor_number: Optional[int] = None
32+
vendor_number: int | None = None
3333
"""Gets or sets vendor number of the asset."""
3434

35-
bus_type: Optional[AssetBusType] = None
35+
bus_type: AssetBusType | None = None
3636
"""Gets or sets all supported bus types for an asset."""
3737

38-
name: Optional[str] = None
38+
name: str | None = None
3939
"""Gets or sets name of the asset."""
4040

41-
asset_type: Optional[AssetType] = None
41+
asset_type: AssetType | None = None
4242
"""Gets or sets all supported asset types."""
4343

44-
discovery_type: Optional[AssetDiscoveryType] = None
44+
discovery_type: AssetDiscoveryType | None = None
4545
"""Gets or sets the discovery type."""
4646

47-
firmware_version: Optional[str] = None
47+
firmware_version: str | None = None
4848
"""Gets or sets firmware version of the asset."""
4949

50-
hardware_version: Optional[str] = None
50+
hardware_version: str | None = None
5151
"""Gets or sets hardware version of the asset."""
5252

53-
visa_resource_name: Optional[str] = None
53+
visa_resource_name: str | None = None
5454
"""Gets or sets VISA resource name of the asset."""
5555

56-
temperature_sensors: Optional[List[TemperatureSensor]] = None
56+
temperature_sensors: List[TemperatureSensor] | None = None
5757
"""Gets or sets an array of temperature sensor information."""
5858

59-
supports_self_calibration: Optional[bool] = None
59+
supports_self_calibration: bool | None = None
6060
"""Gets or sets whether the asset supports self-calibration."""
6161

62-
supports_external_calibration: Optional[bool] = None
62+
supports_external_calibration: bool | None = None
6363
"""Gets or sets whether the asset supports external calibration."""
6464

65-
custom_calibration_interval: Optional[int] = None
65+
custom_calibration_interval: int | None = None
6666
"""Gets or sets the interval represented in months used for computing calibration due date."""
6767

68-
self_calibration: Optional[SelfCalibration] = None
68+
self_calibration: SelfCalibration | None = None
6969
"""Gets or sets the last self-calibration of the asset."""
7070

71-
is_NI_asset: Optional[bool] = Field(alias="isNIAsset", default=None)
71+
is_NI_asset: bool | None = Field(alias="isNIAsset", default=None)
7272
"""Gets or sets whether this asset is an NI asset (true) or a third-party asset (false)."""
7373

74-
id: Optional[str] = None
74+
id: str | None = None
7575
"""Gets or sets unique identifier of the asset."""
7676

77-
location: Optional[AssetLocation] = None
77+
location: AssetLocation | None = None
7878
"""Model for information about the asset location, presence and the connection status of the system"""
7979

80-
calibration_status: Optional[CalibrationStatus] = None
80+
calibration_status: CalibrationStatus | None = None
8181
"""Gets or sets the calibration category the asset belongs to based on the next due calibration date."""
8282

83-
is_system_controller: Optional[bool] = None
83+
is_system_controller: bool | None = None
8484
"""Gets or sets whether this asset represents a System Controller."""
8585

86-
external_calibration: Optional[ExternalCalibration] = None
86+
external_calibration: ExternalCalibration | None = None
8787
"""Gets or sets the last external calibration of the asset."""
8888

89-
workspace: Optional[str] = None
89+
workspace: str | None = None
9090
"""Gets or sets the ID of the workspace."""
9191

92-
properties: Optional[Dict[str, str]] = None
92+
properties: Dict[str, str] | None = None
9393
""" Gets or sets key-value-pair metadata associated with an asset."""
9494

95-
keywords: Optional[List[str]] = None
95+
keywords: List[str] | None = None
9696
"""Gets or sets words or phrases associated with an asset."""
9797

98-
last_updated_timestamp: Optional[datetime] = None
98+
last_updated_timestamp: datetime | None = None
9999
"""Gets or sets ISO-8601 formatted timestamp specifying the last date that the asset has had a property update."""
100100

101-
file_ids: Optional[List[str]] = None
101+
file_ids: List[str] | None = None
102102
"""Gets or sets all files linked to the asset."""
103103

104-
supports_self_test: Optional[bool] = None
104+
supports_self_test: bool | None = None
105105
"""Gets or sets whether the asset supports self-test."""
106106

107-
supports_reset: Optional[bool] = None
107+
supports_reset: bool | None = None
108108
"""Gets or sets whether the asset supports reset."""
109109

110-
part_number: Optional[str] = None
110+
part_number: str | None = None
111111
"""Gets or sets part number of the asset."""
112112

113-
out_for_calibration: Optional[bool] = None
113+
out_for_calibration: bool | None = None
114114
"""Get or set whether the asset is out for calibration."""

0 commit comments

Comments
 (0)