iterlab 2.0.0__tar.gz → 2.0.1__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 (121) hide show
  1. {iterlab-2.0.0 → iterlab-2.0.1}/CHANGELOG.md +19 -0
  2. {iterlab-2.0.0 → iterlab-2.0.1}/GUIDE.md +4 -0
  3. {iterlab-2.0.0 → iterlab-2.0.1}/PKG-INFO +5 -1
  4. {iterlab-2.0.0 → iterlab-2.0.1}/README.md +4 -0
  5. iterlab-2.0.1/docs/intro.gif +0 -0
  6. {iterlab-2.0.0 → iterlab-2.0.1}/examples/showcase_layout.py +94 -94
  7. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/__init__.py +1 -1
  8. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/codegen/templates.py +9 -6
  9. {iterlab-2.0.0 → iterlab-2.0.1}/.gitignore +0 -0
  10. {iterlab-2.0.0 → iterlab-2.0.1}/LICENSE +0 -0
  11. {iterlab-2.0.0 → iterlab-2.0.1}/NOTICE +0 -0
  12. {iterlab-2.0.0 → iterlab-2.0.1}/VERIFICATION.md +0 -0
  13. {iterlab-2.0.0 → iterlab-2.0.1}/docs/iterlab.jpg +0 -0
  14. {iterlab-2.0.0 → iterlab-2.0.1}/docs/logo.png +0 -0
  15. {iterlab-2.0.0 → iterlab-2.0.1}/examples/showcase.py +0 -0
  16. {iterlab-2.0.0 → iterlab-2.0.1}/pyproject.toml +0 -0
  17. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/app.py +0 -0
  18. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/assets/iterlab.ico +0 -0
  19. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/assets/iterlab.png +0 -0
  20. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/cli.py +0 -0
  21. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/codegen/__init__.py +0 -0
  22. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/codegen/inject.py +0 -0
  23. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/codegen/rename.py +0 -0
  24. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/errors.py +0 -0
  25. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/interface.py +0 -0
  26. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/layout/__init__.py +0 -0
  27. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/layout/schema.py +0 -0
  28. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/layout/store.py +0 -0
  29. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/py.typed +0 -0
  30. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/__init__.py +0 -0
  31. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/dispatch.py +0 -0
  32. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/environment.py +0 -0
  33. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/faults.py +0 -0
  34. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/loader.py +0 -0
  35. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/remembered.py +0 -0
  36. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/runtime/startupcheck.py +0 -0
  37. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/types.py +0 -0
  38. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/__init__.py +0 -0
  39. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/app.py +0 -0
  40. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/designer.py +0 -0
  41. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/dialogs.py +0 -0
  42. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/elements.py +0 -0
  43. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/faultbanner.py +0 -0
  44. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/icon.py +0 -0
  45. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/modetoggle.py +0 -0
  46. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/palette.py +0 -0
  47. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/properties.py +0 -0
  48. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/runner.py +0 -0
  49. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/screenshot.py +0 -0
  50. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/scroll.py +0 -0
  51. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/session.py +0 -0
  52. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/startupnotice.py +0 -0
  53. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/theme.py +0 -0
  54. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/ui/tooltip.py +0 -0
  55. {iterlab-2.0.0 → iterlab-2.0.1}/src/iterlab/versionguard.py +0 -0
  56. {iterlab-2.0.0 → iterlab-2.0.1}/tests/conftest.py +0 -0
  57. {iterlab-2.0.0 → iterlab-2.0.1}/tests/contract/test_layout_schema.py +0 -0
  58. {iterlab-2.0.0 → iterlab-2.0.1}/tests/contract/test_public_api.py +0 -0
  59. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_additive.py +0 -0
  60. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_create_and_run.py +0 -0
  61. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_layout_file.py +0 -0
  62. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_never_dies.py +0 -0
  63. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_reload.py +0 -0
  64. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_rename.py +0 -0
  65. {iterlab-2.0.0 → iterlab-2.0.1}/tests/integration/test_stub_annotations.py +0 -0
  66. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/_helpers.py +0 -0
  67. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/conftest.py +0 -0
  68. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_arming.py +0 -0
  69. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_axes_is_a_real_axes.py +0 -0
  70. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_box_stubs.py +0 -0
  71. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_default_window_size.py +0 -0
  72. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_direct_manipulation.py +0 -0
  73. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_empty_text.py +0 -0
  74. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_fault_banner.py +0 -0
  75. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_icon.py +0 -0
  76. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_input_elements.py +0 -0
  77. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_label_appearance.py +0 -0
  78. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_look.py +0 -0
  79. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_mode_toggle.py +0 -0
  80. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_mouse_buttons.py +0 -0
  81. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_perf.py +0 -0
  82. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_plot_events.py +0 -0
  83. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_presentation_survives.py +0 -0
  84. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_properties_drawer.py +0 -0
  85. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_properties_editing.py +0 -0
  86. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_properties_panel.py +0 -0
  87. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_property_commit.py +0 -0
  88. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_resize.py +0 -0
  89. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_restart_app.py +0 -0
  90. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_screenshot.py +0 -0
  91. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_selectors.py +0 -0
  92. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_showcase_example.py +0 -0
  93. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_startup_notice.py +0 -0
  94. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_style_editing.py +0 -0
  95. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_switch_cost.py +0 -0
  96. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_tag_tooltip.py +0 -0
  97. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_toolbar.py +0 -0
  98. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_toolbar_collapse.py +0 -0
  99. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_verify_tool.py +0 -0
  100. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_window_launch.py +0 -0
  101. {iterlab-2.0.0 → iterlab-2.0.1}/tests/ui/test_window_size_memory.py +0 -0
  102. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_atomic_write.py +0 -0
  103. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_cli.py +0 -0
  104. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_environment.py +0 -0
  105. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_faults.py +0 -0
  106. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_import_boundary.py +0 -0
  107. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_label_type.py +0 -0
  108. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_preflight_gate.py +0 -0
  109. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_remembered.py +0 -0
  110. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_runnable_file.py +0 -0
  111. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_schema.py +0 -0
  112. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_start_mode.py +0 -0
  113. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_startupcheck.py +0 -0
  114. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_style.py +0 -0
  115. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_templates.py +0 -0
  116. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_typing_surface.py +0 -0
  117. {iterlab-2.0.0 → iterlab-2.0.1}/tests/unit/test_versionguard.py +0 -0
  118. {iterlab-2.0.0 → iterlab-2.0.1}/tools/check_readme_links.py +0 -0
  119. {iterlab-2.0.0 → iterlab-2.0.1}/tools/make_icon.py +0 -0
  120. {iterlab-2.0.0 → iterlab-2.0.1}/tools/preflight.py +0 -0
  121. {iterlab-2.0.0 → iterlab-2.0.1}/tools/verify.py +0 -0
