kiclass 0.2.0__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.
- kiclass-0.2.0/.github/workflows/ci.yml +36 -0
- kiclass-0.2.0/.github/workflows/publish.yml +129 -0
- kiclass-0.2.0/.gitignore +10 -0
- kiclass-0.2.0/Cargo.lock +669 -0
- kiclass-0.2.0/Cargo.toml +32 -0
- kiclass-0.2.0/PKG-INFO +137 -0
- kiclass-0.2.0/README.md +117 -0
- kiclass-0.2.0/build.bat +164 -0
- kiclass-0.2.0/convert_worlddata.py +140 -0
- kiclass-0.2.0/kiclass.pyi +277 -0
- kiclass-0.2.0/py.typed +0 -0
- kiclass-0.2.0/pyproject.toml +28 -0
- kiclass-0.2.0/src/bin_xml/deserialize.rs +1155 -0
- kiclass-0.2.0/src/bin_xml/mod.rs +1 -0
- kiclass-0.2.0/src/classes/builtins.rs +349 -0
- kiclass-0.2.0/src/classes/container.rs +23 -0
- kiclass-0.2.0/src/classes/default.rs +37 -0
- kiclass-0.2.0/src/classes/errors.rs +27 -0
- kiclass-0.2.0/src/classes/flags.rs +61 -0
- kiclass-0.2.0/src/classes/layout.rs +175 -0
- kiclass-0.2.0/src/classes/memory.rs +6 -0
- kiclass-0.2.0/src/classes/mod.rs +184 -0
- kiclass-0.2.0/src/classes/string_ptr.rs +75 -0
- kiclass-0.2.0/src/classes/ty.rs +165 -0
- kiclass-0.2.0/src/classes/xml.rs +1710 -0
- kiclass-0.2.0/src/hashing.rs +45 -0
- kiclass-0.2.0/src/json/mod.rs +1452 -0
- kiclass-0.2.0/src/lib.rs +5 -0
- kiclass-0.2.0/src/python_wrappers.rs +1316 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Build and Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: '3.11'
|
|
22
|
+
|
|
23
|
+
- name: Set up Rust
|
|
24
|
+
uses: dtolnay/rust-toolchain@stable
|
|
25
|
+
|
|
26
|
+
- name: Install Maturin
|
|
27
|
+
run: pip install maturin[patchelf]
|
|
28
|
+
|
|
29
|
+
- name: Build wheels
|
|
30
|
+
run: maturin build --release --out dist --strip
|
|
31
|
+
|
|
32
|
+
- name: Upload wheels
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: wheels-ci
|
|
36
|
+
path: dist
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: Release and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: Release tag to build and publish, for example v0.2.0
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: release-publish-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
validate:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
outputs:
|
|
25
|
+
release_tag: ${{ steps.resolve.outputs.release_tag }}
|
|
26
|
+
release_ref: ${{ steps.resolve.outputs.release_ref }}
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Resolve release ref
|
|
30
|
+
id: resolve
|
|
31
|
+
shell: bash
|
|
32
|
+
run: |
|
|
33
|
+
set -euo pipefail
|
|
34
|
+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
|
35
|
+
TAG="${{ inputs.tag }}"
|
|
36
|
+
else
|
|
37
|
+
TAG="${{ github.ref_name }}"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
41
|
+
echo "Release tag must match v<major>.<minor>.<patch>; got '$TAG'" >&2
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
echo "release_tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
46
|
+
echo "release_ref=refs/tags/$TAG" >> "$GITHUB_OUTPUT"
|
|
47
|
+
|
|
48
|
+
build:
|
|
49
|
+
needs:
|
|
50
|
+
- validate
|
|
51
|
+
strategy:
|
|
52
|
+
matrix:
|
|
53
|
+
os: [ubuntu-latest, windows-latest]
|
|
54
|
+
runs-on: ${{ matrix.os }}
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
with:
|
|
59
|
+
ref: ${{ needs.validate.outputs.release_ref }}
|
|
60
|
+
fetch-depth: 0
|
|
61
|
+
|
|
62
|
+
- name: Set up Python
|
|
63
|
+
uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: '3.11'
|
|
66
|
+
|
|
67
|
+
- name: Set up Rust
|
|
68
|
+
uses: dtolnay/rust-toolchain@stable
|
|
69
|
+
|
|
70
|
+
- name: Install Maturin
|
|
71
|
+
shell: bash
|
|
72
|
+
run: |
|
|
73
|
+
if [ "$RUNNER_OS" = "Windows" ]; then
|
|
74
|
+
pip install maturin
|
|
75
|
+
else
|
|
76
|
+
pip install "maturin[patchelf]"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
- name: Build wheels
|
|
80
|
+
run: maturin build --release --out dist --strip -i python
|
|
81
|
+
|
|
82
|
+
- name: Build source distribution
|
|
83
|
+
if: runner.os == 'Linux'
|
|
84
|
+
run: maturin sdist --out dist
|
|
85
|
+
|
|
86
|
+
- name: Upload distribution artifacts
|
|
87
|
+
uses: actions/upload-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: dist-${{ matrix.os }}
|
|
90
|
+
path: dist/*
|
|
91
|
+
|
|
92
|
+
publish:
|
|
93
|
+
needs:
|
|
94
|
+
- validate
|
|
95
|
+
- build
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
|
|
98
|
+
steps:
|
|
99
|
+
- name: Download all distributions
|
|
100
|
+
uses: actions/download-artifact@v4
|
|
101
|
+
with:
|
|
102
|
+
path: dist
|
|
103
|
+
merge-multiple: true
|
|
104
|
+
|
|
105
|
+
- name: Publish to PyPI
|
|
106
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
107
|
+
with:
|
|
108
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
109
|
+
packages-dir: dist
|
|
110
|
+
|
|
111
|
+
create_release:
|
|
112
|
+
needs:
|
|
113
|
+
- validate
|
|
114
|
+
- publish
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
|
|
117
|
+
steps:
|
|
118
|
+
- name: Download all distributions
|
|
119
|
+
uses: actions/download-artifact@v4
|
|
120
|
+
with:
|
|
121
|
+
path: dist
|
|
122
|
+
merge-multiple: true
|
|
123
|
+
|
|
124
|
+
- name: Create GitHub release
|
|
125
|
+
uses: softprops/action-gh-release@v2
|
|
126
|
+
with:
|
|
127
|
+
tag_name: ${{ needs.validate.outputs.release_tag }}
|
|
128
|
+
generate_release_notes: true
|
|
129
|
+
files: dist/*
|