python-lucide 0.5.10__tar.gz → 0.5.12__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 (40) hide show
  1. {python_lucide-0.5.10 → python_lucide-0.5.12}/.gitignore +1 -4
  2. {python_lucide-0.5.10 → python_lucide-0.5.12}/PKG-INFO +14 -11
  3. {python_lucide-0.5.10 → python_lucide-0.5.12}/README.md +12 -8
  4. {python_lucide-0.5.10 → python_lucide-0.5.12}/pyproject.toml +9 -5
  5. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/build_clusters.py +2 -2
  6. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/build_search.py +3 -3
  7. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/config.py +1 -1
  8. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/core.py +3 -3
  9. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/data/gemini-icon-descriptions.jsonl +160 -0
  10. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/data/lucide-icon-clusters.json +5571 -4856
  11. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/data/lucide-icons.sql +6994 -7269
  12. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/cli_test.py +2 -1
  13. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/core_test.py +4 -4
  14. {python_lucide-0.5.10 → python_lucide-0.5.12}/LICENSE +0 -0
  15. {python_lucide-0.5.10 → python_lucide-0.5.12}/Makefile +0 -0
  16. {python_lucide-0.5.10 → python_lucide-0.5.12}/build_support.py +0 -0
  17. {python_lucide-0.5.10 → python_lucide-0.5.12}/hatch_build.py +0 -0
  18. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/__init__.py +0 -0
  19. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/cli.py +0 -0
  20. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/data/__init__.py +0 -0
  21. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/db.py +0 -0
  22. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/dev_utils.py +0 -0
  23. {python_lucide-0.5.10 → python_lucide-0.5.12}/src/lucide/search.py +0 -0
  24. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/__init__.py +0 -0
  25. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/build_clusters_test.py +0 -0
  26. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/build_search_test.py +0 -0
  27. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/conftest.py +0 -0
  28. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/db_source_test.py +0 -0
  29. {python_lucide-0.5.10 → python_lucide-0.5.12}/tests/search_test.py +0 -0
  30. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/App.svelte +0 -0
  31. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/app.css +0 -0
  32. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/components/DetailPanel.svelte +0 -0
  33. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/lib/clusters.ts +0 -0
  34. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/lib/embeddings.ts +0 -0
  35. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/lib/model-loader.ts +0 -0
  36. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/lib/types.ts +0 -0
  37. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/main.ts +0 -0
  38. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/pages/ExplorePage.svelte +0 -0
  39. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/pages/SearchPage.svelte +0 -0
  40. {python_lucide-0.5.10 → python_lucide-0.5.12}/web/src/vite-env.d.ts +0 -0
@@ -95,10 +95,7 @@ ipython_config.py
95
95
  #Pipfile.lock
96
96
 
97
97
  # UV
98
- # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- uv.lock
98
+ # uv.lock is committed: it pins development and CI, never what users install.
102
99
 
103
100
  # poetry
104
101
  # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-lucide
3
- Version: 0.5.10
3
+ Version: 0.5.12
4
4
  Summary: A Python package for working with Lucide icons
5
5
  Project-URL: Bug Tracker, https://github.com/mmacpherson/python-lucide/issues
6
6
  Project-URL: Homepage, https://github.com/mmacpherson/python-lucide
@@ -13,13 +13,12 @@ Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Requires-Python: >=3.10
21
+ Requires-Python: >=3.11
23
22
  Provides-Extra: search
24
23
  Requires-Dist: cairosvg>=2.7.0; extra == 'search'
25
24
  Requires-Dist: fastembed>=0.4.0; extra == 'search'
@@ -57,12 +56,12 @@ pip install python-lucide
57
56
  ```
58
57
  This installs the package with a pre-built database of all Lucide icons, ready to use immediately.
59
58
 
60
- Python 3.10–3.14 are supported. **Python 3.15 support is experimental:** core
59
+ Python 3.11–3.14 are supported. **Python 3.15 support is experimental:** core
61
60
  rendering, aliases, and SQL-backed package builds pass tests on 3.15 RC2 and have
62
61
  a dedicated CI job, but semantic search is currently unsupported because ONNX
63
62
  Runtime does not yet provide compatible wheels. Core installation remains
64
63
  available on 3.15; full support will be advertised once search is validated too.
65
- Use Python 3.10–3.14 for search and full development tooling. HDBSCAN and UMAP's
64
+ Use Python 3.11–3.14 for search and full development tooling. HDBSCAN and UMAP's
66
65
  dependencies affect cluster generation during development, not ordinary searches.
67
66
 
68
67
  To run the core tests on Python 3.15 from a source checkout:
@@ -446,13 +445,17 @@ This project follows a manual release process:
446
445
 
447
446
  2. **Create and merge PR** for the version bump
448
447
 
449
- 3. **Trigger publishing workflow**:
450
- - Go to [Actions](../../actions/workflows/publish.yml)
451
- - Click "Run workflow"
452
- - Select the main branch
453
- - Click "Run workflow"
448
+ 3. **Tag the merged commit on main** with the same version:
449
+ ```bash
450
+ git checkout main && git pull
451
+ git tag v0.2.0
452
+ git push origin v0.2.0
453
+ ```
454
454
 
455
- 4. **Automatic publishing**: The `publish.yml` workflow builds and publishes the package to PyPI using trusted publishing.
455
+ 4. **Automatic publishing**: The `release.yml` workflow checks that the tag
456
+ matches `pyproject.toml` and is on main, runs CI on the tagged commit,
457
+ publishes that build to PyPI using trusted publishing, creates the GitHub
458
+ Release, and attaches the rebuilt search database to its `search-v*` release.
456
459
 
457
460
  ## How It Works
458
461
  The package comes with a pre-built SQLite database containing all Lucide icons. When you call `lucide_icon()`, it fetches the icon's SVG from the database and applies your customizations. This approach means:
@@ -30,12 +30,12 @@ pip install python-lucide
30
30
  ```