@@ -6,6 +6,25 @@ section, where the public surface is larger than the Python API: the layout
6
6
  schema, the handler naming convention, the `ev` contract, the generated stub
7
7
  shape, and the command are all consumed directly by researcher-written code.
8
8
 
9
+ ## [2.0.1] — 2026-09-14
10
+
11
+ ### Changed
12
+
13
+ - **A new code file separates what you never edit from what you do.** The
14
+ `TYPE_CHECKING` import that lets your editor complete `ev.` now sits at the
15
+ very top, inside a frame of `#` characters that says it is boilerplate you
16
+ do not need to touch, followed by what it is for. Your own imports start
17
+ below the frame, so the section you will add to is no longer interleaved
18
+ with the one you can ignore.
19
+
20
+ The docstring also loses its line about the top-left toggle: it describes
21
+ the window, not the code.
22
+
23
+ Checked with pycodestyle, which PyCharm's PEP 8 inspection uses, and with
24
+ ruff: neither flags the imports below the frame as not being at the top of
25
+ the file. Only new files are affected; iterlab never rewrites a file you
26
+ already have.
27
+
9
28
  ## [2.0.0] — 2026-09-14
10
29
 
11
30
  ### Changed
@@ -12,6 +12,10 @@ iterlab makes the two halves feed each other. Drag a box onto the canvas and it
12
12
  can turn; rewrite a function and the open window uses the new code. **No restart, nothing reloaded,
13
13
  nothing recomputed that you did not ask for.**
14
14
 
15
+ **Prefer to watch first?** There is an introduction and tutorial video:
16
+
17
+ <a href="https://www.youtube.com/watch?v=G_HzmkInHAs"><img src="docs/intro.gif" width="50%" alt="iterlab introduction and tutorial - click to watch on YouTube"></a>
18
+
15
19
  > This guide grows with the tool. It documents what works **today**, in the version named at the
16
20
  > bottom. If something here does not behave as described, that is a bug — please say so.
