fastled 1.2.4__tar.gz → 1.2.5__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.
Files changed (79) hide show
  1. {fastled-1.2.4 → fastled-1.2.5}/PKG-INFO +2 -1
  2. {fastled-1.2.4 → fastled-1.2.5}/README.md +1 -0
  3. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/__init__.py +1 -1
  4. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/parse_args.py +5 -1
  5. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/project_init.py +53 -3
  6. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/site/build.py +3 -3
  7. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/PKG-INFO +2 -1
  8. {fastled-1.2.4 → fastled-1.2.5}/tests/test_examples.py +1 -1
  9. {fastled-1.2.4 → fastled-1.2.5}/.aiderignore +0 -0
  10. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/build_multi_docker_image.yml +0 -0
  11. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/build_webpage.yml +0 -0
  12. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/lint.yml +0 -0
  13. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/publish_release.yml +0 -0
  14. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/test_build_exe.yml +0 -0
  15. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/test_macos.yml +0 -0
  16. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/test_ubuntu.yml +0 -0
  17. {fastled-1.2.4 → fastled-1.2.5}/.github/workflows/test_win.yml +0 -0
  18. {fastled-1.2.4 → fastled-1.2.5}/.gitignore +0 -0
  19. {fastled-1.2.4 → fastled-1.2.5}/.pylintrc +0 -0
  20. {fastled-1.2.4 → fastled-1.2.5}/.vscode/launch.json +0 -0
  21. {fastled-1.2.4 → fastled-1.2.5}/.vscode/settings.json +0 -0
  22. {fastled-1.2.4 → fastled-1.2.5}/.vscode/tasks.json +0 -0
  23. {fastled-1.2.4 → fastled-1.2.5}/LICENSE +0 -0
  24. {fastled-1.2.4 → fastled-1.2.5}/MANIFEST.in +0 -0
  25. {fastled-1.2.4 → fastled-1.2.5}/RELEASE.md +0 -0
  26. {fastled-1.2.4 → fastled-1.2.5}/TODO.md +0 -0
  27. {fastled-1.2.4 → fastled-1.2.5}/build_exe.py +0 -0
  28. {fastled-1.2.4 → fastled-1.2.5}/build_site.py +0 -0
  29. {fastled-1.2.4 → fastled-1.2.5}/clean +0 -0
  30. {fastled-1.2.4 → fastled-1.2.5}/install +0 -0
  31. {fastled-1.2.4 → fastled-1.2.5}/lint +0 -0
  32. {fastled-1.2.4 → fastled-1.2.5}/pyproject.toml +0 -0
  33. {fastled-1.2.4 → fastled-1.2.5}/requirements.testing.txt +0 -0
  34. {fastled-1.2.4 → fastled-1.2.5}/setup.cfg +0 -0
  35. {fastled-1.2.4 → fastled-1.2.5}/setup.py +0 -0
  36. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/app.py +0 -0
  37. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/assets/example.txt +0 -0
  38. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/cli.py +0 -0
  39. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/client_server.py +0 -0
  40. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/compile_server.py +0 -0
  41. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/compile_server_impl.py +0 -0
  42. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/docker_manager.py +0 -0
  43. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/filewatcher.py +0 -0
  44. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/keyboard.py +0 -0
  45. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/live_client.py +0 -0
  46. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/open_browser.py +0 -0
  47. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/paths.py +0 -0
  48. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/select_sketch_directory.py +0 -0
  49. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/settings.py +0 -0
  50. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/sketch.py +0 -0
  51. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/spinner.py +0 -0
  52. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/string_diff.py +0 -0
  53. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/test/can_run_local_docker_tests.py +0 -0
  54. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/test/examples.py +0 -0
  55. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/types.py +0 -0
  56. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/util.py +0 -0
  57. {fastled-1.2.4 → fastled-1.2.5}/src/fastled/web_compile.py +0 -0
  58. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/SOURCES.txt +0 -0
  59. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/dependency_links.txt +0 -0
  60. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/entry_points.txt +0 -0
  61. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/requires.txt +0 -0
  62. {fastled-1.2.4 → fastled-1.2.5}/src/fastled.egg-info/top_level.txt +0 -0
  63. {fastled-1.2.4 → fastled-1.2.5}/test +0 -0
  64. {fastled-1.2.4 → fastled-1.2.5}/tests/test_api.py +0 -0
  65. {fastled-1.2.4 → fastled-1.2.5}/tests/test_bad_ino.py +0 -0
  66. {fastled-1.2.4 → fastled-1.2.5}/tests/test_build_examples.py +0 -0
  67. {fastled-1.2.4 → fastled-1.2.5}/tests/test_cli.py +0 -0
  68. {fastled-1.2.4 → fastled-1.2.5}/tests/test_compile_server.py +0 -0
  69. {fastled-1.2.4 → fastled-1.2.5}/tests/test_docker_linux_on_windows.py +0 -0
  70. {fastled-1.2.4 → fastled-1.2.5}/tests/test_embedded_data.py +0 -0
  71. {fastled-1.2.4 → fastled-1.2.5}/tests/test_filechanger.py +0 -0
  72. {fastled-1.2.4 → fastled-1.2.5}/tests/test_ino/bad/bad.ino +0 -0
  73. {fastled-1.2.4 → fastled-1.2.5}/tests/test_ino/embedded/data/bigdata.dat +0 -0
  74. {fastled-1.2.4 → fastled-1.2.5}/tests/test_ino/embedded/wasm.ino +0 -0
  75. {fastled-1.2.4 → fastled-1.2.5}/tests/test_ino/wasm/wasm.ino +0 -0
  76. {fastled-1.2.4 → fastled-1.2.5}/tests/test_project_init.py +0 -0
  77. {fastled-1.2.4 → fastled-1.2.5}/tests/test_server_and_client_seperatly.py +0 -0
  78. {fastled-1.2.4 → fastled-1.2.5}/tests/test_webcompile.py +0 -0
  79. {fastled-1.2.4 → fastled-1.2.5}/upload_package.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -266,6 +266,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
