Skip to content

Commit bc7e00a

Browse files
committed
Merge remote-tracking branch 'origin/py-core-functions' into HEAD
2 parents 4e755a6 + abbb2d3 commit bc7e00a

1,039 files changed

Lines changed: 68149 additions & 498 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CONTRIBUTING.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
This document is the beginning of an LLM contribution policy.
2+
3+
Areas we want to address:
4+
1. Pull Requests
5+
2. Code Review
6+
3. Feature Development
7+
4. Writing/Communication
8+
5. Testing
9+
6. Community
10+
11+
```
12+
You are responsible for your code. It represents your work. Use whichever tools you want, but you need to understand your code, be able to explain and answer questions, and understand the choices being made.
13+
```
14+
15+
## Pull Requests
16+
17+
If you use LLMs for a significant portion of the work, it is helpful to just say so in the PR description, and how. It can help us guide you especially if you're a new contributor. Or even a seasoned contributor.
18+
19+
You are accountable for your PR, and have clear understanding of the work.
20+
A successful PR will be understood by other people.
21+
22+
We like to keep PRs small when possible. Stacked PRs are a great way to break up your work so that your work can be given a proper review.
23+
24+
It's good to start small if you're new so we can establish trust. It also helps if you start by establishing a plan and getting our feedback on it early.
25+
26+
## Code Review
27+
28+
Generally, LLMs are taking the shortest path to meet an objective. Which means they can cut corners.
29+
##### Reviewing others' PRs
30+
LLMs are great for summarizing commits, or walking you through the changes. Use your own judgement when you make comments, however. Don't paste LLM review output. We can do LLM review without your help.
31+
32+
Asking questions to learn about what is being done is an amazing way to review code. It helps all of us build a shared understanding, and it helps the author build more confidence in their choices.
33+
34+
##### Responding to review
35+
Reply in your own words. Please don't feed the reviewer comments into LLM and paste it back out. It's frustrating and a big waste of time.
36+
37+
If someone is asking you questions, help them understand where you're coming from. Don't assume bad faith.
38+
39+
## Picking a Task
40+
It's good to look through the open issues to see where we need help, or open a new issue.
41+
42+
If you want to be assigned you can either ask on the issue, or reach out to us on the discord in the #libprocessing channel. As mentioned above, it's really great if you do some planning and let us offer early feedback.
43+
44+
## Writing/Communication
45+
46+
Writing should be done by you if possible. Imperfect english is perfectly wonderful, but we understand the need to translate from another language and will not stop you. Try to make sure the meaning is your own and try not to let the LLM add or subtract from your voice.
47+
48+
Outside of that specific case, if you are just asking an LLM to do some work and then pasting output, then we can just do that ourselves. Think about what human value you're adding, because that is what we want.
49+
50+
## Testing
51+
52+
Tests help us to create shared understanding for both humans and LLMs so we can ensure high code quality and mitigate regressions. We have visual tests, unit tests, and have plans for performance benchmarking.
53+
54+
LLMs can be helpful for generating tests. But do make sure you've reviewed them and make sure they are actually testing something useful. Again, LLMs are taking the shortest path so don't let them cut corners!
55+
56+
## Community
57+
We prioritize community as we always have. We are here because of community and we stay for it. However, LLMs do change how work is done, it's changing the nature of the medium and we want to accommodate the new ways in which people contribute and enter into the world of software development and computing.
58+
59+
If you are someone who wants to truly understand how these systems fit together then speak to us in the #libprocessing or #devs-chat discord channels and someone will happily guide you.
60+
61+
We are so happy to have you.

‎Cargo.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ uv run sketch.py
7373

7474
_Note: you can use any file name you want for your sketch_
7575

76+
#### Hot reloading
77+
78+
```bash
79+
# turn it on for one run
80+
PROCESSING_HOT_RELOAD=1 uv run sketch.py
81+
```
82+
83+
You can also pass `run(hot_reload=True)` in the sketch, or use the runner, which doesn't need a `run()` call at all:
84+
85+
```bash
86+
uv run python -m processing_py run --hot-reload sketch.py
87+
```
88+
7689
### Rust (libprocessing)
7790

7891
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.

‎crates/processing_core/src/config.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use std::collections::HashMap;
44
#[derive(Clone, Hash, Eq, PartialEq)]
55
pub enum ConfigKey {
66
AssetRootPath,
7-
SketchRootPath,
8-
SketchFileName,
97
LogLevel,
108
}
119

‎crates/processing_core/src/error.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ pub enum ProcessingError {
4848
ShaderNotFound,
4949
#[error("MIDI port {0} not found")]
5050
MidiPortNotFound(usize),
51+
#[error("No MIDI port matching {0:?}; available ports: {1}")]
52+
MidiPortNameNotFound(String, String),
53+
#[error("No MIDI input connected; call midi_connect_input() first")]
54+
MidiInputNotConnected,
55+
#[error("MIDI connection failed: {0}")]
56+
MidiConnectionFailed(String),
5157
#[error("CUDA error: {0}")]
5258
CudaError(String),
5359
#[error("Compute shader not found")]

‎crates/processing_midi/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ bevy = { workspace = true }
99
processing_core = { workspace = true }
1010
nannou_midi = { git = "https://github.com/nannou-org/nannou", branch = "bevy-refactor" }
1111

12+
[target.'cfg(target_os = "macos")'.dependencies]
13+
midir = { version = "0.11", features = ["coremidi_send_timestamped"] }
14+
1215
[lints]
1316
workspace = true

0 commit comments

Comments
 (0)