fastled 1.2.36__tar.gz → 1.2.38__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.2.36 → fastled-1.2.38}/PKG-INFO +2 -2
- {fastled-1.2.36 → fastled-1.2.38}/README.md +1 -1
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/__init__.py +24 -13
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/app.py +1 -1
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/PKG-INFO +2 -2
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/SOURCES.txt +0 -1
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_build_from_docker.py +3 -1
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_build_from_github.py +8 -5
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_http_server.py +12 -4
- fastled-1.2.36/tests/test_build.py +0 -57
- {fastled-1.2.36 → fastled-1.2.38}/.aiderignore +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/build_multi_docker_image.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/build_webpage.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/lint.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/publish_release.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/test_build_exe.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.github/workflows/test_win.yml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.gitignore +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.pylintrc +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.vscode/launch.json +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.vscode/settings.json +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/.vscode/tasks.json +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/LICENSE +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/MANIFEST.in +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/RELEASE.md +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/TODO.md +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/build_exe.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/build_site.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/clean +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/install +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/install_linux.sh +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/lint +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/pyproject.toml +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/requirements.testing.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/setup.cfg +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/setup.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/assets/example.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/cli.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/client_server.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/compile_server.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/compile_server_impl.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/docker_manager.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/filewatcher.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/keyboard.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/live_client.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/open_browser.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/open_browser2.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/parse_args.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/paths.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/project_init.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/select_sketch_directory.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/settings.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/site/build.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/sketch.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/spinner.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/string_diff.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/test/can_run_local_docker_tests.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/test/examples.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/types.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/util.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled/web_compile.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/requires.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/test +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/html/index.html +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_api.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_bad_ino.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_build_examples.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_cli.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_compile_server.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_docker_linux_on_windows.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_embedded_data.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_examples.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_filechanger.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/bad/bad.ino +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/bad_platformio/bad_platformio.ino +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/bad_platformio/platformio.ini +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/embedded/data/bigdata.dat +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/embedded/wasm.ino +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_ino/wasm/wasm.ino +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_project_init.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_server_and_client_seperatly.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/tests/test_webcompile.py +0 -0
- {fastled-1.2.36 → fastled-1.2.38}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.38
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -211,7 +211,7 @@ with Api.server() as server:
|
|
211
211
|
**Build Docker Image from a local copy of the FastLED repo**
|
212
212
|
```python
|
213
213
|
from fastapi import Docker, Api
|
214
|
-
container_name: str = Docker.
|
214
|
+
container_name: str = Docker.spawn_server_from_fastled_repo()
|
215
215
|
with Api.server(container_name=container_name) as server:
|
216
216
|
...
|
217
217
|
```
|
@@ -185,7 +185,7 @@ with Api.server() as server:
|
|
185
185
|
**Build Docker Image from a local copy of the FastLED repo**
|
186
186
|
```python
|
187
187
|
from fastapi import Docker, Api
|
188
|
-
container_name: str = Docker.
|
188
|
+
container_name: str = Docker.spawn_server_from_fastled_repo()
|
189
189
|
with Api.server(container_name=container_name) as server:
|
190
190
|
...
|
191
191
|
```
|
@@ -16,7 +16,7 @@ from .types import BuildMode, CompileResult, CompileServerError
|
|
16
16
|
# IMPORTANT! There's a bug in github which will REJECT any version update
|
17
17
|
# that has any other change in the repo. Please bump the version as the
|
18
18
|
# ONLY change in a commit, or else the pypi update and the release will fail.
|
19
|
-
__version__ = "1.2.
|
19
|
+
__version__ = "1.2.38"
|
20
20
|
|
21
21
|
|
22
22
|
class Api:
|
@@ -157,10 +157,10 @@ class Docker:
|
|
157
157
|
docker_mgr.purge(image_name=IMAGE_NAME)
|
158
158
|
|
159
159
|
@staticmethod
|
160
|
-
def
|
160
|
+
def spawn_server_from_github(
|
161
161
|
url: str = "https://github.com/fastled/fastled",
|
162
162
|
output_dir: Path | str = Path(".cache/fastled"),
|
163
|
-
) ->
|
163
|
+
) -> CompileServer:
|
164
164
|
"""Build the FastLED WASM compiler Docker image from a GitHub repository.
|
165
165
|
|
166
166
|
Args:
|
@@ -252,21 +252,32 @@ class Docker:
|
|
252
252
|
platform_tag=platform_tag,
|
253
253
|
)
|
254
254
|
|
255
|
-
# Run the container and return it
|
256
|
-
container = docker_mgr.run_container_detached(
|
257
|
-
|
258
|
-
|
255
|
+
# # Run the container and return it
|
256
|
+
# container = docker_mgr.run_container_detached(
|
257
|
+
# image_name=IMAGE_NAME,
|
258
|
+
# tag="main",
|
259
|
+
# container_name=CONTAINER_NAME,
|
260
|
+
# command=None, # Use default command from Dockerfile
|
261
|
+
# volumes=None, # No volumes needed for build
|
262
|
+
# ports=None, # No ports needed for build
|
263
|
+
# remove_previous=True, # Remove any existing container
|
264
|
+
# )
|
265
|
+
# name = container.name
|
266
|
+
# container.stop()
|
267
|
+
|
268
|
+
out: CompileServer = CompileServer(
|
259
269
|
container_name=CONTAINER_NAME,
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
270
|
+
interactive=False,
|
271
|
+
auto_updates=False,
|
272
|
+
mapped_dir=None,
|
273
|
+
auto_start=True,
|
274
|
+
remove_previous=True,
|
264
275
|
)
|
265
276
|
|
266
|
-
return
|
277
|
+
return out
|
267
278
|
|
268
279
|
@staticmethod
|
269
|
-
def
|
280
|
+
def spawn_server_from_fastled_repo(
|
270
281
|
project_root: Path | str = Path("."),
|
271
282
|
interactive: bool = False,
|
272
283
|
sketch_folder: Path | None = None,
|
@@ -66,7 +66,7 @@ def main() -> int:
|
|
66
66
|
print(f"Building Docker image at {project_root}")
|
67
67
|
from fastled import Api, Docker
|
68
68
|
|
69
|
-
server = Docker.
|
69
|
+
server = Docker.spawn_server_from_fastled_repo(
|
70
70
|
project_root=project_root, interactive=interactive
|
71
71
|
)
|
72
72
|
assert isinstance(server, CompileServer)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.38
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -211,7 +211,7 @@ with Api.server() as server:
|
|
211
211
|
**Build Docker Image from a local copy of the FastLED repo**
|
212
212
|
```python
|
213
213
|
from fastapi import Docker, Api
|
214
|
-
container_name: str = Docker.
|
214
|
+
container_name: str = Docker.spawn_server_from_fastled_repo()
|
215
215
|
with Api.server(container_name=container_name) as server:
|
216
216
|
...
|
217
217
|
```
|
@@ -34,7 +34,9 @@ class BuildDockerFromRepoTester(unittest.TestCase):
|
|
34
34
|
@unittest.skipUnless(_enabled(), "Skipping test on non-Linux system on github")
|
35
35
|
def test_build_docker(self) -> None:
|
36
36
|
"""Builds the docker file from the fastled repo."""
|
37
|
-
server: CompileServer = Docker.
|
37
|
+
server: CompileServer = Docker.spawn_server_from_fastled_repo(
|
38
|
+
FASTLED_SISTER_REPO
|
39
|
+
)
|
38
40
|
self.assertIsNotNone(server, "Failed to build docker image")
|
39
41
|
|
40
42
|
try:
|
@@ -5,7 +5,7 @@ Unit test file.
|
|
5
5
|
import unittest
|
6
6
|
from pathlib import Path
|
7
7
|
|
8
|
-
from fastled import
|
8
|
+
from fastled import CompileServer, Docker, Test # type: ignore
|
9
9
|
|
10
10
|
HERE = Path(__file__).parent
|
11
11
|
PROJECT_ROOT = HERE.parent
|
@@ -35,11 +35,14 @@ class BuildDockerFromGithubTester(unittest.TestCase):
|
|
35
35
|
"""Builds the docker file from the fastled repo."""
|
36
36
|
url = DEFAULT_GITHUB_URL
|
37
37
|
print("Building from github")
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
server: CompileServer = Docker.spawn_server_from_github(
|
39
|
+
url=url, output_dir=OUTPUT_DIR
|
40
|
+
)
|
41
|
+
self.assertTrue(server, "Failed to build docker image")
|
42
|
+
try:
|
42
43
|
self.assertTrue(server.ping())
|
44
|
+
finally:
|
45
|
+
server.stop()
|
43
46
|
|
44
47
|
|
45
48
|
if __name__ == "__main__":
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Unit test file.
|
3
3
|
"""
|
4
4
|
|
5
|
+
import random
|
5
6
|
import unittest
|
6
7
|
from pathlib import Path
|
7
8
|
|
@@ -16,20 +17,27 @@ TIMEOUT = 120
|
|
16
17
|
assert INDEX_HTML.exists()
|
17
18
|
|
18
19
|
|
20
|
+
# realistic range, 8021 - 8030
|
21
|
+
PORT = random.randint(8021, 8030)
|
22
|
+
PORT2 = PORT + 1
|
23
|
+
|
24
|
+
|
19
25
|
class HttpServerTester(unittest.TestCase):
|
20
26
|
"""Main tester class."""
|
21
27
|
|
22
28
|
def test_http_server(self) -> None:
|
23
29
|
"""Test the http server."""
|
24
|
-
|
25
|
-
|
30
|
+
port = PORT
|
31
|
+
proc = Test.spawn_http_server(INDEX_HTML.parent, port=port, open_browser=False)
|
32
|
+
response = httpx.get(f"http://localhost:{port}", timeout=1)
|
26
33
|
self.assertEqual(response.status_code, 200)
|
27
34
|
proc.terminate()
|
28
35
|
|
29
36
|
def test_http_server_404(self) -> None:
|
30
37
|
"""Test the http server returns 404 for non-existent files."""
|
31
|
-
|
32
|
-
|
38
|
+
port = PORT2
|
39
|
+
proc = Test.spawn_http_server(INDEX_HTML.parent, port=port, open_browser=False)
|
40
|
+
response = httpx.get(f"http://localhost:{port}/nonexistent.html", timeout=1)
|
33
41
|
self.assertEqual(response.status_code, 404)
|
34
42
|
proc.terminate()
|
35
43
|
|
@@ -1,57 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Unit test file.
|
3
|
-
"""
|
4
|
-
|
5
|
-
import unittest
|
6
|
-
from pathlib import Path
|
7
|
-
|
8
|
-
from fastled import Api, CompileServer, Docker, Test # type: ignore
|
9
|
-
|
10
|
-
HERE = Path(__file__).parent
|
11
|
-
PROJECT_ROOT = HERE.parent
|
12
|
-
FASTLED_SISTER_REPO = PROJECT_ROOT / ".." / "FastLED"
|
13
|
-
|
14
|
-
DEFAULT_GITHUB_URL = "https://github.com/fastled/fastled"
|
15
|
-
OUTPUT_DIR = Path(".cache/fastled")
|
16
|
-
|
17
|
-
|
18
|
-
def _enabled() -> bool:
|
19
|
-
"""Check if this system can run the tests."""
|
20
|
-
sister_repo_does_not_exist = not FASTLED_SISTER_REPO.exists()
|
21
|
-
|
22
|
-
if sister_repo_does_not_exist:
|
23
|
-
print(
|
24
|
-
f"This test is only enable when FastLED is a repo in the same directly as the project root folder: {FASTLED_SISTER_REPO} does not exist"
|
25
|
-
)
|
26
|
-
return False
|
27
|
-
|
28
|
-
return Test.can_run_local_docker_tests()
|
29
|
-
|
30
|
-
|
31
|
-
class BuildDockerFromRepoTester(unittest.TestCase):
|
32
|
-
"""Main tester class."""
|
33
|
-
|
34
|
-
@unittest.skipUnless(_enabled(), "Skipping test on non-Linux system on github")
|
35
|
-
def test_build_docker(self) -> None:
|
36
|
-
"""Builds the docker file from the fastled repo."""
|
37
|
-
|
38
|
-
container = Docker.build_from_fastled_repo(FASTLED_SISTER_REPO)
|
39
|
-
try:
|
40
|
-
self.assertTrue(container.ping())
|
41
|
-
finally:
|
42
|
-
container.stop()
|
43
|
-
|
44
|
-
@unittest.skipUnless(_enabled(), "Skipping test on non-Linux system on github")
|
45
|
-
def test_build_docker_from_github(self) -> None:
|
46
|
-
"""Builds the docker file from the fastled repo."""
|
47
|
-
url = DEFAULT_GITHUB_URL
|
48
|
-
print("Building from github")
|
49
|
-
docker_image_name = Docker.build_from_github(url=url, output_dir=OUTPUT_DIR)
|
50
|
-
self.assertTrue(docker_image_name, "Failed to build docker image")
|
51
|
-
server: CompileServer
|
52
|
-
with Api.server(auto_updates=True, container_name=docker_image_name) as server:
|
53
|
-
self.assertTrue(server.ping())
|
54
|
-
|
55
|
-
|
56
|
-
if __name__ == "__main__":
|
57
|
-
unittest.main()
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|