266
266
 
267
267
  # Revisions
268
268
 
269
+ * 1.1.25 - Fix up paths for `--init`
269
270
  * 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
270
271
  * 1.1.23 - Fixes missing `live-server` on platforms that don't have it already.
271
272
  * 1.2.22 - Added `--purge` and added docker api at __init__.
@@ -243,6 +243,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
243
243
 
244
244
  # Revisions
245
245
 
246
+ * 1.1.25 - Fix up paths for `--init`
246
247
  * 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
247
248
  * 1.1.23 - Fixes missing `live-server` on platforms that don't have it already.
248
249
  * 1.2.22 - Added `--purge` and added docker api at __init__.
@@ -13,7 +13,7 @@ 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.2.4"
16
+ __version__ = "1.2.5"
17
17
 
18
18
 
19
19
  class Api:
@@ -116,7 +116,11 @@ def parse_args() -> argparse.Namespace:
116
116
 
117
117
  if args.init:
118
118
  example = args.init if args.init is not True else None
119
- args.directory = project_init(example, args.directory)
119
+ try:
120
+ args.directory = project_init(example, args.directory)
121
+ except Exception as e:
122
+ print(f"Failed to initialize project: {e}")
123
+ sys.exit(1)
120
124
  print("\nInitialized FastLED project in", args.directory)
121
125
  print(f"Use 'fastled {args.directory}' to compile the project.")
122
126
  sys.exit(0)
@@ -1,9 +1,13 @@
1
+ import _thread
2
+ import threading
3
+ import time
1
4
  import zipfile
2
5
  from pathlib import Path
3
6
 
4
7
  import httpx
5
8
 
6
9
  from fastled.settings import DEFAULT_URL
10
+ from fastled.spinner import Spinner
7
11
 
