Skip to content

Commit c86d42c

Browse files
committed
add stub file generator
1 parent 38c6e40 commit c86d42c

17 files changed

+552
-25
lines changed

.github/workflows/python.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- uses: actions/setup-python@v5
3030
with:
3131
python-version: '3.10'
32+
- name: Install dependencies
33+
run: pip install ".[testing]"
3234
- name: Build wheels
3335
uses: PyO3/maturin-action@v1
3436
with:
@@ -37,6 +39,8 @@ jobs:
3739
manylinux: '2_28'
3840
args: --release --out dist --find-interpreter
3941
sccache: 'true'
42+
- name: Run tests
43+
run: pytest
4044
- name: Upload wheels
4145
uses: actions/upload-artifact@v4
4246
with:
@@ -94,6 +98,8 @@ jobs:
9498
runs-on: ubuntu-latest
9599
steps:
96100
- uses: actions/checkout@v4
101+
- name: Install dependencies
102+
run: pip install ".[testing]"
97103
- name: Build sdist
98104
uses: PyO3/maturin-action@v1
99105
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ __pycache__/
1212
.Python
1313
.venv/
1414
env/
15-
bin/
1615
build/
1716
develop-eggs/
1817
dist/

Cargo.lock

Lines changed: 136 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iggy-py"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2021"
55
authors = ["Dario Lencina Talarico <darioalessandrolencina@gmail.com>"]
66
license = "Apache-2.0"
@@ -11,9 +11,14 @@ repository = "https://github.com/iggy-rs/iggy"
1111
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1212
[lib]
1313
name = "iggy_py"
14-
crate-type = ["cdylib"]
14+
crate-type = ["cdylib", "rlib"]
1515

1616
[dependencies]
17-
pyo3 = "0.23.0"
17+
pyo3 = "0.22.0"
1818
iggy = "0.6.201"
19-
pyo3-async-runtimes = { version = "0.23.0", features = ["attributes", "tokio-runtime"] }
19+
pyo3-async-runtimes = { version = "0.22.0", features = ["attributes", "tokio-runtime"] }
20+
pyo3-stub-gen = "0.7.0"
21+
22+
[[bin]]
23+
name = "stub_gen"
24+
doc = false

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ All examples rely on a running iggy server. To start the server, execute:
2525
docker run --rm -p 8080:8080 -p 3000:3000 -p 8090:8090 iggyrs/iggy:0.4.21
2626
```
2727

28+
## Generating Stub Files
29+
To generate a stub file, execute the following command:
30+
31+
```
32+
cargo run --bin stub_gen
33+
```
34+
2835
Refer to the python_examples directory for examples on how to use the iggy library.
2936

3037
## Running the Examples:

0 commit comments

Comments
 (0)