31
31
  This installs the package with a pre-built database of all Lucide icons, ready to use immediately.
32
32
 
33
- Python 3.10–3.14 are supported. **Python 3.15 support is experimental:** core
33
+ Python 3.11–3.14 are supported. **Python 3.15 support is experimental:** core
34
34
  rendering, aliases, and SQL-backed package builds pass tests on 3.15 RC2 and have
35
35
  a dedicated CI job, but semantic search is currently unsupported because ONNX
36
36
  Runtime does not yet provide compatible wheels. Core installation remains
37
37
  available on 3.15; full support will be advertised once search is validated too.
38
- Use Python 3.10–3.14 for search and full development tooling. HDBSCAN and UMAP's
38
+ Use Python 3.11–3.14 for search and full development tooling. HDBSCAN and UMAP's
39
39
  dependencies affect cluster generation during development, not ordinary searches.
40
40
 
41
41
  To run the core tests on Python 3.15 from a source checkout:
@@ -419,13 +419,17 @@ This project follows a manual release process:
419
419
 
420
420
  2. **Create and merge PR** for the version bump
421
421
 
422
- 3. **Trigger publishing workflow**:
423
- - Go to [Actions](../../actions/workflows/publish.yml)
424
- - Click "Run workflow"
425
- - Select the main branch
426
- - Click "Run workflow"
422
+ 3. **Tag the merged commit on main** with the same version:
423
+ ```bash
424
+ git checkout main && git pull
425
+ git tag v0.2.0
426
+ git push origin v0.2.0
427
+ ```
427
428
 
428
- 4. **Automatic publishing**: The `publish.yml` workflow builds and publishes the package to PyPI using trusted publishing.
429
+ 4. **Automatic publishing**: The `release.yml` workflow checks that the tag
430
+ matches `pyproject.toml` and is on main, runs CI on the tagged commit,
431
+ publishes that build to PyPI using trusted publishing, creates the GitHub
432
+ Release, and attaches the rebuilt search database to its `search-v*` release.
429
433
 
430
434
  ## How It Works
431
435
  The package comes with a pre-built SQLite database containing all Lucide icons. When you call `lucide_icon()`, it fetches the icon's SVG from the database and applies your customizations. This approach means:
