hl7conv2 0.2.3__tar.gz → 0.2.4__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.
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/.github/workflows/CI.yml +8 -8
- hl7conv2-0.2.4/.github/workflows/release.yml +238 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/Cargo.lock +441 -123
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/Cargo.toml +5 -5
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/PKG-INFO +1 -1
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/pyproject.toml +3 -3
- hl7conv2-0.2.3/.github/workflows/release.yml +0 -116
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/.gitignore +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/LICENSE +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/README.md +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/coverage.sh +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/examples/basic_usage.py +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/examples/hl7_example.txt +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/examples/json_example.json +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/lint.sh +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/python/__init__.py +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/python/hl7conv2/__init__.py +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/python/hl7conv2/hl7conv2.pyi +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/python/hl7conv2/py.typed +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/errors.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/escape.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/hl7_json.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/json_hl7.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/lib.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/segments.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/core_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/errors_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/integration_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/json_hl7_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/mod.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/pyo3_api_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/segments_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/test_data/complex_adt_a01.hl7 +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/test_data/complex_oru_r01.hl7 +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/test_data/edge_case_repetitions.hl7 +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/test_data/lipid_panel_oru.hl7 +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/utils_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/tests/validation_tests.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/utils.rs +0 -0
- {hl7conv2-0.2.3 → hl7conv2-0.2.4}/src/validation.rs +0 -0
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@v5
|
|
23
23
|
|
|
24
24
|
- name: Install Rust toolchain
|
|
25
25
|
uses: dtolnay/rust-toolchain@stable
|
|
@@ -27,35 +27,35 @@ jobs:
|
|
|
27
27
|
components: rustfmt, clippy
|
|
28
28
|
|
|
29
29
|
- name: Cache cargo registry
|
|
30
|
-
uses: actions/cache@
|
|
30
|
+
uses: actions/cache@v4
|
|
31
31
|
with:
|
|
32
32
|
path: ~/.cargo/registry
|
|
33
33
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
34
34
|
|
|
35
35
|
- name: Cache cargo index
|
|
36
|
-
uses: actions/cache@
|
|
36
|
+
uses: actions/cache@v4
|
|
37
37
|
with:
|
|
38
38
|
path: ~/.cargo/git
|
|
39
39
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
|
40
40
|
|
|
41
41
|
- name: Cache cargo build
|
|
42
|
-
uses: actions/cache@
|
|
42
|
+
uses: actions/cache@v4
|
|
43
43
|
with:
|
|
44
44
|
path: target
|
|
45
45
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
46
46
|
|
|
47
47
|
- name: Set up Python ${{ matrix.python-version }}
|
|
48
|
-
uses: actions/setup-python@
|
|
48
|
+
uses: actions/setup-python@v6
|
|
49
49
|
with:
|
|
50
50
|
python-version: ${{ matrix.python-version }}
|
|
51
51
|
|
|
52
52
|
- name: Install maturin (Linux)
|
|
53
53
|
if: runner.os == 'Linux'
|
|
54
|
-
run: pip install maturin[patchelf]
|
|
54
|
+
run: pip install "maturin[patchelf]>=1.13"
|
|
55
55
|
|
|
56
56
|
- name: Install maturin (Windows/macOS)
|
|
57
57
|
if: runner.os != 'Linux'
|
|
58
|
-
run: pip install maturin
|
|
58
|
+
run: pip install "maturin>=1.13"
|
|
59
59
|
|
|
60
60
|
- name: Install cargo-tomlfmt
|
|
61
61
|
run: cargo install cargo-tomlfmt
|
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
name: Security Audit
|
|
83
83
|
runs-on: ubuntu-latest
|
|
84
84
|
steps:
|
|
85
|
-
- uses: actions/checkout@
|
|
85
|
+
- uses: actions/checkout@v5
|
|
86
86
|
|
|
87
87
|
- name: Install Rust toolchain
|
|
88
88
|
uses: dtolnay/rust-toolchain@stable
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
CARGO_TERM_COLOR: always
|
|
9
|
+
MATURIN_VERSION: v1.13.3
|
|
10
|
+
MATURIN_BUILD_ARGS: --release --locked --out dist --compatibility pypi --find-interpreter
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
sdist:
|
|
14
|
+
name: Build sdist
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v5
|
|
18
|
+
|
|
19
|
+
- name: Build sdist
|
|
20
|
+
uses: PyO3/maturin-action@v1
|
|
21
|
+
with:
|
|
22
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
23
|
+
command: sdist
|
|
24
|
+
args: --out dist
|
|
25
|
+
|
|
26
|
+
- name: Upload sdist
|
|
27
|
+
uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: wheels-sdist
|
|
30
|
+
path: dist/*.tar.gz
|
|
31
|
+
|
|
32
|
+
linux-gnu:
|
|
33
|
+
name: Linux manylinux (${{ matrix.target }})
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
strategy:
|
|
36
|
+
fail-fast: false
|
|
37
|
+
matrix:
|
|
38
|
+
target: [x86_64, x86, aarch64]
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v5
|
|
41
|
+
|
|
42
|
+
- name: Set up Python
|
|
43
|
+
uses: actions/setup-python@v6
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.12"
|
|
46
|
+
|
|
47
|
+
- name: Set up QEMU
|
|
48
|
+
if: matrix.target == 'aarch64'
|
|
49
|
+
uses: docker/setup-qemu-action@v3
|
|
50
|
+
with:
|
|
51
|
+
platforms: all
|
|
52
|
+
|
|
53
|
+
- name: Build wheels
|
|
54
|
+
uses: PyO3/maturin-action@v1
|
|
55
|
+
with:
|
|
56
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
57
|
+
target: ${{ matrix.target }}
|
|
58
|
+
manylinux: 2_28
|
|
59
|
+
args: ${{ env.MATURIN_BUILD_ARGS }}
|
|
60
|
+
|
|
61
|
+
- name: Upload wheels
|
|
62
|
+
uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: wheels-linux-gnu-${{ matrix.target }}
|
|
65
|
+
path: dist/*.whl
|
|
66
|
+
|
|
67
|
+
musllinux:
|
|
68
|
+
name: Linux musllinux (${{ matrix.target }})
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
strategy:
|
|
71
|
+
fail-fast: false
|
|
72
|
+
matrix:
|
|
73
|
+
target: [x86_64, x86, aarch64]
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v5
|
|
76
|
+
|
|
77
|
+
- name: Set up Python
|
|
78
|
+
uses: actions/setup-python@v6
|
|
79
|
+
with:
|
|
80
|
+
python-version: "3.12"
|
|
81
|
+
|
|
82
|
+
- name: Set up QEMU
|
|
83
|
+
if: matrix.target == 'aarch64'
|
|
84
|
+
uses: docker/setup-qemu-action@v3
|
|
85
|
+
with:
|
|
86
|
+
platforms: all
|
|
87
|
+
|
|
88
|
+
- name: Build wheels
|
|
89
|
+
uses: PyO3/maturin-action@v1
|
|
90
|
+
with:
|
|
91
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
92
|
+
target: ${{ matrix.target }}
|
|
93
|
+
manylinux: musllinux_1_2
|
|
94
|
+
args: ${{ env.MATURIN_BUILD_ARGS }}
|
|
95
|
+
|
|
96
|
+
- name: Upload wheels
|
|
97
|
+
uses: actions/upload-artifact@v4
|
|
98
|
+
with:
|
|
99
|
+
name: wheels-musllinux-${{ matrix.target }}
|
|
100
|
+
path: dist/*.whl
|
|
101
|
+
|
|
102
|
+
windows:
|
|
103
|
+
name: Windows (${{ matrix.platform.target }})
|
|
104
|
+
runs-on: windows-latest
|
|
105
|
+
strategy:
|
|
106
|
+
fail-fast: false
|
|
107
|
+
matrix:
|
|
108
|
+
platform:
|
|
109
|
+
- target: x86_64
|
|
110
|
+
python_arch: x64
|
|
111
|
+
- target: x86
|
|
112
|
+
python_arch: x86
|
|
113
|
+
- target: aarch64
|
|
114
|
+
python_arch: x64
|
|
115
|
+
steps:
|
|
116
|
+
- uses: actions/checkout@v5
|
|
117
|
+
|
|
118
|
+
- name: Set up Python
|
|
119
|
+
uses: actions/setup-python@v6
|
|
120
|
+
with:
|
|
121
|
+
python-version: "3.12"
|
|
122
|
+
architecture: ${{ matrix.platform.python_arch }}
|
|
123
|
+
|
|
124
|
+
- name: Build wheels
|
|
125
|
+
uses: PyO3/maturin-action@v1
|
|
126
|
+
with:
|
|
127
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
128
|
+
target: ${{ matrix.platform.target }}
|
|
129
|
+
args: ${{ env.MATURIN_BUILD_ARGS }}
|
|
130
|
+
env:
|
|
131
|
+
XWIN_VERSION: "16"
|
|
132
|
+
|
|
133
|
+
- name: Upload wheels
|
|
134
|
+
uses: actions/upload-artifact@v4
|
|
135
|
+
with:
|
|
136
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
137
|
+
path: dist/*.whl
|
|
138
|
+
|
|
139
|
+
macos:
|
|
140
|
+
name: macOS (${{ matrix.target }})
|
|
141
|
+
runs-on: macos-latest
|
|
142
|
+
strategy:
|
|
143
|
+
fail-fast: false
|
|
144
|
+
matrix:
|
|
145
|
+
include:
|
|
146
|
+
- target: x86_64
|
|
147
|
+
python_arch: x64
|
|
148
|
+
- target: aarch64
|
|
149
|
+
python_arch: arm64
|
|
150
|
+
steps:
|
|
151
|
+
- uses: actions/checkout@v5
|
|
152
|
+
|
|
153
|
+
- name: Set up Python
|
|
154
|
+
uses: actions/setup-python@v6
|
|
155
|
+
with:
|
|
156
|
+
python-version: "3.12"
|
|
157
|
+
architecture: ${{ matrix.python_arch }}
|
|
158
|
+
|
|
159
|
+
- name: Build wheels
|
|
160
|
+
uses: PyO3/maturin-action@v1
|
|
161
|
+
with:
|
|
162
|
+
maturin-version: ${{ env.MATURIN_VERSION }}
|
|
163
|
+
target: ${{ matrix.target }}
|
|
164
|
+
args: ${{ env.MATURIN_BUILD_ARGS }}
|
|
165
|
+
|
|
166
|
+
- name: Upload wheels
|
|
167
|
+
uses: actions/upload-artifact@v4
|
|
168
|
+
with:
|
|
169
|
+
name: wheels-macos-${{ matrix.target }}
|
|
170
|
+
path: dist/*.whl
|
|
171
|
+
|
|
172
|
+
publish:
|
|
173
|
+
name: Publish to PyPI
|
|
174
|
+
runs-on: ubuntu-latest
|
|
175
|
+
needs: [sdist, linux-gnu, musllinux, windows, macos]
|
|
176
|
+
permissions:
|
|
177
|
+
contents: read
|
|
178
|
+
id-token: write
|
|
179
|
+
steps:
|
|
180
|
+
- name: Download artifacts
|
|
181
|
+
uses: actions/download-artifact@v4
|
|
182
|
+
with:
|
|
183
|
+
pattern: wheels-*
|
|
184
|
+
merge-multiple: false
|
|
185
|
+
path: wheel-artifacts
|
|
186
|
+
|
|
187
|
+
- name: Collect and validate wheels
|
|
188
|
+
run: |
|
|
189
|
+
python -c "
|
|
190
|
+
import shutil, sys, zipfile
|
|
191
|
+
from pathlib import Path
|
|
192
|
+
|
|
193
|
+
dist = Path('dist')
|
|
194
|
+
dist.mkdir(exist_ok=True)
|
|
195
|
+
wheels = sorted(Path('wheel-artifacts').rglob('*.whl'))
|
|
196
|
+
if not wheels:
|
|
197
|
+
print('No wheels found', file=sys.stderr)
|
|
198
|
+
sys.exit(1)
|
|
199
|
+
|
|
200
|
+
for src in wheels:
|
|
201
|
+
dest = dist / src.name
|
|
202
|
+
try:
|
|
203
|
+
with zipfile.ZipFile(src) as zf:
|
|
204
|
+
if zf.testzip() is not None:
|
|
205
|
+
raise zipfile.BadZipFile('testzip failed')
|
|
206
|
+
except Exception as exc:
|
|
207
|
+
print(f'SKIP corrupt source {src}: {exc}', file=sys.stderr)
|
|
208
|
+
continue
|
|
209
|
+
if dest.exists():
|
|
210
|
+
print(f'WARN duplicate {src.name}, keeping last valid copy', file=sys.stderr)
|
|
211
|
+
shutil.copy2(src, dest)
|
|
212
|
+
|
|
213
|
+
final = list(dist.glob('*.whl'))
|
|
214
|
+
bad = []
|
|
215
|
+
for whl in final:
|
|
216
|
+
try:
|
|
217
|
+
with zipfile.ZipFile(whl) as zf:
|
|
218
|
+
if zf.testzip() is not None:
|
|
219
|
+
bad.append(whl.name)
|
|
220
|
+
except Exception as exc:
|
|
221
|
+
bad.append(f'{whl.name}: {exc}')
|
|
222
|
+
if bad:
|
|
223
|
+
print('Corrupt wheels in dist:', *bad, sep='\n ', file=sys.stderr)
|
|
224
|
+
sys.exit(1)
|
|
225
|
+
print(f'Collected {len(final)} wheels for upload')
|
|
226
|
+
"
|
|
227
|
+
|
|
228
|
+
- name: Collect sdist
|
|
229
|
+
run: |
|
|
230
|
+
mkdir -p dist
|
|
231
|
+
find wheel-artifacts -name '*.tar.gz' -exec cp {} dist/ \;
|
|
232
|
+
ls -la dist/
|
|
233
|
+
|
|
234
|
+
- name: Publish to PyPI
|
|
235
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
236
|
+
with:
|
|
237
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
238
|
+
packages-dir: dist
|