fastled 1.2.87__py3-none-any.whl → 1.2.89__py3-none-any.whl

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/__init__.py CHANGED
@@ -14,7 +14,7 @@ from .types import BuildMode, CompileResult, CompileServerError, FileResponse
14
14
  # IMPORTANT! There's a bug in github which will REJECT any version update
15
15
  # that has any other change in the repo. Please bump the version as the
16
16
  # ONLY change in a commit, or else the pypi update and the release will fail.
17
- __version__ = "1.2.87"
17
+ __version__ = "1.2.89"
18
18
 
19
19
 
20
20
  class Api:
fastled/app.py CHANGED
@@ -10,6 +10,13 @@ from fastled.client_server import run_client_server
10
10
  from fastled.compile_server import CompileServer
11
11
  from fastled.filewatcher import file_watcher_set
12
12
  from fastled.parse_args import Args, parse_args
13
+ from fastled.sketch import find_sketch_directories, looks_like_fastled_repo
14
+
15
+ # from fastled.sketch import (
16
+ # find_sketch_directories,
17
+ # looks_like_fastled_repo,
18
+ # looks_like_sketch_directory,
19
+ # )
13
20
 
14
21
 
15
22
  def run_server(args: Args) -> int:
@@ -53,10 +60,37 @@ def main() -> int:
53
60
  just_compile: bool = args.just_compile
54
61
  # directory: Path | None = Path(args.directory).absolute() if args.directory else None
55
62
  directory: Path | None = Path(args.directory) if args.directory else None
63
+ cwd_looks_like_fastled_repo = looks_like_fastled_repo()
56
64
 
57
65
  # now it is safe to print out the version
58
66
  print(f"FastLED version: {__version__}")
59
67
 
68
+ # Resolve some of the last interactive arguments
69
+ # 1. If interactive is set and the sketch directory is not given,
70
+ # then prompt the user for a sketch directory.
71
+ # 2. Tell the user they can use --server --interactive to
72
+ # skip this prompt.
73
+
74
+ from fastled.select_sketch_directory import select_sketch_directory
75
+
76
+ if interactive and cwd_looks_like_fastled_repo and directory is None:
77
+ answer = input(
78
+ "No sketch directory selected, would you like to select one? (y/n): "
79
+ )
80
+ if answer.lower() == "y":
81
+ sketch_list: list[Path] = find_sketch_directories()
82
+ if sketch_list:
83
+ maybe_dir: str | None = select_sketch_directory(
84
+ sketch_list, cwd_looks_like_fastled_repo
85
+ )
86
+ if maybe_dir is not None:
87
+ directory = Path(maybe_dir)
88
+ if not directory.exists():
89
+ print(
90
+ f"Directory {directory} does not exist, entering interactive mode without project mapped in."
91
+ )
92
+ directory = None
93
+
60
94
  if update:
61
95
  # Force auto_update to ensure update check happens
62
96
  compile_server = CompileServer(interactive=False, auto_updates=True)
fastled/parse_args.py CHANGED
@@ -30,9 +30,7 @@ FastLED WASM Compiler - Useful options:
30
30
  --init [example] Initialize one of the top tier WASM examples
31
31
  --web [url] Use web compiler
32
32
  --server Run the compiler server
33
- --debug Build with debug symbols for dev-tools debugging
34
33
  --quick Build in quick mode (default)
35
- --release Build in optimized release mode
36
34
  --profile Enable profiling the C++ build system
37
35
  --update Update the docker image for the wasm compiler
38
36
  --purge Remove all FastLED containers and images
@@ -44,6 +42,11 @@ Examples:
44
42
  fastled my_sketch --web (compiles using the web compiler only)
45
43
  fastled --init Blink (initializes a new sketch directory with the Blink example)
46
44
  fastled --server (runs the compiler server in the current directory)
