Skip to content

Commit 9f511c2

Browse files
authored
Merge branch 'main' into cuda
2 parents e0c2bc7 + 13e7e0f commit 9f511c2

9 files changed

Lines changed: 504 additions & 14 deletions

File tree

.github/workflows/docs.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
25+
- uses: ./.github/actions/setup
26+
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.x'
30+
31+
- uses: astral-sh/setup-uv@v6
32+
33+
- uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.cargo/bin/
37+
~/.cargo/registry/index/
38+
~/.cargo/registry/cache/
39+
~/.cargo/git/db/
40+
target/
41+
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-cargo-docs-
44+
${{ runner.os }}-cargo-
45+
46+
- name: Build extension and generate stubs
47+
run: |
48+
cd crates/processing_pyo3
49+
uv run maturin develop --release
50+
cd ../..
51+
cargo run --release -p generate_stubs
52+
53+
- name: Build docs
54+
run: uv run --project crates/processing_pyo3 --group docs mkdocs build
55+
56+
- uses: actions/upload-pages-artifact@v3
57+
with:
58+
path: site/
59+
60+
deploy:
61+
needs: build
62+
runs-on: ubuntu-latest
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
steps:
67+
- id: deployment
68+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/target/
2+
/site/
23
crates/processing_ffi/include/
4+
crates/processing_pyo3/mewnala/*.pyi
35
.DS_Store
46
.ipynb_checkpoints/

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,43 @@ Inside of our `processing_pyo3` crate we have created a python package that you
1010
Again, we are still very nascent, but let us know what kinds of snags you may run into while getting this set up.
1111
Try running the examples in the [processing_pyo3 examples directory](crates/processing_pyo3/examples).
1212

13-
```bash
14-
# have python3 installed on your system
13+
We are big fans of [uv](https://github.com/astral-sh/uv) and this is the easiest way to get started using `mewnala`
1514

16-
# create a sketch folder and go inside
17-
mkdir my-sketch-folder && cd my-sketch-folder
15+
#### Setting up uv on linux or macOS
16+
```bash
17+
curl -LsSf https://astral.sh/uv/install.sh | sh
18+
```
1819

19-
# create a virtual env
20-
python -m venv .venv
20+
#### For Windows users:
21+
```bash
22+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
23+
```
2124

22-
# activate virtual env
23-
source .venv/bin/activate
25+
#### Install a mewnala
26+
```bash
27+
# Initialize a project with uv
28+
uv init mewnala-sketchbook && cd mewnala-sketchbook
2429

25-
pip install mewnala
30+
# add the package
31+
uv add mewnala
2632

27-
python my_sketch.py
33+
# run a sketch
34+
uv run sketch.py
2835
```
2936

30-
### Rust
37+
### Rust (libprocessing)
3138

3239
You'll need to install the Rust toolchain to work on this project. Most users will want to install Rust via [`rustup`](https://rustup.rs/), which helps manage Rust toolchain versions.
3340

3441
### Build commands
3542

36-
This project uses [just](https://github.com/casey/just) as a command runner. Run `just` to see available commands.
43+
This project uses [just](https://github.com/casey/just) as a command runner:
44+
45+
```bash
46+
cargo install just
47+
```
48+
49+
Run `just` to see available commands.
3750

3851
## Building for web
3952

crates/processing_pyo3/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ Issues = "https://github.com/processing/libprocessing/issues"
3535

3636
[dependency-groups]
3737
dev = ["maturin>=1.10,<2.0"]
38+
docs = [
39+
"mkdocs-material>=9.6",
40+
"mkdocstrings[python]>=0.29",
41+
"mkdocs-gen-files>=0.5",
42+
]
3843

3944
[tool.maturin]
4045
manifest-path = "Cargo.toml"

0 commit comments

Comments
 (0)