fastled 1.1.88__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/build_multi_docker_image.yml +0 -4
- {fastled-1.1.88 → fastled-1.2.0}/PKG-INFO +15 -10
- {fastled-1.1.88 → fastled-1.2.0}/README.md +14 -9
- fastled-1.2.0/RELEASE.md +8 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/__init__.py +13 -3
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/app.py +3 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/project_init.py +8 -13
- fastled-1.2.0/src/fastled/test/can_run_local_docker_tests.py +13 -0
- fastled-1.2.0/src/fastled/test/examples.py +49 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/PKG-INFO +15 -10
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/SOURCES.txt +3 -0
- fastled-1.2.0/tests/test_build_examples.py +22 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_compile_server.py +4 -12
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_embedded_data.py +4 -10
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_examples.py +4 -13
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_project_init.py +5 -8
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_server_and_client_seperatly.py +3 -6
- fastled-1.1.88/src/fastled/test/examples.py +0 -31
- {fastled-1.1.88 → fastled-1.2.0}/.aiderignore +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/build_webpage.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/check_pfx_b64.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/lint.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/publish_release.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/test_build_exe.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.github/workflows/test_win.yml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.gitignore +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.pylintrc +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.vscode/launch.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.vscode/settings.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/.vscode/tasks.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/LICENSE +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/MANIFEST.in +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/TODO.md +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/build_exe.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/build_site.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/clean +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Blink/Blink.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/Chromancer.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/detail.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/gen.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/mapping.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/net.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/output.json +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/ripple.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/screenmap.json.h +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/ColorPalette/ColorPalette.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/ColorTemperature/ColorTemperature.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Cylon/Cylon.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/DemoReel100/DemoReel100.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Fire2012/Fire2012.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/FirstLight/FirstLight.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/FxEngine/FxEngine.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Noise/Noise.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/NoisePlayground/NoisePlayground.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/OctoWS2811/OctoWS2811.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Pacifica/Pacifica.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Pride2015/Pride2015.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/TwinkleFox/TwinkleFox.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/Water/Water.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/XYMatrix/XYMatrix.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/examples/wasm/wasm.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/install +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/lint +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/pyproject.toml +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/requirements.testing.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/setup.cfg +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/setup.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/assets/example.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/cli.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/client_server.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/compile_server.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/compile_server_impl.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/docker_manager.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/filewatcher.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/keyboard.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/live_client.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/open_browser.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/parse_args.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/paths.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/select_sketch_directory.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/settings.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/site/build.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/sketch.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/spinner.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/string_diff.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/types.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/util.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled/web_compile.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/requires.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/test +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_api.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_bad_ino.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_cli.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_docker_linux_on_windows.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_filechanger.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_ino/bad/bad.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_ino/embedded/data/bigdata.dat +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_ino/embedded/wasm.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_ino/wasm/wasm.ino +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/tests/test_webcompile.py +0 -0
- {fastled-1.1.88 → fastled-1.2.0}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -23,9 +23,6 @@ Requires-Dist: progress>=1.6
|
|
23
23
|
|
24
24
|
# FastLED Wasm compiler
|
25
25
|
|
26
|
-
Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
|
27
|
-
|
28
|
-
|
29
26
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
|
30
27
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
|
31
28
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
|
@@ -35,9 +32,11 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
|
|
35
32
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
|
36
33
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
|
37
34
|
|
38
|
-
# Demo
|
39
35
|
|
40
|
-
|
36
|
+
|
37
|
+
## Compile your FastLED sketch and run it on the Browser!
|
38
|
+
|
39
|
+

