heavykeeper 0.1.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.
- heavykeeper-0.1.0/.github/dependabot.yml +15 -0
- heavykeeper-0.1.0/.github/workflows/ci.yml +63 -0
- heavykeeper-0.1.0/.github/workflows/release-please.yml +26 -0
- heavykeeper-0.1.0/.github/workflows/release.yml +163 -0
- heavykeeper-0.1.0/Cargo.lock +525 -0
- heavykeeper-0.1.0/Cargo.toml +15 -0
- heavykeeper-0.1.0/LICENSE +21 -0
- heavykeeper-0.1.0/PKG-INFO +240 -0
- heavykeeper-0.1.0/README.md +219 -0
- heavykeeper-0.1.0/pyproject.toml +27 -0
- heavykeeper-0.1.0/src/lib.rs +129 -0
- heavykeeper-0.1.0/test_heavykeeper.py +84 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "cargo" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, master ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Set up Rust
|
|
26
|
+
uses: dtolnay/rust-toolchain@stable
|
|
27
|
+
|
|
28
|
+
- name: Install maturin and pytest (Linux)
|
|
29
|
+
if: runner.os == 'Linux'
|
|
30
|
+
run: pip install maturin[patchelf] pytest
|
|
31
|
+
|
|
32
|
+
- name: Install maturin and pytest (non-Linux)
|
|
33
|
+
if: runner.os != 'Linux'
|
|
34
|
+
run: pip install maturin pytest
|
|
35
|
+
|
|
36
|
+
- name: Build wheel
|
|
37
|
+
run: maturin build --release
|
|
38
|
+
|
|
39
|
+
- name: Install built wheel
|
|
40
|
+
run: pip install --find-links target/wheels heavykeeper
|
|
41
|
+
|
|
42
|
+
- name: Run tests
|
|
43
|
+
run: python -m pytest test_heavykeeper.py -v
|
|
44
|
+
|
|
45
|
+
build-check:
|
|
46
|
+
name: Build check on ${{ matrix.os }}
|
|
47
|
+
runs-on: ${{ matrix.os }}
|
|
48
|
+
strategy:
|
|
49
|
+
matrix:
|
|
50
|
+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
|
|
55
|
+
- name: Set up Rust
|
|
56
|
+
uses: dtolnay/rust-toolchain@stable
|
|
57
|
+
|
|
58
|
+
- name: Build wheels
|
|
59
|
+
uses: PyO3/maturin-action@v1
|
|
60
|
+
with:
|
|
61
|
+
args: --release --out dist --interpreter 3.10 3.11 3.12
|
|
62
|
+
sccache: 'true'
|
|
63
|
+
manylinux: auto
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
issues: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release-please:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
18
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
19
|
+
steps:
|
|
20
|
+
- uses: google-github-actions/release-please-action@v4
|
|
21
|
+
id: release
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
+
with:
|
|
25
|
+
release-type: python
|
|
26
|
+
package-name: heavykeeper
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
name: Build and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Release Please"]
|
|
6
|
+
types: [completed]
|
|
7
|
+
release:
|
|
8
|
+
types: [published]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# Check if this was triggered by a successful release-please run
|
|
12
|
+
check-release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
should_build: ${{ steps.check.outputs.should_build }}
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check if we should build
|
|
18
|
+
id: check
|
|
19
|
+
run: |
|
|
20
|
+
if [[ "${{ github.event_name }}" == "release" ]]; then
|
|
21
|
+
echo "should_build=true" >> $GITHUB_OUTPUT
|
|
22
|
+
elif [[ "${{ github.event_name }}" == "workflow_run" && "${{ github.event.workflow_run.conclusion }}" == "success" ]]; then
|
|
23
|
+
echo "should_build=true" >> $GITHUB_OUTPUT
|
|
24
|
+
else
|
|
25
|
+
echo "should_build=false" >> $GITHUB_OUTPUT
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
test:
|
|
29
|
+
needs: check-release
|
|
30
|
+
if: needs.check-release.outputs.should_build == 'true'
|
|
31
|
+
runs-on: ${{ matrix.os }}
|
|
32
|
+
strategy:
|
|
33
|
+
matrix:
|
|
34
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
35
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
|
|
40
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
41
|
+
uses: actions/setup-python@v4
|
|
42
|
+
with:
|
|
43
|
+
python-version: ${{ matrix.python-version }}
|
|
44
|
+
|
|
45
|
+
- name: Set up Rust
|
|
46
|
+
uses: dtolnay/rust-toolchain@stable
|
|
47
|
+
|
|
48
|
+
- name: Install maturin and pytest (Linux)
|
|
49
|
+
if: runner.os == 'Linux'
|
|
50
|
+
run: pip install maturin[patchelf] pytest
|
|
51
|
+
|
|
52
|
+
- name: Install maturin and pytest (non-Linux)
|
|
53
|
+
if: runner.os != 'Linux'
|
|
54
|
+
run: pip install maturin pytest
|
|
55
|
+
|
|
56
|
+
- name: Build wheel
|
|
57
|
+
run: maturin build --release
|
|
58
|
+
|
|
59
|
+
- name: Install built wheel
|
|
60
|
+
run: pip install --find-links target/wheels heavykeeper
|
|
61
|
+
|
|
62
|
+
- name: Run tests
|
|
63
|
+
run: python -m pytest test_heavykeeper.py -v
|
|
64
|
+
|
|
65
|
+
build-wheels:
|
|
66
|
+
name: Build wheels on ${{ matrix.os }}
|
|
67
|
+
needs: check-release
|
|
68
|
+
if: needs.check-release.outputs.should_build == 'true'
|
|
69
|
+
runs-on: ${{ matrix.os }}
|
|
70
|
+
strategy:
|
|
71
|
+
matrix:
|
|
72
|
+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
|
|
77
|
+
- name: Set up Rust
|
|
78
|
+
uses: dtolnay/rust-toolchain@stable
|
|
79
|
+
|
|
80
|
+
- name: Build wheels
|
|
81
|
+
uses: PyO3/maturin-action@v1
|
|
82
|
+
with:
|
|
83
|
+
args: --release --out dist --interpreter 3.10 3.11 3.12
|
|
84
|
+
sccache: 'true'
|
|
85
|
+
manylinux: auto
|
|
86
|
+
|
|
87
|
+
- name: Upload wheels
|
|
88
|
+
uses: actions/upload-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: wheels-${{ matrix.os }}
|
|
91
|
+
path: dist
|
|
92
|
+
|
|
93
|
+
build-wheels-cross:
|
|
94
|
+
name: Build wheels (Linux ARM64)
|
|
95
|
+
needs: check-release
|
|
96
|
+
if: needs.check-release.outputs.should_build == 'true'
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v4
|
|
101
|
+
|
|
102
|
+
- name: Set up Rust
|
|
103
|
+
uses: dtolnay/rust-toolchain@stable
|
|
104
|
+
|
|
105
|
+
- name: Build wheels
|
|
106
|
+
uses: PyO3/maturin-action@v1
|
|
107
|
+
with:
|
|
108
|
+
target: aarch64-unknown-linux-gnu
|
|
109
|
+
args: --release --out dist --interpreter 3.10 3.11 3.12
|
|
110
|
+
sccache: 'true'
|
|
111
|
+
manylinux: auto
|
|
112
|
+
|
|
113
|
+
- name: Upload wheels
|
|
114
|
+
uses: actions/upload-artifact@v4
|
|
115
|
+
with:
|
|
116
|
+
name: wheels-linux-aarch64
|
|
117
|
+
path: dist
|
|
118
|
+
|
|
119
|
+
build-sdist:
|
|
120
|
+
name: Build source distribution
|
|
121
|
+
needs: check-release
|
|
122
|
+
if: needs.check-release.outputs.should_build == 'true'
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
|
|
127
|
+
- name: Set up Rust
|
|
128
|
+
uses: dtolnay/rust-toolchain@stable
|
|
129
|
+
|
|
130
|
+
- name: Build sdist
|
|
131
|
+
uses: PyO3/maturin-action@v1
|
|
132
|
+
with:
|
|
133
|
+
command: sdist
|
|
134
|
+
args: --out dist
|
|
135
|
+
|
|
136
|
+
- name: Upload sdist
|
|
137
|
+
uses: actions/upload-artifact@v4
|
|
138
|
+
with:
|
|
139
|
+
name: sdist
|
|
140
|
+
path: dist
|
|
141
|
+
|
|
142
|
+
publish:
|
|
143
|
+
name: Publish to PyPI
|
|
144
|
+
runs-on: ubuntu-latest
|
|
145
|
+
needs: [test, build-wheels, build-wheels-cross, build-sdist]
|
|
146
|
+
if: needs.check-release.outputs.should_build == 'true'
|
|
147
|
+
environment:
|
|
148
|
+
name: pypi
|
|
149
|
+
url: https://pypi.org/p/heavykeeper
|
|
150
|
+
permissions:
|
|
151
|
+
id-token: write # For trusted publishing
|
|
152
|
+
|
|
153
|
+
steps:
|
|
154
|
+
- name: Download all artifacts
|
|
155
|
+
uses: actions/download-artifact@v4
|
|
156
|
+
with:
|
|
157
|
+
path: dist
|
|
158
|
+
merge-multiple: true
|
|
159
|
+
|
|
160
|
+
- name: Publish to PyPI
|
|
161
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
162
|
+
with:
|
|
163
|
+
skip-existing: true
|