glitchlings 0.4.5__cp312-cp312-manylinux_2_28_x86_64.whl → 0.5.1__cp312-cp312-manylinux_2_28_x86_64.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.

Potentially problematic release.


This version of glitchlings might be problematic. Click here for more details.

Files changed (38) hide show
  1. glitchlings/__init__.py +33 -0
  2. glitchlings/_zoo_rust.cpython-312-x86_64-linux-gnu.so +0 -0
  3. glitchlings/assets/ekkokin_homophones.json +1995 -0
  4. glitchlings/compat.py +98 -8
  5. glitchlings/config.py +12 -24
  6. glitchlings/dev/__init__.py +5 -0
  7. glitchlings/dev/sync_assets.py +130 -0
  8. glitchlings/dlc/pytorch_lightning.py +13 -1
  9. glitchlings/spectroll.py +5 -0
  10. glitchlings/util/stretchability.py +4 -9
  11. glitchlings/zoo/__init__.py +10 -2
  12. glitchlings/zoo/_ocr_confusions.py +3 -3
  13. glitchlings/zoo/_text_utils.py +10 -9
  14. glitchlings/zoo/adjax.py +3 -18
  15. glitchlings/zoo/apostrofae.py +2 -5
  16. glitchlings/zoo/assets/__init__.py +91 -0
  17. glitchlings/zoo/ekkokin.py +226 -0
  18. glitchlings/zoo/jargoyle.py +2 -16
  19. glitchlings/zoo/mim1c.py +2 -17
  20. glitchlings/zoo/redactyl.py +3 -17
  21. glitchlings/zoo/reduple.py +3 -17
  22. glitchlings/zoo/rushmore.py +3 -20
  23. glitchlings/zoo/scannequin.py +3 -20
  24. glitchlings/zoo/spectroll.py +159 -0
  25. glitchlings/zoo/typogre.py +2 -19
  26. glitchlings/zoo/zeedub.py +2 -13
  27. {glitchlings-0.4.5.dist-info → glitchlings-0.5.1.dist-info}/METADATA +22 -7
  28. glitchlings-0.5.1.dist-info/RECORD +57 -0
  29. glitchlings/data/__init__.py +0 -1
  30. glitchlings/zoo/_rate.py +0 -131
  31. glitchlings-0.4.5.dist-info/RECORD +0 -53
  32. /glitchlings/{zoo/assets → assets}/apostrofae_pairs.json +0 -0
  33. /glitchlings/{data → assets}/hokey_assets.json +0 -0
  34. /glitchlings/{zoo → assets}/ocr_confusions.tsv +0 -0
  35. {glitchlings-0.4.5.dist-info → glitchlings-0.5.1.dist-info}/WHEEL +0 -0
  36. {glitchlings-0.4.5.dist-info → glitchlings-0.5.1.dist-info}/entry_points.txt +0 -0
  37. {glitchlings-0.4.5.dist-info → glitchlings-0.5.1.dist-info}/licenses/LICENSE +0 -0
  38. {glitchlings-0.4.5.dist-info → glitchlings-0.5.1.dist-info}/top_level.txt +0 -0
glitchlings/__init__.py CHANGED
@@ -1,8 +1,13 @@
1
+ import sys
2
+ from importlib import import_module
3
+ from importlib import util as importlib_util
4
+
1
5
  from .config import AttackConfig, build_gaggle, load_attack_config
2
6
  from .util import SAMPLE_TEXT
3
7
  from .zoo import (
4
8
  Adjax,
5
9
  Apostrofae,
10
+ Ekkokin,
6
11
  Gaggle,
7
12
  Glitchling,
8
13
  Hokey,
@@ -12,10 +17,12 @@ from .zoo import (
12
17
  Reduple,
13
18
  Rushmore,
14
19
  Scannequin,
20
+ Spectroll,
15
21
  Typogre,
16
22
  Zeedub,
17
23
  adjax,
18
24
  apostrofae,
25
+ ekkokin,
19
26
  hokey,
20
27
  is_rust_pipeline_enabled,
21
28
  is_rust_pipeline_supported,
@@ -28,11 +35,33 @@ from .zoo import (
28
35
  reduple,
29
36
  rushmore,
30
37
  scannequin,
38
+ spectroll,
31
39
  summon,
32
40
  typogre,
33
41
  zeedub,
34
42
  )
35
43
 
44
+
45
+ def _ensure_rust_extension_alias() -> None:
46
+ """Expose the compiled Rust extension under the expected namespace."""
47
+
48
+ target_name = "glitchlings._zoo_rust"
49
+ if target_name in sys.modules:
50
+ return
51
+
52
+ if importlib_util.find_spec("_zoo_rust") is None:
53
+ return
54
+
55
+ try:
56
+ module = import_module("_zoo_rust")
57
+ except ImportError:
58
+ return
59
+ sys.modules[target_name] = module
60
+ setattr(sys.modules[__name__], "_zoo_rust", module)
61
+
62
+
63
+ _ensure_rust_extension_alias()
64
+
36
65
  __all__ = [
37
66
  "Typogre",
38
67
  "typogre",
@@ -44,6 +73,8 @@ __all__ = [
44
73
  "adjax",
45
74
  "Apostrofae",
46
75
  "apostrofae",
76
+ "Ekkokin",
77
+ "ekkokin",
47
78
  "Hokey",
48
79
  "hokey",
49
80
  "Redactyl",
@@ -52,6 +83,8 @@ __all__ = [
52
83
  "reduple",
53
84
  "Rushmore",
54
85
  "rushmore",
86
+ "Spectroll",
87
+ "spectroll",
55
88
  "Scannequin",
56
89
  "scannequin",
57
90
  "Zeedub",