|
41
40
|
|
42
41
|
|
43
42
|
# About
|
@@ -46,11 +45,17 @@ This python app will compile your FastLED style sketches into html/js/wasm outpu
|
|
46
45
|
|
47
46
|
Compile times are extremely fast, thanks to aggressive object caching for C++ and sketch fingerprinting with a zip file cache. Recompilation of sketch files with minimal changes will occure in less than a second.
|
48
47
|
|
49
|
-
|
48
|
+
If you have docker installed, the compiler will download the docker image and run a private local server on your machine. If you don't have Docker installed then the app will fall back to using the public web compiler.
|
50
49
|
|
51
|
-
|
52
|
-
has the advantage that as a persistant service the compile cache will remain much more up to date.
|
50
|
+
In every conceivable way, the local compiler will be much faster than the web version.
|
53
51
|
|
52
|
+
# Demo
|
53
|
+
|
54
|
+
https://zackees.github.io/fastled-wasm/
|
55
|
+
|
56
|
+
# Tutorial video
|
57
|
+
|
58
|
+
**Note this video is a little outdated, you will install the app now with `pip install fastled` and run it like `fastled mysketchfolder`**
|
54
59
|
|
55
60
|
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
|
56
61
|
|
@@ -257,9 +262,9 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
257
262
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
258
263
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
259
264
|
|
260
|
-
|
261
265
|
# Revisions
|
262
266
|
|
267
|
+
* 1.2.00 - `fastled.exe` is now a signed binary on windows, however it's a self signed binary so you'll still get the warning on the first open. There's been a small api change between the server and the client for fetching projects.
|
263
268
|
* 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
|
264
269
|
* 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
|
265
270
|
* 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
|
@@ -1,8 +1,5 @@
|
|
1
1
|
# FastLED Wasm compiler
|
2
2
|
|
3
|
-
Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
|
4
|
-
|
5
|
-
|
6
3
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
|
7
4
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
|
8
5
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
|
@@ -12,9 +9,11 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
|
|
12
9
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
|
13
10
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
|
14
11
|
|
15
|
-
# Demo
|
16
12
|
|
17
|
-
|
13
|
+
|
14
|
+
## Compile your FastLED sketch and run it on the Browser!
|
15
|
+
|
16
|
+