17
21
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: iterlab
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: The GUI as a development environment for algorithms - draw the interface, iterate on the code without restarting
5
5
  Project-URL: Homepage, https://github.com/alonhzn/iterlab
6
6
  Project-URL: Documentation, https://github.com/alonhzn/iterlab/blob/main/GUIDE.md
@@ -257,6 +257,10 @@ loaded, your plots stay drawn, and you carry on from exactly where you were.
257
257
  - **No need to re-run the script when you change code!** Yes you heard correctly, change your algorithm, add axis labels, no need to re-run the app, no need to reload from scratch! Save hours and hours without losing anything already in memory — loaded data, computed results, and plots already drawn all survive.
258
258
  - **Made a bug? Just fix it without re-running heavy code.** Code bugs and typos are part of life, that doesn’t mean you should waste time re-running heavy code. Everything survives and stays in memory until you fix the code and continue from where you left off. Restarting is the cost the tool exists to remove.
259
259
 
260
+ **Watch the introduction and tutorial:**
261
+
262
+ <a href="https://www.youtube.com/watch?v=G_HzmkInHAs"><img src="https://raw.githubusercontent.com/alonhzn/iterlab/main/docs/intro.gif" width="50%" alt="iterlab introduction and tutorial - click to watch on YouTube"></a>
263
+
260
264
 
261
265
  ## Usage
262
266
 
@@ -23,6 +23,10 @@ loaded, your plots stay drawn, and you carry on from exactly where you were.
23
23
  - **No need to re-run the script when you change code!** Yes you heard correctly, change your algorithm, add axis labels, no need to re-run the app, no need to reload from scratch! Save hours and hours without losing anything already in memory — loaded data, computed results, and plots already drawn all survive.
24
24
  - **Made a bug? Just fix it without re-running heavy code.** Code bugs and typos are part of life, that doesn’t mean you should waste time re-running heavy code. Everything survives and stays in memory until you fix the code and continue from where you left off. Restarting is the cost the tool exists to remove.
25
25
 
26
+ **Watch the introduction and tutorial:**
27
+
28
+ <a href="https://www.youtube.com/watch?v=G_HzmkInHAs"><img src="https://raw.githubusercontent.com/alonhzn/iterlab/main/docs/intro.gif" width="50%" alt="iterlab introduction and tutorial - click to watch on YouTube"></a>
29
+
26
30
 
27
31
  ## Usage
28
32
 
