rustyyaml 0.1.6__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.
- rustyyaml-0.1.6/.github/workflows/ci.yml +127 -0
- rustyyaml-0.1.6/.github/workflows/release.yml +230 -0
- rustyyaml-0.1.6/.gitignore +88 -0
- rustyyaml-0.1.6/Cargo.lock +954 -0
- rustyyaml-0.1.6/Cargo.toml +44 -0
- rustyyaml-0.1.6/LICENSE-APACHE +201 -0
- rustyyaml-0.1.6/LICENSE-MIT +21 -0
- rustyyaml-0.1.6/PKG-INFO +305 -0
- rustyyaml-0.1.6/README.md +277 -0
- rustyyaml-0.1.6/RELEASE.md +423 -0
- rustyyaml-0.1.6/benches/parsing.rs +323 -0
- rustyyaml-0.1.6/benchmarks/README.md +144 -0
- rustyyaml-0.1.6/benchmarks/benchmark_comparison.py +1013 -0
- rustyyaml-0.1.6/benchmarks/quick_benchmark.py +202 -0
- rustyyaml-0.1.6/docs/ARCHITECTURE.md +633 -0
- rustyyaml-0.1.6/docs/migration.md +380 -0
- rustyyaml-0.1.6/pyproject.toml +56 -0
- rustyyaml-0.1.6/python/rustyyaml/__init__.py +349 -0
- rustyyaml-0.1.6/python/rustyyaml/__init__.pyi +60 -0
- rustyyaml-0.1.6/python/rustyyaml/compat.py +256 -0
- rustyyaml-0.1.6/python/rustyyaml/py.typed +2 -0
- rustyyaml-0.1.6/scripts/release.sh +288 -0
- rustyyaml-0.1.6/scripts/update_version.sh +76 -0
- rustyyaml-0.1.6/src/batch.rs +331 -0
- rustyyaml-0.1.6/src/error.rs +181 -0
- rustyyaml-0.1.6/src/lib.rs +222 -0
- rustyyaml-0.1.6/src/parser.rs +262 -0
- rustyyaml-0.1.6/src/safe.rs +165 -0
- rustyyaml-0.1.6/src/types.rs +186 -0
- rustyyaml-0.1.6/tests/fixtures/kubernetes.yaml +153 -0
- rustyyaml-0.1.6/tests/fixtures/large_config.yaml +1192 -0
- rustyyaml-0.1.6/tests/fixtures/medium_config.yaml +206 -0
- rustyyaml-0.1.6/tests/fixtures/small_config.yaml +20 -0
- rustyyaml-0.1.6/tests/test_basic.py +631 -0
- rustyyaml-0.1.6/tests/test_performance.py +258 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Test on ${{ matrix.os }} - Python ${{ matrix.python-version }}
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
21
|
+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: ${{ matrix.python-version }}
|
|
30
|
+
|
|
31
|
+
- name: Install Rust
|
|
32
|
+
uses: dtolnay/rust-toolchain@stable
|
|
33
|
+
|
|
34
|
+
- name: Cache Rust dependencies
|
|
35
|
+
uses: Swatinem/rust-cache@v2
|
|
36
|
+
|
|
37
|
+
- name: Create virtual environment
|
|
38
|
+
run: python -m venv .venv
|
|
39
|
+
|
|
40
|
+
- name: Install dependencies (Unix)
|
|
41
|
+
if: runner.os != 'Windows'
|
|
42
|
+
run: |
|
|
43
|
+
source .venv/bin/activate
|
|
44
|
+
python -m pip install --upgrade pip
|
|
45
|
+
pip install maturin pytest
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies (Windows)
|
|
48
|
+
if: runner.os == 'Windows'
|
|
49
|
+
run: |
|
|
50
|
+
.venv\Scripts\activate
|
|
51
|
+
python -m pip install --upgrade pip
|
|
52
|
+
pip install maturin pytest
|
|
53
|
+
|
|
54
|
+
- name: Build and install (Unix)
|
|
55
|
+
if: runner.os != 'Windows'
|
|
56
|
+
run: |
|
|
57
|
+
source .venv/bin/activate
|
|
58
|
+
maturin develop --release
|
|
59
|
+
|
|
60
|
+
- name: Build and install (Windows)
|
|
61
|
+
if: runner.os == 'Windows'
|
|
62
|
+
run: |
|
|
63
|
+
.venv\Scripts\activate
|
|
64
|
+
maturin develop --release
|
|
65
|
+
|
|
66
|
+
- name: Run Python tests (Unix)
|
|
67
|
+
if: runner.os != 'Windows'
|
|
68
|
+
run: |
|
|
69
|
+
source .venv/bin/activate
|
|
70
|
+
pytest tests/ -v
|
|
71
|
+
|
|
72
|
+
- name: Run Python tests (Windows)
|
|
73
|
+
if: runner.os == 'Windows'
|
|
74
|
+
run: |
|
|
75
|
+
.venv\Scripts\activate
|
|
76
|
+
pytest tests/ -v
|
|
77
|
+
|
|
78
|
+
- name: Run Rust tests
|
|
79
|
+
run: cargo test
|
|
80
|
+
|
|
81
|
+
lint:
|
|
82
|
+
name: Lint
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
|
|
88
|
+
- name: Install Rust
|
|
89
|
+
uses: dtolnay/rust-toolchain@stable
|
|
90
|
+
with:
|
|
91
|
+
components: rustfmt, clippy
|
|
92
|
+
|
|
93
|
+
- name: Format check
|
|
94
|
+
run: cargo fmt -- --check
|
|
95
|
+
|
|
96
|
+
- name: Clippy
|
|
97
|
+
run: cargo clippy -- -D warnings
|
|
98
|
+
|
|
99
|
+
- name: Set up Python
|
|
100
|
+
uses: actions/setup-python@v5
|
|
101
|
+
with:
|
|
102
|
+
python-version: '3.12'
|
|
103
|
+
|
|
104
|
+
- name: Install Python linters
|
|
105
|
+
run: pip install black ruff
|
|
106
|
+
|
|
107
|
+
- name: Black format check
|
|
108
|
+
run: black --check python/ || true
|
|
109
|
+
|
|
110
|
+
- name: Ruff lint
|
|
111
|
+
run: ruff check python/ || true
|
|
112
|
+
|
|
113
|
+
security:
|
|
114
|
+
name: Security Audit
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
|
|
117
|
+
steps:
|
|
118
|
+
- uses: actions/checkout@v4
|
|
119
|
+
|
|
120
|
+
- name: Install Rust
|
|
121
|
+
uses: dtolnay/rust-toolchain@stable
|
|
122
|
+
|
|
123
|
+
- name: Install cargo-audit
|
|
124
|
+
run: cargo install cargo-audit
|
|
125
|
+
|
|
126
|
+
- name: Security audit
|
|
127
|
+
run: cargo audit || true
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
PACKAGE_NAME: rustyyaml
|
|
13
|
+
PYTHON_VERSION: '3.12'
|
|
14
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: '1'
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
# Build source distribution
|
|
18
|
+
sdist:
|
|
19
|
+
name: Build sdist
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Build sdist
|
|
25
|
+
uses: PyO3/maturin-action@v1
|
|
26
|
+
with:
|
|
27
|
+
command: sdist
|
|
28
|
+
args: --out dist
|
|
29
|
+
|
|
30
|
+
- name: Upload sdist
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: dist-sdist
|
|
34
|
+
path: dist/*.tar.gz
|
|
35
|
+
|
|
36
|
+
# Build wheels for Linux x86_64
|
|
37
|
+
linux-x86_64:
|
|
38
|
+
name: Build Linux x86_64
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Build wheels
|
|
44
|
+
uses: PyO3/maturin-action@v1
|
|
45
|
+
with:
|
|
46
|
+
target: x86_64
|
|
47
|
+
args: --release --out dist
|
|
48
|
+
manylinux: auto
|
|
49
|
+
|
|
50
|
+
- name: Upload wheels
|
|
51
|
+
uses: actions/upload-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
name: dist-linux-x86_64
|
|
54
|
+
path: dist/*.whl
|
|
55
|
+
|
|
56
|
+
# Build wheels for Linux aarch64
|
|
57
|
+
linux-aarch64:
|
|
58
|
+
name: Build Linux aarch64
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- name: Build wheels
|
|
64
|
+
uses: PyO3/maturin-action@v1
|
|
65
|
+
with:
|
|
66
|
+
target: aarch64
|
|
67
|
+
args: --release --out dist
|
|
68
|
+
manylinux: auto
|
|
69
|
+
|
|
70
|
+
- name: Upload wheels
|
|
71
|
+
uses: actions/upload-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: dist-linux-aarch64
|
|
74
|
+
path: dist/*.whl
|
|
75
|
+
|
|
76
|
+
# Build wheels for Linux armv7
|
|
77
|
+
linux-armv7:
|
|
78
|
+
name: Build Linux armv7
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v4
|
|
82
|
+
|
|
83
|
+
- name: Build wheels
|
|
84
|
+
uses: PyO3/maturin-action@v1
|
|
85
|
+
with:
|
|
86
|
+
target: armv7
|
|
87
|
+
args: --release --out dist
|
|
88
|
+
manylinux: auto
|
|
89
|
+
|
|
90
|
+
- name: Upload wheels
|
|
91
|
+
uses: actions/upload-artifact@v4
|
|
92
|
+
with:
|
|
93
|
+
name: dist-linux-armv7
|
|
94
|
+
path: dist/*.whl
|
|
95
|
+
|
|
96
|
+
# Build wheels for macOS (universal2 - Intel + Apple Silicon)
|
|
97
|
+
macos:
|
|
98
|
+
name: Build macOS universal
|
|
99
|
+
runs-on: macos-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
|
|
103
|
+
- name: Build wheels
|
|
104
|
+
uses: PyO3/maturin-action@v1
|
|
105
|
+
with:
|
|
106
|
+
target: universal2-apple-darwin
|
|
107
|
+
args: --release --out dist
|
|
108
|
+
|
|
109
|
+
- name: Upload wheels
|
|
110
|
+
uses: actions/upload-artifact@v4
|
|
111
|
+
with:
|
|
112
|
+
name: dist-macos
|
|
113
|
+
path: dist/*.whl
|
|
114
|
+
|
|
115
|
+
# Build wheels for Windows x86_64
|
|
116
|
+
windows-x86_64:
|
|
117
|
+
name: Build Windows x86_64
|
|
118
|
+
runs-on: windows-latest
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v4
|
|
121
|
+
|
|
122
|
+
- name: Build wheels
|
|
123
|
+
uses: PyO3/maturin-action@v1
|
|
124
|
+
with:
|
|
125
|
+
target: x64
|
|
126
|
+
args: --release --out dist
|
|
127
|
+
|
|
128
|
+
- name: Upload wheels
|
|
129
|
+
uses: actions/upload-artifact@v4
|
|
130
|
+
with:
|
|
131
|
+
name: dist-windows-x86_64
|
|
132
|
+
path: dist/*.whl
|
|
133
|
+
|
|
134
|
+
# Publish to PyPI
|
|
135
|
+
publish:
|
|
136
|
+
name: Publish to PyPI
|
|
137
|
+
runs-on: ubuntu-latest
|
|
138
|
+
needs:
|
|
139
|
+
[sdist, linux-x86_64, linux-aarch64, linux-armv7, macos, windows-x86_64]
|
|
140
|
+
environment:
|
|
141
|
+
name: pypi
|
|
142
|
+
url: https://pypi.org/p/rustyyaml
|
|
143
|
+
permissions:
|
|
144
|
+
id-token: write
|
|
145
|
+
|
|
146
|
+
steps:
|
|
147
|
+
- name: Download sdist
|
|
148
|
+
uses: actions/download-artifact@v4
|
|
149
|
+
with:
|
|
150
|
+
name: dist-sdist
|
|
151
|
+
path: dist/
|
|
152
|
+
|
|
153
|
+
- name: Download Linux x86_64 wheels
|
|
154
|
+
uses: actions/download-artifact@v4
|
|
155
|
+
with:
|
|
156
|
+
name: dist-linux-x86_64
|
|
157
|
+
path: dist/
|
|
158
|
+
|
|
159
|
+
- name: Download Linux aarch64 wheels
|
|
160
|
+
uses: actions/download-artifact@v4
|
|
161
|
+
with:
|
|
162
|
+
name: dist-linux-aarch64
|
|
163
|
+
path: dist/
|
|
164
|
+
|
|
165
|
+
- name: Download Linux armv7 wheels
|
|
166
|
+
uses: actions/download-artifact@v4
|
|
167
|
+
with:
|
|
168
|
+
name: dist-linux-armv7
|
|
169
|
+
path: dist/
|
|
170
|
+
|
|
171
|
+
- name: Download macOS wheels
|
|
172
|
+
uses: actions/download-artifact@v4
|
|
173
|
+
with:
|
|
174
|
+
name: dist-macos
|
|
175
|
+
path: dist/
|
|
176
|
+
|
|
177
|
+
- name: Download Windows wheels
|
|
178
|
+
uses: actions/download-artifact@v4
|
|
179
|
+
with:
|
|
180
|
+
name: dist-windows-x86_64
|
|
181
|
+
path: dist/
|
|
182
|
+
|
|
183
|
+
- name: List all artifacts
|
|
184
|
+
run: ls -la dist/
|
|
185
|
+
|
|
186
|
+
- name: Validate wheel files
|
|
187
|
+
run: |
|
|
188
|
+
pip install wheel
|
|
189
|
+
for f in dist/*.whl; do
|
|
190
|
+
echo "Validating $f..."
|
|
191
|
+
python -m zipfile -t "$f" || echo "Warning: $f may be corrupted"
|
|
192
|
+
done
|
|
193
|
+
|
|
194
|
+
- name: Publish to PyPI
|
|
195
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
196
|
+
with:
|
|
197
|
+
packages-dir: dist/
|
|
198
|
+
skip-existing: true
|
|
199
|
+
verbose: true
|
|
200
|
+
|
|
201
|
+
# Create GitHub Release
|
|
202
|
+
release:
|
|
203
|
+
name: Create GitHub Release
|
|
204
|
+
runs-on: ubuntu-latest
|
|
205
|
+
needs: [publish]
|
|
206
|
+
permissions:
|
|
207
|
+
contents: write
|
|
208
|
+
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/checkout@v4
|
|
211
|
+
|
|
212
|
+
- name: Download all artifacts
|
|
213
|
+
uses: actions/download-artifact@v4
|
|
214
|
+
with:
|
|
215
|
+
path: artifacts/
|
|
216
|
+
|
|
217
|
+
- name: Collect dist files
|
|
218
|
+
run: |
|
|
219
|
+
mkdir -p dist
|
|
220
|
+
find artifacts -name "*.whl" -exec cp {} dist/ \;
|
|
221
|
+
find artifacts -name "*.tar.gz" -exec cp {} dist/ \;
|
|
222
|
+
ls -la dist/
|
|
223
|
+
|
|
224
|
+
- name: Create Release
|
|
225
|
+
uses: softprops/action-gh-release@v1
|
|
226
|
+
with:
|
|
227
|
+
files: dist/*
|
|
228
|
+
generate_release_notes: true
|
|
229
|
+
draft: false
|
|
230
|
+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
target/
|
|
3
|
+
Cargo.lock
|
|
4
|
+
|
|
5
|
+
# Python
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
*.so
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
|
|
28
|
+
# Virtual environments
|
|
29
|
+
venv/
|
|
30
|
+
ENV/
|
|
31
|
+
env/
|
|
32
|
+
.venv/
|
|
33
|
+
|
|
34
|
+
# IDEs
|
|
35
|
+
.vscode/
|
|
36
|
+
.idea/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
*~
|
|
40
|
+
.project
|
|
41
|
+
.pydevproject
|
|
42
|
+
.settings/
|
|
43
|
+
|
|
44
|
+
# OS
|
|
45
|
+
.DS_Store
|
|
46
|
+
.DS_Store?
|
|
47
|
+
._*
|
|
48
|
+
.Spotlight-V100
|
|
49
|
+
.Trashes
|
|
50
|
+
ehthumbs.db
|
|
51
|
+
Thumbs.db
|
|
52
|
+
|
|
53
|
+
# Testing
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
.coverage
|
|
56
|
+
htmlcov/
|
|
57
|
+
.tox/
|
|
58
|
+
.nox/
|
|
59
|
+
coverage.xml
|
|
60
|
+
*.cover
|
|
61
|
+
*.coverage
|
|
62
|
+
.hypothesis/
|
|
63
|
+
|
|
64
|
+
# Benchmarks
|
|
65
|
+
target/criterion/
|
|
66
|
+
|
|
67
|
+
# Maturin
|
|
68
|
+
*.whl
|
|
69
|
+
|
|
70
|
+
# Documentation
|
|
71
|
+
docs/_build/
|
|
72
|
+
site/
|
|
73
|
+
|
|
74
|
+
# Jupyter
|
|
75
|
+
.ipynb_checkpoints/
|
|
76
|
+
|
|
77
|
+
# mypy
|
|
78
|
+
.mypy_cache/
|
|
79
|
+
.dmypy.json
|
|
80
|
+
dmypy.json
|
|
81
|
+
|
|
82
|
+
# ruff
|
|
83
|
+
.ruff_cache/
|
|
84
|
+
|
|
85
|
+
# Local development
|
|
86
|
+
*.local
|
|
87
|
+
.env
|
|
88
|
+
.env.local
|