pkpython 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.
- pkpython-0.1.0/.claude/settings.local.json +14 -0
- pkpython-0.1.0/.github/workflows/ci.yml +43 -0
- pkpython-0.1.0/.github/workflows/publish.yml +93 -0
- pkpython-0.1.0/.gitignore +10 -0
- pkpython-0.1.0/Cargo.lock +1959 -0
- pkpython-0.1.0/Cargo.toml +20 -0
- pkpython-0.1.0/LICENSE +674 -0
- pkpython-0.1.0/Makefile +77 -0
- pkpython-0.1.0/PKG-INFO +873 -0
- pkpython-0.1.0/README.md +854 -0
- pkpython-0.1.0/demo.py +218 -0
- pkpython-0.1.0/docs/STACK.md +35 -0
- pkpython-0.1.0/docs/pypi-publishing-plan.md +228 -0
- pkpython-0.1.0/examples/calc.py +150 -0
- pkpython-0.1.0/examples/gto.py +90 -0
- pkpython-0.1.0/examples/the_hand.py +125 -0
- pkpython-0.1.0/pyproject.toml +34 -0
- pkpython-0.1.0/python/pkpy/__init__.py +129 -0
- pkpython-0.1.0/src/lib.rs +4040 -0
- pkpython-0.1.0/tests/test_pkpy.py +1136 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(curl:*)",
|
|
5
|
+
"Bash(python3 -m venv --help)",
|
|
6
|
+
"Bash(.venv/bin/maturin develop:*)",
|
|
7
|
+
"Bash(.venv/bin/python examples/calc.py -d \"6♠ 6♥ 5♦ 5♣\" -b \"9♣ 6♦ 5♥ 5♠ 8♠\")",
|
|
8
|
+
"Bash(find /Users/christoph/src/github.com/folkengine/pkcore/src -type f -name *.rs)",
|
|
9
|
+
"Bash(.venv/bin/python examples/gto.py -p \"K♠ K♥\" -v \"66+,AJs+,KQs,AJo+,KQo\" 2>&1)",
|
|
10
|
+
"Bash(.venv/bin/python examples/gto.py -p \"K♠ K♥\" -v \"AA,QQ\" -b \"9♣ 6♦ 5♥\")",
|
|
11
|
+
"Bash(grep:*)"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.13"
|
|
19
|
+
|
|
20
|
+
- name: Set up Rust
|
|
21
|
+
uses: dtolnay/rust-toolchain@stable
|
|
22
|
+
|
|
23
|
+
- name: Cache Rust build
|
|
24
|
+
uses: actions/cache@v4
|
|
25
|
+
with:
|
|
26
|
+
path: |
|
|
27
|
+
~/.cargo/registry
|
|
28
|
+
~/.cargo/git
|
|
29
|
+
target
|
|
30
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
31
|
+
restore-keys: ${{ runner.os }}-cargo-
|
|
32
|
+
|
|
33
|
+
- name: Create virtualenv
|
|
34
|
+
run: python -m venv .venv
|
|
35
|
+
|
|
36
|
+
- name: Install maturin and pytest
|
|
37
|
+
run: .venv/bin/pip install maturin pytest
|
|
38
|
+
|
|
39
|
+
- name: Build and install wheel
|
|
40
|
+
run: .venv/bin/maturin develop
|
|
41
|
+
|
|
42
|
+
- name: Run tests
|
|
43
|
+
run: .venv/bin/pytest
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # required for PyPI trusted publishing
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
target: [x86_64, aarch64]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: PyO3/maturin-action@v1
|
|
20
|
+
with:
|
|
21
|
+
target: ${{ matrix.target }}
|
|
22
|
+
args: --release --out dist --find-interpreter
|
|
23
|
+
sccache: "true"
|
|
24
|
+
manylinux: auto
|
|
25
|
+
- uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: wheels-linux-${{ matrix.target }}
|
|
28
|
+
path: dist
|
|
29
|
+
|
|
30
|
+
macos:
|
|
31
|
+
runs-on: macos-latest
|
|
32
|
+
strategy:
|
|
33
|
+
matrix:
|
|
34
|
+
target: [x86_64, aarch64]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: PyO3/maturin-action@v1
|
|
38
|
+
with:
|
|
39
|
+
target: ${{ matrix.target }}
|
|
40
|
+
args: --release --out dist --find-interpreter
|
|
41
|
+
sccache: "true"
|
|
42
|
+
- uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: wheels-macos-${{ matrix.target }}
|
|
45
|
+
path: dist
|
|
46
|
+
|
|
47
|
+
windows:
|
|
48
|
+
runs-on: windows-latest
|
|
49
|
+
strategy:
|
|
50
|
+
matrix:
|
|
51
|
+
target: [x86_64]
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
- uses: PyO3/maturin-action@v1
|
|
55
|
+
with:
|
|
56
|
+
target: ${{ matrix.target }}
|
|
57
|
+
args: --release --out dist --find-interpreter
|
|
58
|
+
sccache: "true"
|
|
59
|
+
- uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: wheels-windows-${{ matrix.target }}
|
|
62
|
+
path: dist
|
|
63
|
+
|
|
64
|
+
sdist:
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v4
|
|
68
|
+
- uses: PyO3/maturin-action@v1
|
|
69
|
+
with:
|
|
70
|
+
command: sdist
|
|
71
|
+
args: --out dist
|
|
72
|
+
- uses: actions/upload-artifact@v4
|
|
73
|
+
with:
|
|
74
|
+
name: wheels-sdist
|
|
75
|
+
path: dist
|
|
76
|
+
|
|
77
|
+
publish:
|
|
78
|
+
name: Publish to PyPI
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
needs: [linux, macos, windows, sdist]
|
|
81
|
+
environment:
|
|
82
|
+
name: pypi
|
|
83
|
+
url: https://pypi.org/project/pkpython/
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/download-artifact@v4
|
|
86
|
+
with:
|
|
87
|
+
pattern: wheels-*
|
|
88
|
+
merge-multiple: true
|
|
89
|
+
path: dist
|
|
90
|
+
- uses: PyO3/maturin-action@v1
|
|
91
|
+
with:
|
|
92
|
+
command: upload
|
|
93
|
+
args: --non-interactive --skip-existing dist/*
|