Binary file
@@ -1,94 +1,94 @@
1
- """Written by iterlab. Rewritten whenever you change the interface.
2
-
3
- This is your interface: what you drew, and the class that lets your editor
4
- complete `ev.` inside a handler.
5
-
6
- iterlab reads this file without importing it - the layout below is lifted out
7
- and evaluated as literals - so every value in it has to be written out rather
8
- than computed.
9
- """
10
-
11
- from typing import TYPE_CHECKING
12
-
13
- if TYPE_CHECKING:
14
- from iterlab.types import Axes, Button, Label, NumberBox, TextBox
15
-
16
- LAYOUT = {
17
- 'schema_version': 8,
18
- 'iterlab_version': '2.0.0',
19
- 'window': {'width': 1120, 'height': 700},
20
- 'toolbar_collapsed': False,
21
- 'elements': {
22
- 'lbl_title': {
23
- 'type': 'label',
24
- 'position': [0.03, 0.93, 0.55, 0.05],
25
- 'label': 'Signal explorer',
26
- 'style': {'font_size': 15, 'bold': True, 'align': 'left'},
27
- },
28
- 'lbl_status': {
29
- 'type': 'label',
30
- 'position': [0.6, 0.93, 0.37, 0.05],
31
- 'label': '',
32
- 'style': {'text_color': '#5c6470', 'align': 'right'},
33
- },
34
- 'ax_waves': {'type': 'axes', 'position': [0.03, 0.52, 0.6, 0.39]},
35
- 'ax_scatter': {'type': 'axes', 'position': [0.66, 0.52, 0.31, 0.39]},
36
- 'ax_bars': {'type': 'axes', 'position': [0.03, 0.15, 0.6, 0.33]},
37
- 'lbl_freq': {
38
- 'type': 'label',
39
- 'position': [0.66, 0.44, 0.31, 0.04],
40
- 'label': 'Frequencies (Hz)',
41
- 'style': {'align': 'left'},
42
- },
43
- 'edt_freq': {'type': 'text_box', 'position': [0.66, 0.38, 0.31, 0.05], 'label': '1, 2.5, 4'},
44
- 'lbl_points': {
45
- 'type': 'label',
46
- 'position': [0.66, 0.31, 0.14, 0.04],
47
- 'label': 'Samples',
48
- 'style': {'align': 'left'},
49
- },
50
- 'val_points': {'type': 'number_box', 'position': [0.81, 0.31, 0.16, 0.05], 'label': '240'},
51
- 'lbl_noise': {
52
- 'type': 'label',
53
- 'position': [0.66, 0.24, 0.14, 0.04],
54
- 'label': 'Noise',
55
- 'style': {'align': 'left'},
56
- },
57
- 'val_noise': {'type': 'number_box', 'position': [0.81, 0.24, 0.16, 0.05], 'label': '0.25'},
58
- 'cmd_redraw': {'type': 'button', 'position': [0.66, 0.15, 0.15, 0.06], 'label': 'Redraw'},
59
- 'cmd_shuffle': {'type': 'button', 'position': [0.82, 0.15, 0.15, 0.06], 'label': 'Shuffle'},
60
- 'cmd_reset': {'type': 'button', 'position': [0.03, 0.05, 0.14, 0.06], 'label': 'Reset'},
61
- 'lbl_hint': {
62
- 'type': 'label',
63
- 'position': [0.2, 0.05, 0.77, 0.05],
64
- 'label': 'Edit showcase.py and click Redraw - the data stays loaded',
65
- 'style': {'text_color': '#5c6470', 'align': 'left'},
66
- },
67
- },
68
- }
69
-
70
-
71
- class Ev:
72
- """Your interface, as your editor sees it."""
73
-
74
- lbl_title: "Label"
75
- lbl_status: "Label"
76
- ax_waves: "Axes"
77
- ax_scatter: "Axes"
78
- ax_bars: "Axes"
79
- lbl_freq: "Label"
80
- edt_freq: "TextBox"
81
- lbl_points: "Label"
82
- val_points: "NumberBox"
83
- lbl_noise: "Label"
84
- val_noise: "NumberBox"
85
- cmd_redraw: "Button"
86
- cmd_shuffle: "Button"
87
- cmd_reset: "Button"
88
- lbl_hint: "Label"
89
-
90
- # `ev` is yours to fill as well: these keep your own attributes from reading
91
- # as errors, while the elements above keep their types.
92
- def __getattr__(self, name: str): ...
93
-
94
- def __setattr__(self, name: str, value) -> None: ...
1
+ """Written by iterlab. Rewritten whenever you change the interface.
2
+
3
+ This is your interface: what you drew, and the class that lets your editor
4
+ complete `ev.` inside a handler.
5
+
6
+ iterlab reads this file without importing it - the layout below is lifted out
7
+ and evaluated as literals - so every value in it has to be written out rather
8
+ than computed.
9
+ """
10
+
11
+ from typing import TYPE_CHECKING
12
+
13
+ if TYPE_CHECKING:
14
+ from iterlab.types import Axes, Button, Label, NumberBox, TextBox
15
+
16
+ LAYOUT = {
17
+ 'schema_version': 8,
18
+ 'iterlab_version': '2.0.1',
19
+ 'window': {'width': 1120, 'height': 700},
20
+ 'toolbar_collapsed': False,
21
+ 'elements': {
22
+ 'lbl_title': {
23
+ 'type': 'label',
24
+ 'position': [0.03, 0.93, 0.55, 0.05],
25
+ 'label': 'Signal explorer',
26
+ 'style': {'font_size': 15, 'bold': True, 'align': 'left'},
27
+ },
28
+ 'lbl_status': {
29
+ 'type': 'label',
30
+ 'position': [0.6, 0.93, 0.37, 0.05],
31
+ 'label': '',
32
+ 'style': {'text_color': '#5c6470', 'align': 'right'},
33
+ },
34
+ 'ax_waves': {'type': 'axes', 'position': [0.03, 0.52, 0.6, 0.39]},
35
+ 'ax_scatter': {'type': 'axes', 'position': [0.66, 0.52, 0.31, 0.39]},
36
+ 'ax_bars': {'type': 'axes', 'position': [0.03, 0.15, 0.6, 0.33]},
37
+ 'lbl_freq': {
38
+ 'type': 'label',
39
+ 'position': [0.66, 0.44, 0.31, 0.04],
40
+ 'label': 'Frequencies (Hz)',
41
+ 'style': {'align': 'left'},
42
+ },
43
+ 'edt_freq': {'type': 'text_box', 'position': [0.66, 0.38, 0.31, 0.05], 'label': '1, 2.5, 4'},
44
+ 'lbl_points': {
45
+ 'type': 'label',
46
+ 'position': [0.66, 0.31, 0.14, 0.04],
47
+ 'label': 'Samples',
48
+ 'style': {'align': 'left'},
49
+ },
50
+ 'val_points': {'type': 'number_box', 'position': [0.81, 0.31, 0.16, 0.05], 'label': '240'},
51
+ 'lbl_noise': {
52
+ 'type': 'label',
53
+ 'position': [0.66, 0.24, 0.14, 0.04],
54
+ 'label': 'Noise',
55
+ 'style': {'align': 'left'},
56
+ },
57
+ 'val_noise': {'type': 'number_box', 'position': [0.81, 0.24, 0.16, 0.05], 'label': '0.25'},
58
+ 'cmd_redraw': {'type': 'button', 'position': [0.66, 0.15, 0.15, 0.06], 'label': 'Redraw'},
59
+ 'cmd_shuffle': {'type': 'button', 'position': [0.82, 0.15, 0.15, 0.06], 'label': 'Shuffle'},
60
+ 'cmd_reset': {'type': 'button', 'position': [0.03, 0.05, 0.14, 0.06], 'label': 'Reset'},
61
+ 'lbl_hint': {
62
+ 'type': 'label',
63
+ 'position': [0.2, 0.05, 0.77, 0.05],
64
+ 'label': 'Edit showcase.py and click Redraw - the data stays loaded',
65
+ 'style': {'text_color': '#5c6470', 'align': 'left'},
66
+ },
67
+ },
68
+ }
69
+
70
+
71
+ class Ev:
72
+ """Your interface, as your editor sees it."""
73
+
74
+ lbl_title: "Label"
75
+ lbl_status: "Label"
76
+ ax_waves: "Axes"
77
+ ax_scatter: "Axes"
78
+ ax_bars: "Axes"
79
+ lbl_freq: "Label"
80
+ edt_freq: "TextBox"
81
+ lbl_points: "Label"
82
+ val_points: "NumberBox"
83
+ lbl_noise: "Label"
84
+ val_noise: "NumberBox"
85
+ cmd_redraw: "Button"
86
+ cmd_shuffle: "Button"
87
+ cmd_reset: "Button"
88
+ lbl_hint: "Label"
89
+
90
+ # `ev` is yours to fill as well: these keep your own attributes from reading
91
+ # as errors, while the elements above keep their types.
92
+ def __getattr__(self, name: str): ...
93
+
94
+ def __setattr__(self, name: str, value) -> None: ...
@@ -11,7 +11,7 @@ from .app import open_interface as _open_interface
11
11
 