45
+
46
+ For those using Docker:
47
+ --debug Build with debug symbols for dev-tools debugging
48
+
49
+ --release Build in optimized release mode
47
50
  """
48
51
 
49
52
 
fastled/server_flask.py CHANGED
@@ -8,7 +8,7 @@ import httpx
8
8
  from livereload import Server
9
9
 
10
10
  # Logging configuration
11
- _ENABLE_LOGGING = False # Set to False to disable logging
11
+ _ENABLE_LOGGING = True # Set to False to disable logging
12
12
 
13
13
  if _ENABLE_LOGGING:
14
14
  logging.basicConfig(
fastled/sketch.py CHANGED
@@ -4,7 +4,9 @@ from pathlib import Path
4
4
  _MAX_FILES_SEARCH_LIMIT = 10000
5
5
 
6
6
 
7
- def find_sketch_directories(directory: Path) -> list[Path]:
7
+ def find_sketch_directories(directory: Path | None = None) -> list[Path]:
8
+ if directory is None:
9
+ directory = Path(".")
8
10
  file_count = 0
9
11
  sketch_directories: list[Path] = []
10
12
  # search all the paths one level deep
@@ -60,7 +62,7 @@ def get_sketch_files(directory: Path) -> list[Path]:
60
62
  return files
61
63
 
62
64
 
63
- def looks_like_fastled_repo(directory: Path) -> bool:
65
+ def looks_like_fastled_repo(directory: Path = Path(".")) -> bool:
64
66
  libprops = directory / "library.properties"
65
67
  if not libprops.exists():
66
68
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.2.87
3
+ Version: 1.2.89
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,5 +1,5 @@
1
- fastled/__init__.py,sha256=pXj8FDhKR-hgY-Su4vkm_F5lh4GrG-pJ8tYX73QaSxE,7044
2
- fastled/app.py,sha256=0W8Mbplo5UCRzj7nMVgkmCBddQGufsUQjkUUT4pMp74,4611
1
+ fastled/__init__.py,sha256=gzooZJqTXPNZPt9qW17SejpWxJ-Vll6x1ss-oPDe13o,7044
2
+ fastled/app.py,sha256=LyQXHmIjK8aqel9sDRmzSHjnOiaITbsnGPoz6IDXQFc,6032
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
5
5
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
@@ -12,15 +12,15 @@ fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
12
12
  fastled/keyz.py,sha256=LO-8m_7CpNDiZLM-FXhQ30f9gN1bUYz5lOsUPTIbI-c,4020
13
13
  fastled/live_client.py,sha256=yoAul8tVgbbPf1oEC79SUZSHkLECxlrXxgWR9XaBIp4,2957
14
14
  fastled/open_browser.py,sha256=DFyMrc1qic4Go7eLNPqMaLuMvTaE73NixdfSKV0yyp8,3709
15
- fastled/parse_args.py,sha256=waNeATOEz8D50Py5-9p6HcVSa21piTOAWOXS3ag8PYo,9428
15
+ fastled/parse_args.py,sha256=tP8-AiVxEsZ5xvsL8YFfkd5L1whM3wzLS37IX2HCNrk,9454
16
16
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
17
17
  fastled/print_filter.py,sha256=B0v493WAFN8DgG7aqM8iXMqI_V1EdMMvOnNQ26JNUxU,5499
18
18
  fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
19
19
  fastled/select_sketch_directory.py,sha256=-eudwCns3AKj4HuHtSkZAFwbnf005SNL07pOzs9VxnE,1383
20
- fastled/server_flask.py,sha256=fbLuF993pbBqoyMbjHT1GPwjlxBib3cUUW719PNfN1w,18108
20
+ fastled/server_flask.py,sha256=nDfGO0SbYBEIG_xmNfnxa6Yya0A1KoGGL9UP_IamF1A,18107
21
21
  fastled/server_start.py,sha256=W9yKStkRlRNuXeV6j_6O7HjjFPyVLBHMcF9Uy2QjDWQ,479
22
22
  fastled/settings.py,sha256=oezRvRUJWwauO-kpC4LDbKg6Q-ij4d09UtR2vkjSAPU,575
23
- fastled/sketch.py,sha256=tHckjDj8P6BI_LWzUFM071a9qcqPs-r-qFWIe50P5Xw,3391
23
+ fastled/sketch.py,sha256=Ftbh55Nt-p4hmPuPpj8Q9HrMzvnUazhoG_q9FHcxkns,3473
24
24
  fastled/spinner.py,sha256=VHxmvB92P0Z_zYxRajb5HiNmkHHvZ5dG7hKtZltzpcs,867
25
25
  fastled/string_diff.py,sha256=NbtYxvBFxTUdmTpMLizlgZj2ULJ-7etj72GBdWDTGws,2496
26
26
  fastled/types.py,sha256=k1j1y5h1zpRonp1mqRXy797mSbLqzf5K1QEgl8f27jQ,4822
@@ -33,9 +33,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
33
33
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
34
34
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
35
35
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
36
- fastled-1.2.87.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
- fastled-1.2.87.dist-info/METADATA,sha256=WLh9Pi4s5hfiXZRVV2jW7sK0oyxDq_yU3eb7ZeKdZAc,21940
38
- fastled-1.2.87.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
39
- fastled-1.2.87.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
- fastled-1.2.87.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
- fastled-1.2.87.dist-info/RECORD,,
36
+ fastled-1.2.89.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
37
+ fastled-1.2.89.dist-info/METADATA,sha256=1oJlwSMh9dUeiaNbrjAb7y2Egtc8dh1MMqVxqfV9jnc,21940
38
+ fastled-1.2.89.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
39
+ fastled-1.2.89.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
40
+ fastled-1.2.89.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
41
+ fastled-1.2.89.dist-info/RECORD,,