@@ -32,7 +32,6 @@ classifiers = [
32
32
  "Intended Audience :: Developers",
33
33
  "License :: OSI Approved :: MIT License",
34
34
  "Programming Language :: Python :: 3",
35
- "Programming Language :: Python :: 3.10",
36
35
  "Programming Language :: Python :: 3.11",
37
36
  "Programming Language :: Python :: 3.12",
38
37
  "Programming Language :: Python :: 3.13",
@@ -45,8 +44,8 @@ keywords = ["lucide", "icons", "svg", "sqlite"]
45
44
  license = { text = "MIT" }
46
45
  name = "python-lucide"
47
46
  readme = "README.md"
48
- requires-python = ">=3.10"
49
- version = "0.5.10"
47
+ requires-python = ">=3.11"
48
+ version = "0.5.12"
50
49
 
51
50
  [project.optional-dependencies]
52
51
  search = ["cairosvg>=2.7.0", "fastembed>=0.4.0"]
@@ -80,7 +79,7 @@ disallow_untyped_decorators = true
80
79
  disallow_untyped_defs = true
81
80
  ignore_missing_imports = true
82
81
  no_implicit_optional = true
83
- python_version = "3.10"
82
+ python_version = "3.11"
84
83
  show_column_numbers = true
85
84
  show_error_context = true
86
85
  strict_optional = true
@@ -105,7 +104,7 @@ xfail_strict = true
105
104
 
106
105
  [tool.ruff]
107
106
  line-length = 88
108
- target-version = "py310"
107
+ target-version = "py311"
109
108
 
110
109
  [tool.ruff.format]
111
110
  docstring-code-format = true
@@ -161,3 +160,8 @@ convention = "google"
161
160
  [tool.uv]
162
161
  # SQL edits must invalidate uv's cached editable build too.
163
162
  cache-keys = [{ file = "pyproject.toml" }, { file = "hatch_build.py" }, { file = "build_support.py" }, { file = "src/lucide/data/lucide-icons.sql" }]
163
+ # fastembed (search extra) caps pillow below 13, but every pillow before 13.0.0
164
+ # has critical advisories (GHSA-8g5g-8vmr-9782, GHSA-332p-7hrc-92wf,
165
+ # GHSA-w889-685w-c8fh). Override it for development and CI; this doesn't change
166
+ # what users install. Remove once fastembed allows pillow 13.
167
+ override-dependencies = ["pillow>=13"]
@@ -13,7 +13,7 @@ import logging
13
13
  import os
14
14
  import pathlib
15
15
  import sqlite3
16
- from datetime import datetime, timezone
16
+ from datetime import UTC, datetime
17
17
 
18
18
  from pydantic import BaseModel, field_validator
19
19
  from pydantic_ai import Agent
@@ -229,7 +229,7 @@ def save_clusters_json(
229
229
  "coords": {
230
230
  name: [round(c[0], 5), round(c[1], 5)] for name, c in data["coords"].items()
231
231
  },
232
- "generated_at": datetime.now(tz=timezone.utc).isoformat(),
232
+ "generated_at": datetime.now(tz=UTC).isoformat(),
233
233
  "naming_model": CLUSTER_NAMING_MODEL,
234
234
  }
235
235
  output_path.write_text(json.dumps(out, indent=2, ensure_ascii=False) + "\n")
@@ -26,7 +26,7 @@ import sqlite3
26
26
  import subprocess
27
27
  import threading
28
28
  import urllib.request
29
- from datetime import datetime, timezone
29
+ from datetime import UTC, datetime
30
30
  from typing import TypedDict
31
31
 
32
32
  from .config import (
@@ -444,7 +444,7 @@ def generate_descriptions( # noqa: PLR0913, PLR0915
444
444
  "lucide_version": lucide_version,
445
445
  "tags": meta["tags"],
446
446
  "categories": meta["categories"],
447
- "timestamp": datetime.now(tz=timezone.utc).isoformat(),
447
+ "timestamp": datetime.now(tz=UTC).isoformat(),
448
448
  }
449
449
  with write_lock:
450
450
  _append_jsonl(jsonl_path, record)
@@ -598,7 +598,7 @@ def _write_search_db( # noqa: PLR0913
598
598
  # Metadata
599
599
  first = records[ordered_names[0]]
600
600
  resolved_version = version or first.get("lucide_version", "unknown")
601
- now = datetime.now(tz=timezone.utc).isoformat()
601
+ now = datetime.now(tz=UTC).isoformat()
602
602
  model_dims = json.dumps({mid: EMBEDDING_MODELS[mid].dim for mid in embeddings})
603
603
  for key, value in [
604
604
  ("version", resolved_version),
@@ -6,7 +6,7 @@ This module contains default configuration values used throughout the package.
6
6
  from dataclasses import dataclass
7
7
 
8
8
  # Default Lucide tag to use when building the icon database
9
- DEFAULT_LUCIDE_TAG = "1.59.0"
9
+ DEFAULT_LUCIDE_TAG = "1.70.0"
10
10
 
11
11
  # Default size for the LRU cache used by lucide_icon function
12
12
  DEFAULT_ICON_CACHE_SIZE = 128
@@ -58,7 +58,7 @@ def _process_classes(root: ET.Element, cls: str | None, icon_name: str) -> None:
58
58
  del root.attrib["class"]
59
59
 
60
60
 
61
- def _apply_attributes( # noqa: D417
61
+ def _apply_attributes( # noqa: D417, PLR0917
62
62
  root: ET.Element,
63
63
  width: str | int | None = None,
64
64
  height: str | int | None = None,
@@ -98,7 +98,7 @@ def _apply_attributes( # noqa: D417
98
98
  root.set(svg_attr_name, str(value))
99
99
 
100
100
 
101
- def _modify_svg( # noqa: D417
101
+ def _modify_svg( # noqa: D417, PLR0917
102
102
  original_svg_content: str,
103
103
  icon_name: str,
104
104
  cls: str | None,
@@ -158,7 +158,7 @@ def _modify_svg( # noqa: D417
158
158
 
159
159
 
160
160
  @functools.lru_cache(maxsize=DEFAULT_ICON_CACHE_SIZE)
161
- def lucide_icon(
161
+ def lucide_icon( # noqa: PLR0917 -- public API; positional arguments are supported
162
162
  icon_name: str,
163
163
  cls: str = "",
164
164
  fallback_text: str | None = None,