12
12
  #: Single source of truth for the version. `pyproject.toml` reads it from here,
13
13
  #: so the two can never disagree.
14
- __version__ = "2.0.0"
14
+ __version__ = "2.0.1"
15
15
 
16
16
  __all__ = ["run", "__version__"]
17
17
 
@@ -15,18 +15,21 @@ from pathlib import Path
15
15
  STARTER_FILE = '''"""{name} — an iterlab interface.
16
16
 
17
17
  Open it: iterlab {name}
18
- Switch between editing and using it with the toggle in the top-left corner.
19
18
  """
20
19
 
20
+ ###############################################################################
21
+ # Boilerplate - you don't need to touch this.
22
+ #
23
+ # Only your editor reads this - it never runs, and costs nothing at launch.
24
+ # It is what makes `ev.` complete to the elements you drew, with matplotlib's
25
+ # own signatures on a plot. Delete it and everything still works.
21
26
  from typing import TYPE_CHECKING
22
27
 
23
- import numpy as np
24
-
25
28
  if TYPE_CHECKING:
26
- # Only your editor reads this - it never runs, and costs nothing at launch.
27
- # It is what makes `ev.` complete to the elements you drew, with matplotlib's
28
- # own signatures on a plot. Delete it and everything still works.
29
29
  from {name}_layout import Ev
30
+ ###############################################################################
31
+
32
+ import numpy as np
30
33
 
31
34
 
32
35
  def on_startup(ev: "Ev"):
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