polars-whichlang 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.
- polars_whichlang-0.1.0/.github/workflows/pypi.yml +137 -0
- polars_whichlang-0.1.0/.github/workflows/test.yml +44 -0
- polars_whichlang-0.1.0/.gitignore +9 -0
- polars_whichlang-0.1.0/Cargo.lock +3582 -0
- polars_whichlang-0.1.0/Cargo.toml +16 -0
- polars_whichlang-0.1.0/LICENSE +21 -0
- polars_whichlang-0.1.0/Makefile +30 -0
- polars_whichlang-0.1.0/PKG-INFO +95 -0
- polars_whichlang-0.1.0/README.md +66 -0
- polars_whichlang-0.1.0/polars_whichlang/__init__.py +30 -0
- polars_whichlang-0.1.0/polars_whichlang/py.typed +0 -0
- polars_whichlang-0.1.0/pyproject.toml +42 -0
- polars_whichlang-0.1.0/requirements.txt +5 -0
- polars_whichlang-0.1.0/rust-toolchain.toml +3 -0
- polars_whichlang-0.1.0/rustfmt.toml +3 -0
- polars_whichlang-0.1.0/src/lib.rs +20 -0
- polars_whichlang-0.1.0/tests/test_whichlang.py +43 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
RUSTFLAGS: "-Dwarnings"
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
|
|
20
|
+
linux:
|
|
21
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
22
|
+
strategy:
|
|
23
|
+
matrix:
|
|
24
|
+
platform:
|
|
25
|
+
- runner: ubuntu-latest
|
|
26
|
+
target: x86_64
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
target: aarch64
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: 3.x
|
|
34
|
+
- name: Build wheels
|
|
35
|
+
uses: PyO3/maturin-action@v1
|
|
36
|
+
with:
|
|
37
|
+
target: ${{ matrix.platform.target }}
|
|
38
|
+
args: --release --out dist
|
|
39
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
40
|
+
manylinux: auto
|
|
41
|
+
- name: Upload wheels
|
|
42
|
+
uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
45
|
+
path: dist
|
|
46
|
+
|
|
47
|
+
windows:
|
|
48
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
49
|
+
strategy:
|
|
50
|
+
matrix:
|
|
51
|
+
platform:
|
|
52
|
+
- runner: windows-latest
|
|
53
|
+
target: x64
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
- uses: actions/setup-python@v5
|
|
57
|
+
with:
|
|
58
|
+
python-version: 3.x
|
|
59
|
+
architecture: ${{ matrix.platform.target }}
|
|
60
|
+
- name: Build wheels
|
|
61
|
+
uses: PyO3/maturin-action@v1
|
|
62
|
+
with:
|
|
63
|
+
target: ${{ matrix.platform.target }}
|
|
64
|
+
args: --release --out dist
|
|
65
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
66
|
+
- name: Upload wheels
|
|
67
|
+
uses: actions/upload-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
70
|
+
path: dist
|
|
71
|
+
|
|
72
|
+
macos:
|
|
73
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
74
|
+
strategy:
|
|
75
|
+
matrix:
|
|
76
|
+
platform:
|
|
77
|
+
- runner: macos-latest
|
|
78
|
+
target: x86_64
|
|
79
|
+
- runner: macos-latest
|
|
80
|
+
target: aarch64
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@v4
|
|
83
|
+
- uses: actions/setup-python@v5
|
|
84
|
+
with:
|
|
85
|
+
python-version: 3.x
|
|
86
|
+
- name: Build wheels
|
|
87
|
+
uses: PyO3/maturin-action@v1
|
|
88
|
+
with:
|
|
89
|
+
target: ${{ matrix.platform.target }}
|
|
90
|
+
args: --release --out dist
|
|
91
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
92
|
+
- name: Upload wheels
|
|
93
|
+
uses: actions/upload-artifact@v4
|
|
94
|
+
with:
|
|
95
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
96
|
+
path: dist
|
|
97
|
+
|
|
98
|
+
sdist:
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
- name: Build sdist
|
|
103
|
+
uses: PyO3/maturin-action@v1
|
|
104
|
+
with:
|
|
105
|
+
command: sdist
|
|
106
|
+
args: --out dist
|
|
107
|
+
- name: Upload sdist
|
|
108
|
+
uses: actions/upload-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: wheels-sdist
|
|
111
|
+
path: dist
|
|
112
|
+
|
|
113
|
+
release:
|
|
114
|
+
name: Release
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
|
|
117
|
+
needs: [ linux, windows, macos, sdist ]
|
|
118
|
+
environment: pypi
|
|
119
|
+
permissions:
|
|
120
|
+
# Use to sign the release artifacts
|
|
121
|
+
id-token: write
|
|
122
|
+
# Used to upload release artifacts
|
|
123
|
+
contents: write
|
|
124
|
+
# Used to generate artifact attestation
|
|
125
|
+
attestations: write
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/download-artifact@v4
|
|
128
|
+
- name: Generate artifact attestation
|
|
129
|
+
uses: actions/attest-build-provenance@v2
|
|
130
|
+
with:
|
|
131
|
+
subject-path: 'wheels-*/*'
|
|
132
|
+
- name: Publish to PyPI
|
|
133
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
134
|
+
uses: PyO3/maturin-action@v1
|
|
135
|
+
with:
|
|
136
|
+
command: upload
|
|
137
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
RUSTFLAGS: "-Dwarnings"
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
linux-test-only:
|
|
20
|
+
runs-on: ubuntu-22.04
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
target: [x86_64]
|
|
24
|
+
python-version: [3.13]
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: ${{ matrix.python-version }}
|
|
30
|
+
- uses: mozilla-actions/sccache-action@v0.0.9
|
|
31
|
+
- uses: PyO3/maturin-action@v1
|
|
32
|
+
with:
|
|
33
|
+
args: --release --out dist
|
|
34
|
+
sccache: true
|
|
35
|
+
rust-toolchain: nightly
|
|
36
|
+
- name: pytest
|
|
37
|
+
shell: bash
|
|
38
|
+
run: |
|
|
39
|
+
set -e
|
|
40
|
+
python3 -m venv .venv
|
|
41
|
+
source .venv/bin/activate
|
|
42
|
+
pip install polars-whichlang --find-links dist --force-reinstall
|
|
43
|
+
pip install pytest
|
|
44
|
+
pytest
|