|
18
17
|
|
19
18
|
|
20
19
|
# About
|
@@ -23,11 +22,17 @@ This python app will compile your FastLED style sketches into html/js/wasm outpu
|
|
23
22
|
|
24
23
|
Compile times are extremely fast, thanks to aggressive object caching for C++ and sketch fingerprinting with a zip file cache. Recompilation of sketch files with minimal changes will occure in less than a second.
|
25
24
|
|
26
|
-
|
25
|
+
If you have docker installed, the compiler will download the docker image and run a private local server on your machine. If you don't have Docker installed then the app will fall back to using the public web compiler.
|
27
26
|
|
28
|
-
|
29
|
-
has the advantage that as a persistant service the compile cache will remain much more up to date.
|
27
|
+
In every conceivable way, the local compiler will be much faster than the web version.
|
30
28
|
|
29
|
+
# Demo
|
30
|
+
|
31
|
+
https://zackees.github.io/fastled-wasm/
|
32
|
+
|
33
|
+
# Tutorial video
|
34
|
+
|
35
|
+
**Note this video is a little outdated, you will install the app now with `pip install fastled` and run it like `fastled mysketchfolder`**
|
31
36
|
|
32
37
|
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
|
33
38
|
|
@@ -234,9 +239,9 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
234
239
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
235
240
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
236
241
|
|
237
|
-
|
238
242
|
# Revisions
|
239
243
|
|
244
|
+
* 1.2.00 - `fastled.exe` is now a signed binary on windows, however it's a self signed binary so you'll still get the warning on the first open. There's been a small api change between the server and the client for fetching projects.
|
240
245
|
* 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
|
241
246
|
* 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
|
242
247
|
* 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
|
fastled-1.2.0/RELEASE.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# How to do a release.
|
2
|
+
|
3
|
+
Go to src/fastled/__init__.py and increase the version number.
|
4
|
+
|
5
|
+
Make sure this is the ONLY change in your repo (or the release will fail
|
6
|
+
for unknown reasons) and commit and then push. Github builders will do all the rest.
|
7
|
+
|
8
|
+
Make sure and watch the jobs to verify that it worked.
|
@@ -13,15 +13,18 @@ from .types import BuildMode, CompileResult, CompileServerError
|
|
13
13
|
# IMPORTANT! There's a bug in github which will REJECT any version update
|
14
14
|
# that has any other change in the repo. Please bump the version as the
|
15
15
|
# ONLY change in a commit, or else the pypi update and the release will fail.
|
16
|
-
__version__ = "1.
|
16
|
+
__version__ = "1.2.0"
|
17
17
|
|
18
18
|
|
19
19
|
class Api:
|
20
20
|
@staticmethod
|
21
|
-
def get_examples():
|
21
|
+
def get_examples(host: str | CompileServer | None = None) -> list[str]:
|
22
22
|
from fastled.project_init import get_examples
|
23
23
|
|
24
|
-
|
24
|
+
if isinstance(host, CompileServer):
|
25
|
+
host = host.url()
|
26
|
+
|
27
|
+
return get_examples(host=host)
|
25
28
|
|
26
29
|
@staticmethod
|
27
30
|
def project_init(
|
@@ -110,6 +113,13 @@ class Api:
|
|
110
113
|
|
111
114
|
|
112
115
|
class Test:
|
116
|
+
|
117
|
+
@staticmethod
|
118
|
+
def can_run_local_docker_tests() -> bool:
|
119
|
+
from fastled.test.can_run_local_docker_tests import can_run_local_docker_tests
|
120
|
+
|
121
|
+
return can_run_local_docker_tests()
|
122
|
+
|
113
123
|
@staticmethod
|
114
124
|
def test_examples(
|
115
125
|
examples: list[str] | None = None, host: str | CompileServer | None = None
|
@@ -16,6 +16,9 @@ def run_server(args: argparse.Namespace) -> int:
|
|
16
16
|
interactive = args.interactive
|
17
17
|
auto_update = args.auto_update
|
18
18
|
mapped_dir = Path(args.directory).absolute() if args.directory else None
|
19
|
+
if interactive and mapped_dir is None:
|
20
|
+
print("Select a sketch when you enter interactive mode.")
|
21
|
+
return 1
|
19
22
|
compile_server = CompileServer(
|
20
23
|
interactive=interactive,
|
21
24
|
auto_updates=auto_update,
|
@@ -5,22 +5,15 @@ import httpx
|
|
5
5
|
|
6
6
|
from fastled.settings import DEFAULT_URL
|
7
7
|
|
8
|
-
ENDPOINT_PROJECT_INIT = f"{DEFAULT_URL}/project/init"
|
9
|
-
ENDPOINT_INFO = f"{DEFAULT_URL}/info"
|
10
8
|
DEFAULT_EXAMPLE = "wasm"
|
11
9
|
|
12
|
-
_EXCLUDED_EXAMPLES = [
|
13
|
-
"Pintest",
|
14
|
-
"OctoWS2811",
|
15
|
-
]
|
16
10
|
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
def get_examples(host: str | None = None) -> list[str]:
|
12
|
+
host = host or DEFAULT_URL
|
13
|
+
url_info = f"{host}/info"
|
14
|
+
response = httpx.get(url_info, timeout=4)
|
20
15
|
response.raise_for_status()
|
21
16
|
examples: list[str] = response.json()["examples"]
|
22
|
-
# filter out excluded examples
|
23
|
-
examples = [example for example in examples if example not in _EXCLUDED_EXAMPLES]
|
24
17
|
return sorted(examples)
|
25
18
|
|
26
19
|
|
@@ -61,8 +54,9 @@ def project_init(
|
|
61
54
|
)
|
62
55
|
example = DEFAULT_EXAMPLE
|
63
56
|
assert example is not None
|
64
|
-
endpoint_url = f"{host}/project/init
|
65
|
-
|
57
|
+
endpoint_url = f"{host}/project/init"
|
58
|
+
json = example
|
59
|
+
response = httpx.post(endpoint_url, timeout=20, json=json)
|
66
60
|
response.raise_for_status()
|
67
61
|
content = response.content
|
68
62
|
tmpzip = outputdir / "fastled.zip"
|
@@ -72,6 +66,7 @@ def project_init(
|
|
72
66
|
zip_ref.extractall(outputdir)
|
73
67
|
tmpzip.unlink()
|
74
68
|
out = outputdir / example
|
69
|
+
print(f"Project initialized at {out}")
|
75
70
|
assert out.exists()
|
76
71
|
return out
|
77
72
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import os
|
2
|
+
import platform
|
3
|
+
|
4
|
+
|
5
|
+
def can_run_local_docker_tests() -> bool:
|
6
|
+
"""Check if this system can run Docker Tests"""
|
7
|
+
is_github_runner = "GITHUB_ACTIONS" in os.environ
|
8
|
+
if not is_github_runner:
|
9
|
+
from fastled.docker_manager import DockerManager
|
10
|
+
|
11
|
+
return DockerManager.is_docker_installed()
|
12
|
+
# this only works in ubuntu at the moment
|
13
|
+
return platform.system() == "Linux"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
from tempfile import TemporaryDirectory
|
2
|
+
from time import time
|
3
|
+
from warnings import warn
|
4
|
+
|
5
|
+
_FILTER = True
|
6
|
+
|
7
|
+
|
8
|
+
def test_examples(
|
9
|
+
examples: list[str] | None = None, host: str | None = None
|
10
|
+
) -> dict[str, Exception]:
|
11
|
+
"""Test the examples in the given directory."""
|
12
|
+
from fastled import Api
|
13
|
+
|
14
|
+
out: dict[str, Exception] = {}
|
15
|
+
examples = Api.get_examples(host=host) if examples is None else examples
|
16
|
+
if host is None and _FILTER:
|
17
|
+
examples.remove("Chromancer") # Brutal
|
18
|
+
examples.remove("LuminescentGrand")
|
19
|
+
with TemporaryDirectory() as tmpdir:
|
20
|
+
for example in examples:
|
21
|
+
print(f"Initializing example: {example}")
|
22
|
+
try:
|
23
|
+
sketch_dir = Api.project_init(example, outputdir=tmpdir, host=host)
|
24
|
+
except Exception as e:
|
25
|
+
warn(f"Failed to initialize example: {example}, error: {e}")
|
26
|
+
out[example] = e
|
27
|
+
continue
|
28
|
+
print(f"Project initialized at: {sketch_dir}")
|
29
|
+
start = time()
|
30
|
+
print(f"Compiling example: {example}")
|
31
|
+
diff = time() - start
|
32
|
+
print(f"Compilation took: {diff:.2f} seconds")
|
33
|
+
result = Api.web_compile(sketch_dir, host=host)
|
34
|
+
if not result.success:
|
35
|
+
out[example] = Exception(result.stdout)
|
36
|
+
return out
|
37
|
+
|
38
|
+
|
39
|
+
def unit_test() -> None:
|
40
|
+
from fastled import Api
|
41
|
+
|
42
|
+
with Api.server(auto_updates=True) as server:
|
43
|
+
out = test_examples(host=server.url())
|
44
|
+
if out:
|
45
|
+
raise RuntimeError(f"Failed tests: {out}")
|
46
|
+
|
47
|
+
|
48
|
+
if __name__ == "__main__":
|
49
|
+
unit_test()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -23,9 +23,6 @@ Requires-Dist: progress>=1.6
|
|
23
23
|
|
24
24
|
# FastLED Wasm compiler
|
25
25
|
|
26
|
-
Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
|
27
|
-
|
28
|
-
|
29
26
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
|
30
27
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
|
31
28
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
|
@@ -35,9 +32,11 @@ Compiles an Arduino/Platformio sketch into a wasm binary that can be run directl
|
|
35
32
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_build_exe.yml)
|
36
33
|
[](https://github.com/zackees/fastled-wasm/actions/workflows/publish_release.yml)
|
37
34
|
|
38
|
-
# Demo
|
39
35
|
|
40
|
-
|
36
|
+
|
37
|
+
## Compile your FastLED sketch and run it on the Browser!
|
38
|
+
|
39
|
+

|
41
40
|
|
42
41
|
|
43
42
|
# About
|
@@ -46,11 +45,17 @@ This python app will compile your FastLED style sketches into html/js/wasm outpu
|
|
46
45
|
|
47
46
|
Compile times are extremely fast, thanks to aggressive object caching for C++ and sketch fingerprinting with a zip file cache. Recompilation of sketch files with minimal changes will occure in less than a second.
|
48
47
|
|
49
|
-
|
48
|
+
If you have docker installed, the compiler will download the docker image and run a private local server on your machine. If you don't have Docker installed then the app will fall back to using the public web compiler.
|
50
49
|
|
51
|
-
|
52
|
-
has the advantage that as a persistant service the compile cache will remain much more up to date.
|
50
|
+
In every conceivable way, the local compiler will be much faster than the web version.
|
53
51
|
|
52
|
+
# Demo
|
53
|
+
|
54
|
+
https://zackees.github.io/fastled-wasm/
|
55
|
+
|
56
|
+
# Tutorial video
|
57
|
+
|
58
|
+
**Note this video is a little outdated, you will install the app now with `pip install fastled` and run it like `fastled mysketchfolder`**
|
54
59
|
|
55
60
|
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
|
56
61
|
|
@@ -257,9 +262,9 @@ A: `delay()` will block `loop()` which blocks the main thread of the browser. Th
|
|
257
262
|
Q: How can I get the compiled size of my FastLED sketch smaller?
|
258
263
|
A: A big chunk of space is being used by unnecessary javascript `emscripten` bundling. The wasm_compiler_settings.py file in the FastLED repo can tweak this.
|
259
264
|
|
260
|
-
|
261
265
|
# Revisions
|
262
266
|
|
267
|
+
* 1.2.00 - `fastled.exe` is now a signed binary on windows, however it's a self signed binary so you'll still get the warning on the first open. There's been a small api change between the server and the client for fetching projects.
|
263
268
|
* 1.1.69 - Changed the binary name to `fastled.exe` instead of something like `fastled-windows-x64.exe`
|
264
269
|
* 1.1.68 - Add a site builder to fastled.Test which generates a website with a bunch of demos. This is used to build the demo site automatically.
|
265
270
|
* 1.1.67 - Pinned all the minimum versions of dependencies so we don't bind to an out of date py dep: https://github.com/zackees/fastled-wasm/issues/3
|
@@ -4,6 +4,7 @@
|
|
4
4
|
LICENSE
|
5
5
|
MANIFEST.in
|
6
6
|
README.md
|
7
|
+
RELEASE.md
|
7
8
|
TODO.md
|
8
9
|
build_exe.py
|
9
10
|
build_site.py
|
@@ -91,9 +92,11 @@ src/fastled.egg-info/requires.txt
|
|
91
92
|
src/fastled.egg-info/top_level.txt
|
92
93
|
src/fastled/assets/example.txt
|
93
94
|
src/fastled/site/build.py
|
95
|
+
src/fastled/test/can_run_local_docker_tests.py
|
94
96
|
src/fastled/test/examples.py
|
95
97
|
tests/test_api.py
|
96
98
|
tests/test_bad_ino.py
|
99
|
+
tests/test_build_examples.py
|
97
100
|
tests/test_cli.py
|
98
101
|
tests/test_compile_server.py
|
99
102
|
tests/test_docker_linux_on_windows.py
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"""
|
2
|
+
Unit test file.
|
3
|
+
"""
|
4
|
+
|
5
|
+
import unittest
|
6
|
+
|
7
|
+
from fastled import Api, Test # type: ignore
|
8
|
+
|
9
|
+
|
10
|
+
class ApiTester(unittest.TestCase):
|
11
|
+
"""Main tester class."""
|
12
|
+
|
13
|
+
def test_build_all_examples(self) -> None:
|
14
|
+
"""Test command line interface (CLI)."""
|
15
|
+
|
16
|
+
with Api.server(auto_updates=True) as server:
|
17
|
+
out = Test.test_examples(host=server)
|
18
|
+
self.assertEqual(0, len(out), f"Failed tests: {out}")
|
19
|
+
|
20
|
+
|
21
|
+
if __name__ == "__main__":
|
22
|
+
unittest.main()
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import os
|
2
|
-
import platform
|
3
1
|
import unittest
|
4
2
|
from pathlib import Path
|
5
3
|
|
4
|
+
from fastled import Test
|
6
5
|
from fastled.compile_server import CompileServer
|
7
6
|
from fastled.web_compile import CompileResult
|
8
7
|
|
@@ -10,19 +9,12 @@ HERE = Path(__file__).parent
|
|
10
9
|
TEST_DIR = HERE / "test_ino" / "wasm"
|
11
10
|
|
12
11
|
|
13
|
-
def _enabled() -> bool:
|
14
|
-
"""Check if this system can run the tests."""
|
15
|
-
is_github_runner = "GITHUB_ACTIONS" in os.environ
|
16
|
-
if not is_github_runner:
|
17
|
-
return True
|
18
|
-
# this only works in ubuntu at the moment
|
19
|
-
return platform.system() == "Linux"
|
20
|
-
|
21
|
-
|
22
12
|
class WebCompilerTester(unittest.TestCase):
|
23
13
|
"""Main tester class."""
|
24
14
|
|
25
|
-
@unittest.skipUnless(
|
15
|
+
@unittest.skipUnless(
|
16
|
+
Test.can_run_local_docker_tests(), "Skipping test on non-Linux system on github"
|
17
|
+
)
|
26
18
|
def test_server(self) -> None:
|
27
19
|
"""Test basic server start/stop functionality."""
|
28
20
|
server = CompileServer(auto_start=True)
|
@@ -1,12 +1,10 @@
|
|
1
|
-
import os
|
2
|
-
import platform
|
3
1
|
import unittest
|
4
2
|
import zipfile
|
5
3
|
from pathlib import Path
|
6
4
|
from tempfile import TemporaryDirectory
|
7
5
|
|
8
6
|
from fastled.compile_server import CompileServer
|
9
|
-
from fastled.web_compile import
|
7
|
+
from fastled.web_compile import CompileResult
|
10
8
|
|
11
9
|
HERE = Path(__file__).parent
|
12
10
|
TEST_DIR = HERE / "test_ino" / "embedded"
|
@@ -14,13 +12,9 @@ TEST_DIR = HERE / "test_ino" / "embedded"
|
|
14
12
|
|
15
13
|
def _enabled() -> bool:
|
16
14
|
"""Check if this system can run the tests."""
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
if not is_github_runner:
|
21
|
-
return True
|
22
|
-
# this only works in ubuntu at the moment
|
23
|
-
return platform.system() == "Linux"
|
15
|
+
from fastled import Test
|
16
|
+
|
17
|
+
return Test.can_run_local_docker_tests()
|
24
18
|
|
25
19
|
|
26
20
|
class WebCompilerTester(unittest.TestCase):
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import os
|
2
|
-
import platform
|
3
1
|
import unittest
|
4
2
|
from pathlib import Path
|
5
3
|
from tempfile import TemporaryDirectory
|
@@ -12,21 +10,14 @@ HERE = Path(__file__).parent
|
|
12
10
|
TEST_DIR = HERE / "test_ino" / "wasm"
|
13
11
|
|
14
12
|
|
15
|
-
EXAMPLES = [
|
16
|
-
"Blink",
|
17
|
-
"wasm",
|
18
|
-
"Chromancer",
|
19
|
-
"SdCard",
|
20
|
-
]
|
13
|
+
EXAMPLES = ["Blink", "wasm", "Chromancer", "SdCard", "fx/NoiseRing"]
|
21
14
|
|
22
15
|
|
23
16
|
def _enabled() -> bool:
|
24
17
|
"""Check if this system can run the tests."""
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# this only works in ubuntu at the moment
|
29
|
-
return platform.system() == "Linux"
|
18
|
+
from fastled import Test
|
19
|
+
|
20
|
+
return Test.can_run_local_docker_tests()
|
30
21
|
|
31
22
|
|
32
23
|
class WebCompileTester(unittest.TestCase):
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import os
|
2
|
-
import platform
|
3
1
|
import unittest
|
4
2
|
from pathlib import Path
|
5
3
|
from tempfile import TemporaryDirectory
|
@@ -13,11 +11,9 @@ TEST_DIR = HERE / "test_ino" / "wasm"
|
|
13
11
|
|
14
12
|
def _enabled() -> bool:
|
15
13
|
"""Check if this system can run the tests."""
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# this only works in ubuntu at the moment
|
20
|
-
return platform.system() == "Linux"
|
14
|
+
from fastled import Test
|
15
|
+
|
16
|
+
return Test.can_run_local_docker_tests()
|
21
17
|
|
22
18
|
|
23
19
|
class ProjectInitTester(unittest.TestCase):
|
@@ -25,7 +21,8 @@ class ProjectInitTester(unittest.TestCase):
|
|
25
21
|
|
26
22
|
def test_get_examples(self) -> None:
|
27
23
|
"""Test get_examples function."""
|
28
|
-
|
24
|
+
with Api.server(auto_updates=True) as server:
|
25
|
+
examples = get_examples(server.url())
|
29
26
|
self.assertTrue(len(examples) > 0)
|
30
27
|
self.assertTrue("wasm" in examples)
|
31
28
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import os
|
2
|
-
import platform
|
3
2
|
import unittest
|
4
3
|
from pathlib import Path
|
5
4
|
|
@@ -12,11 +11,9 @@ CLIENT_CMD = f"fastled --just-compile --localhost {TEST_DIR}"
|
|
12
11
|
|
13
12
|
def _enabled() -> bool:
|
14
13
|
"""Check if this system can run the tests."""
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# this only works in ubuntu at the moment
|
19
|
-
return platform.system() == "Linux"
|
14
|
+
from fastled import Test
|
15
|
+
|
16
|
+
return Test.can_run_local_docker_tests()
|
20
17
|
|
21
18
|
|
22
19
|
class ServerLocalClientTester(unittest.TestCase):
|
@@ -1,31 +0,0 @@
|
|
1
|
-
from tempfile import TemporaryDirectory
|
2
|
-
|
3
|
-
|
4
|
-
def test_examples(
|
5
|
-
examples: list[str] | None = None, host: str | None = None
|
6
|
-
) -> dict[str, Exception]:
|
7
|
-
"""Test the examples in the given directory."""
|
8
|
-
from fastled import Api
|
9
|
-
|
10
|
-
out: dict[str, Exception] = {}
|
11
|
-
examples = Api.get_examples() if examples is None else examples
|
12
|
-
with TemporaryDirectory() as tmpdir:
|
13
|
-
for example in examples:
|
14
|
-
print(f"Initializing example: {example}")
|
15
|
-
sketch_dir = Api.project_init(example, outputdir=tmpdir, host=host)
|
16
|
-
print(f"Project initialized at: {sketch_dir}")
|
17
|
-
print(f"Compiling example: {example}")
|
18
|
-
result = Api.web_compile(sketch_dir, host=host)
|
19
|
-
if not result.success:
|
20
|
-
out[example] = Exception(result.stdout)
|
21
|
-
return out
|
22
|
-
|
23
|
-
|
24
|
-
def unit_test() -> None:
|
25
|
-
out = test_examples()
|
26
|
-
if out:
|
27
|
-
raise RuntimeError(f"Failed tests: {out}")
|
28
|
-
|
29
|
-
|
30
|
-
if __name__ == "__main__":
|
31
|
-
unit_test()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fastled-1.1.88 → fastled-1.2.0}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|