8
12
  DEFAULT_EXAMPLE = "wasm"
9
13
 
@@ -34,6 +38,35 @@ def _prompt_for_example() -> str:
34
38
  return answer
35
39
 
36
40
 
41
+ class DownloadThread(threading.Thread):
42
+ def __init__(self, url: str, json: str):
43
+ super().__init__(daemon=True)
44
+ self.url = url
45
+ self.json = json
46
+ self.bytes_downloaded = 0
47
+ self.content: bytes | None = None
48
+ self.error: Exception | None = None
49
+ self.success = False
50
+
51
+ def run(self) -> None:
52
+ timeout = httpx.Timeout(5.0, connect=5.0, read=120.0, write=30.0)
53
+ try:
54
+ with httpx.Client(timeout=timeout) as client:
55
+ with client.stream("POST", self.url, json=self.json) as response:
56
+ response.raise_for_status()
57
+ content = b""
58
+ for chunk in response.iter_bytes():
59
+ content += chunk
60
+ self.bytes_downloaded += len(chunk)
61
+ self.content = content
62
+ self.success = True
63
+ except KeyboardInterrupt:
64
+ self.error = RuntimeError("Download cancelled")
65
+ _thread.interrupt_main()
66
+ except Exception as e:
67
+ self.error = e
68
+
69
+
37
70
  def project_init(
38
71
  example: str | None = "PROMPT", # prompt for example
39
72
  outputdir: Path | None = None,
@@ -56,9 +89,26 @@ def project_init(
56
89
  assert example is not None
57
90
  endpoint_url = f"{host}/project/init"
58
91
  json = example
59
- response = httpx.post(endpoint_url, timeout=20, json=json)
60
- response.raise_for_status()
61
- content = response.content
92
+ print(f"Initializing project with example '{example}', url={endpoint_url}")
93
+
94
+ # Start download thread
95
+ download_thread = DownloadThread(endpoint_url, json)
96
+ # spinner = Spinner("Downloading project...")
97
+ with Spinner(f"Downloading project {example}..."):
98
+ download_thread.start()
99
+ while download_thread.is_alive():
100
+ time.sleep(0.1)
101
+
102
+ print() # New line after progress
103
+ download_thread.join()
104
+
105
+ # Check for errors
106
+ if not download_thread.success:
107
+ assert download_thread.error is not None
108
+ raise download_thread.error
109
+
110
+ content = download_thread.content
111
+ assert content is not None
62
112
  tmpzip = outputdir / "fastled.zip"
63
113
  outputdir.mkdir(exist_ok=True)
64
114
  tmpzip.write_bytes(content)
@@ -302,9 +302,9 @@ EXAMPLES = [
302
302
  "wasm",
303
303
  "Chromancer",
304
304
  "LuminescentGrand",
305
- "fx/SdCard",
306
- "fx/NoiseRing",
307
- "fx/Water",
305
+ "FxSdCard",
306
+ "FxNoiseRing",
307
+ "FxWater",
308
308
  ]
309
309
 
310
310
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastled
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -266,6 +266,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
266
266
 
267
267
  # Revisions
268
268
 
269
+ * 1.1.25 - Fix up paths for `--init`
269
270
  * 1.1.24 - Mac/Linux now properly responds to ctrl-c when waiting for a key event.
270
271
  * 1.1.23 - Fixes missing `live-server` on platforms that don't have it already.
271
272
  * 1.2.22 - Added `--purge` and added docker api at __init__.
@@ -10,7 +10,7 @@ HERE = Path(__file__).parent
10
10
  TEST_DIR = HERE / "test_ino" / "wasm"
11
11
 
12
12
 
13
- EXAMPLES = ["Blink", "wasm", "Chromancer", "fx/SdCard", "fx/NoiseRing"]
13
+ EXAMPLES = ["Blink", "wasm", "Chromancer", "FxSdCard", "FxNoiseRing"]
14
14
 
15
15
 
16
16
  def _enabled() -> bool:
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