Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skeleton of wgpu-py #3

Merged
merged 20 commits into from
Jan 5, 2024
Merged

Add skeleton of wgpu-py #3

merged 20 commits into from
Jan 5, 2024

Conversation

Vipitis
Copy link
Collaborator

@Vipitis Vipitis commented Jan 3, 2024

Starting from the top of #1

This PR starts with a squashed clone of wgpu-py at the 0.13.2 release and then removes all parts that are not required.
all inits and config are kept
no modifications to any files have been made

  • Is there anything else that needs to go?
  • will there be any issues by keeping the config files as is?

@Vipitis Vipitis mentioned this pull request Jan 3, 2024
12 tasks
@Korijn
Copy link
Contributor

Korijn commented Jan 4, 2024

I will have a lot of feedback at this stage. I will post code review comments, but if you prefer that I add commits to the branch directly, tell me and I will.

.github/CODEOWNERS Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
LICENSE Outdated Show resolved Hide resolved
dev-requirements.txt Outdated Show resolved Hide resolved
examples/shadertoy_blink.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
wgpu/__init__.py Outdated Show resolved Hide resolved
wgpu/__init__.py Outdated Show resolved Hide resolved
wgpu/__init__.py Outdated Show resolved Hide resolved
wgpu/__init__.py Outdated Show resolved Hide resolved
wgpu/utils/__init__.py Outdated Show resolved Hide resolved
@Korijn
Copy link
Contributor

Korijn commented Jan 5, 2024

It would be a ton of effort for me to capture my feedback in more comments so I just pushed some commits to this branch. Feel free to revert anything if you feel differently.

I used these two guides to put pyproject.toml together:

I think we should make sure that CI passes, at the very least. We should also see if we can claim a pypi page. It seems like https://pypi.org/project/shadertoy/ is actually still available (surprising!).

If you're OK with it, I would also propose to switch to the more modern ruff linter as it can capture all the same linting rules we are now applying with flake8 and black (and a few plugins). I can do that in a separate PR.

@Korijn Korijn marked this pull request as ready for review January 5, 2024 10:21
@Korijn
Copy link
Contributor

Korijn commented Jan 5, 2024

With CI passing and at least one example under screenshot testing, I think this is ready to merge.

Feel free to give the Approval yourself and merge, if you agree.

@Vipitis
Copy link
Collaborator Author

Vipitis commented Jan 5, 2024

Thanks for all the changes. I was reading through nearly the same resources yesterday.

The only issue I see with calling it just shadertoy is that it might be protected and we are clearly not affiliated with the website. So perhaps something like wgpu-shadertoy would work instead.

As for linting, I welcome new capabilities. Something that could be interesting, is that shadercode is just python strings - and could maybe get it's own linting rules (for glsl or wgsl specific).

It looks good to merge to me!

@Korijn
Copy link
Contributor

Korijn commented Jan 5, 2024

The only issue I see with calling it just shadertoy is that it might be protected and we are clearly not affiliated with the website. So perhaps something like wgpu-shadertoy would work instead.

That makes sense. We can rename the package to wgpu_shadertoy?

As for linting, I welcome new capabilities. Something that could be interesting, is that shadercode is just python strings - and could maybe get it's own linting rules (for glsl or wgsl specific).

Easiest way to accomplish that is probably to put shaders in their own .glsl and .wgsl files.

@Korijn Korijn merged commit 1b0bfb3 into main Jan 5, 2024
11 checks passed
@Korijn Korijn deleted the rollout branch January 5, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants