Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/git-hooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Git Hooks"

on:
push:
branches:
- main
pull_request: ~

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
run-prek:
name: prek run --all-files
runs-on: ubuntu-24.04
timeout-minutes: 1

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Run prek
uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Ignore this stuff
.DS_Store

# Files fron uv
pyproject.toml
uv.lock
.python-version

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.27.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.12.3
hooks:
- id: uv-lock
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ The examples are organized by topic, and the original `.pde` files are included

To port an example, follow these steps:

1. copy the `.pde` file to a `.py` file in the same directory.
2. run `uv init --bare` to create the `pyproject.toml` file.
3. add `mewnala` as a dependency with `uv add mewnala` (this may take a while to complete the first time).
4. adapt the code to use mewnala and Python syntax.
5. test the example by running it with `uv run path/to/example.py`.
1. run `uv sync` to create the Python environment.
2. copy the `.pde` file to a `.py` file in the same directory.
3. adapt the code to use mewnala and Python syntax.
4. test the example by running it with `uv run path/to/example.py`.

> [!IMPORTANT]
> Always compare your port with the original by running the `.pde` file in the Processing IDE.
Expand Down
5 changes: 5 additions & 0 deletions pyproject-fmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
indent = 4
keep_full_version = true
table_format = "long"
sub_table_spacing = "\n"
collapse_tables = [ "project.authors" ]
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[project]
name = "processing-examples-mewnala"
version = "0.1.0"
description = "Python examples for libprocessing (mewnala)"
authors = [
{ name = "The Processing Foundation" },
{ name = "Ülgen Sarıkavak", email = "foss@ulgenwanders.net" },
]
requires-python = ">=3.10,<3.14"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Graphics",
]
dependencies = [
"mewnala==0.0.8",
]

[project.urls]
Homepage = "https://github.com/processing/processing-examples-mewnala"
Repository = "https://github.com/processing/processing-examples-mewnala"
Issues = "https://github.com/processing/processing-examples-mewnala/issues"

[tool.uv]
required-version = ">=0.8.4" # The earliest version that supports the current lock file revision (3)
package = false
1,790 changes: 1,790 additions & 0 deletions uv.lock

Large diffs are not rendered by default.