labfreed 0.2.8__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of labfreed might be problematic. Click here for more details.
- labfreed-0.2.9/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- labfreed-0.2.9/.github/workflows/pypi-publish.yml +78 -0
- labfreed-0.2.9/.github/workflows/run-tests.yml +25 -0
- labfreed-0.2.9/CHANGELOG.md +55 -0
- {labfreed-0.2.8 → labfreed-0.2.9}/LICENSE +21 -21
- {labfreed-0.2.8 → labfreed-0.2.9}/PKG-INFO +11 -8
- {labfreed-0.2.8 → labfreed-0.2.9}/README.md +357 -354
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/__init__.py +11 -11
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/labfreed_infrastructure.py +258 -258
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_cat/__init__.py +19 -19
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_cat/category_base.py +51 -51
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_cat/pac_cat.py +150 -150
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_cat/predefined_categories.py +200 -200
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/__init__.py +19 -19
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/extension.py +48 -48
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/id_segment.py +89 -89
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/pac_id.py +140 -140
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/url_parser.py +155 -155
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id/url_serializer.py +85 -84
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/__init__.py +2 -2
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_common.py +81 -81
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_v1.py +244 -244
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_v2.py +313 -313
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/resolver.py +97 -97
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/pac_id_resolver/services.py +82 -82
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/qr/__init__.py +1 -1
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/qr/generate_qr.py +422 -422
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/__init__.py +16 -16
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/python_convenience/__init__.py +3 -3
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/python_convenience/data_table.py +87 -87
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/python_convenience/pyTREX.py +248 -248
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/python_convenience/quantity.py +66 -66
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/table_segment.py +245 -245
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/trex.py +69 -69
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/trex_base_models.py +209 -209
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/trex/value_segments.py +99 -99
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/utilities/base36.py +82 -82
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_extensions/__init__.py +4 -4
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_extensions/default_extension_interpreters.py +6 -6
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_extensions/display_name_extension.py +40 -40
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_extensions/trex_extension.py +30 -30
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/__init__.py +5 -5
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/gs1.py +3 -3
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/labfreed/well_known_keys.py +15 -15
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/unece/__init__.py +3 -3
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/unece/unece_units.py +67 -67
- {labfreed-0.2.8 → labfreed-0.2.9}/pyproject.toml +66 -66
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.8 → labfreed-0.2.9}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Environment(please complete the following information):**
|
|
27
|
+
- Python version[e.g. 22]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
**Additional context**
|
|
31
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release-build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.11"
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install .[dev]
|
|
33
|
+
|
|
34
|
+
- name: Run Ruff linter
|
|
35
|
+
run: |
|
|
36
|
+
ruff check . || true
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
run: |
|
|
40
|
+
pytest tests
|
|
41
|
+
|
|
42
|
+
- name: Build release distributions
|
|
43
|
+
run: |
|
|
44
|
+
# NOTE: put your own distribution build steps here.
|
|
45
|
+
python -m pip install build
|
|
46
|
+
python -m build
|
|
47
|
+
|
|
48
|
+
- name: Upload distributions
|
|
49
|
+
uses: actions/upload-artifact@v4
|
|
50
|
+
with:
|
|
51
|
+
name: release-dists
|
|
52
|
+
path: dist/
|
|
53
|
+
|
|
54
|
+
pypi-publish:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
needs:
|
|
57
|
+
- release-build
|
|
58
|
+
permissions:
|
|
59
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
60
|
+
id-token: write
|
|
61
|
+
|
|
62
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
63
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
64
|
+
environment:
|
|
65
|
+
name: pypi
|
|
66
|
+
url: https://pypi.org/project/labfreed/
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- name: Retrieve release distributions
|
|
70
|
+
uses: actions/download-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: release-dists
|
|
73
|
+
path: dist/
|
|
74
|
+
|
|
75
|
+
- name: Publish release distributions to PyPI
|
|
76
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
77
|
+
with:
|
|
78
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Test Labfreed
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v4
|
|
16
|
+
with:
|
|
17
|
+
python-version: '3.11'
|
|
18
|
+
|
|
19
|
+
- name: Install project with dev dependencies
|
|
20
|
+
run: |
|
|
21
|
+
pip install flit
|
|
22
|
+
flit install --deps develop
|
|
23
|
+
|
|
24
|
+
- name: Run tests
|
|
25
|
+
run: pytest
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## Change Log
|
|
2
|
+
### v0.2.9
|
|
3
|
+
- bugfix in serialization of PAC-CAT with multiple categories
|
|
4
|
+
|
|
5
|
+
### v0.2.8
|
|
6
|
+
- option to pass cache to resolver for speedier check of service availability
|
|
7
|
+
|
|
8
|
+
### v0.2.7
|
|
9
|
+
- Improved README. No functional changes
|
|
10
|
+
|
|
11
|
+
### v0.2.6
|
|
12
|
+
- PAC_ID.to_url() preserves the identifier as is by default but allows to force short or long notation.
|
|
13
|
+
- PAC-ID Resolver does not try to resolve PAC-CAT with CIT v1.
|
|
14
|
+
|
|
15
|
+
### v0.2.5
|
|
16
|
+
- resolvers checks service states by default
|
|
17
|
+
- improvements and bugfixes in conversion from python types to TREX
|
|
18
|
+
- follow better naming conventions in CIT v1
|
|
19
|
+
|
|
20
|
+
### v0.2.4
|
|
21
|
+
- improvements in formatting of validation messages
|
|
22
|
+
- bugfix in DataTable
|
|
23
|
+
|
|
24
|
+
### v0.2.3
|
|
25
|
+
- improvements in formatting of validation messages
|
|
26
|
+
- bugfix in DisplayNameExtension
|
|
27
|
+
|
|
28
|
+
### v0.2.2
|
|
29
|
+
- minor changes for better access of subfunctions. No change in existing API
|
|
30
|
+
|
|
31
|
+
### v0.2.1
|
|
32
|
+
- improved docu. no code changes
|
|
33
|
+
|
|
34
|
+
### v0.2.0b2
|
|
35
|
+
- improvements in api consistency and ease of use
|
|
36
|
+
- restructured code for better separation of concerns
|
|
37
|
+
- support for coupling information table v1
|
|
38
|
+
|
|
39
|
+
### v0.1.1
|
|
40
|
+
- minor internal improvements and bugfixes
|
|
41
|
+
|
|
42
|
+
### v0.1.0
|
|
43
|
+
- DRAFT Support for PAC-ID Resolver
|
|
44
|
+
|
|
45
|
+
### v0.0.20
|
|
46
|
+
- bugfix in TREX table to dict conversion
|
|
47
|
+
- markdown compatible validation printing
|
|
48
|
+
|
|
49
|
+
### v0.0.19
|
|
50
|
+
- supports PAC-ID, PAC-CAT, TREX and DisplayName
|
|
51
|
+
- QR generation
|
|
52
|
+
- ok-ish test coverage
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Reto Thürer
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Reto Thürer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: labfreed
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: Python implementation of LabFREED building blocks
|
|
5
5
|
Author-email: Reto Thürer <thuerer.r@buchi.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -106,7 +106,7 @@ pac.print_validation_messages()
|
|
|
106
106
|
>> Validation Results
|
|
107
107
|
>> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
108
108
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
109
|
-
>> │ Characters '
|
|
109
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
110
110
|
>> │ │
|
|
111
111
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
112
112
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -116,7 +116,7 @@ pac.print_validation_messages()
|
|
|
116
116
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
|
|
117
117
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
118
118
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
119
|
-
>> │ Characters '
|
|
119
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
120
120
|
>> │ │
|
|
121
121
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
122
122
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -249,7 +249,7 @@ trex.print_validation_messages()
|
|
|
249
249
|
>> Validation Results
|
|
250
250
|
>> ┌────────────────────────────────────────────────────────────┐
|
|
251
251
|
>> │ **ERROR** in TREX table column Date │
|
|
252
|
-
>> │ Column header key contains invalid characters: '
|
|
252
|
+
>> │ Column header key contains invalid characters: 'e','t','a' │
|
|
253
253
|
>> │ │
|
|
254
254
|
>> │ STOP$T.D:20240505T1306 │
|
|
255
255
|
>> │ +TEMP$KEL:10.15 │
|
|
@@ -257,9 +257,9 @@ trex.print_validation_messages()
|
|
|
257
257
|
>> │ +COMMENT$T.A:FOO │
|
|
258
258
|
>> │ +COMMENT2$T.T:12G3 │
|
|
259
259
|
>> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
|
|
260
|
-
>> │ 1:
|
|
261
|
-
>> │ 1.1:
|
|
262
|
-
>> │ 1.3:
|
|
260
|
+
>> │ 1:20250522T163256.043:T:FOO:: │
|
|
261
|
+
>> │ 1.1:20250522T163256.043:T:BAR:: │
|
|
262
|
+
>> │ 1.3:20250522T163256.043:F:BLUBB │
|
|
263
263
|
>> └────────────────────────────────────────────────────────────┘
|
|
264
264
|
```
|
|
265
265
|
#### Combine PAC-ID and TREX and serialize
|
|
@@ -271,7 +271,7 @@ pac_str = pac.to_url()
|
|
|
271
271
|
print(pac_str)
|
|
272
272
|
```
|
|
273
273
|
```text
|
|
274
|
-
>> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:
|
|
274
|
+
>> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:20250522T163256.043:T:FOO::1.1:20250522T163256.043:T:BAR::1.3:20250522T163256.043:F:BLUBB
|
|
275
275
|
```
|
|
276
276
|
## PAC-ID Resolver
|
|
277
277
|
|
|
@@ -332,6 +332,9 @@ for sg in service_groups:
|
|
|
332
332
|
|
|
333
333
|
<!-- BEGIN CHANGELOG -->
|
|
334
334
|
## Change Log
|
|
335
|
+
### v0.2.9
|
|
336
|
+
- bugfix in serialization of PAC-CAT with multiple categories
|
|
337
|
+
|
|
335
338
|
### v0.2.8
|
|
336
339
|
- option to pass cache to resolver for speedier check of service availability
|
|
337
340
|
|