-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into progress-indeterminate
- Loading branch information
Showing
58 changed files
with
575 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,7 @@ venv.bak/ | |
|
||
# mkdocs documentation | ||
/site | ||
docs/generated* | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Getting started | ||
|
||
A gallery of examples for magicgui. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Demo applications | ||
|
||
Example applications built with magicgui. |
8 changes: 8 additions & 0 deletions
8
examples/callable.py → docs/examples/applications/callable.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
examples/main_window.py → docs/examples/applications/hotdog.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""# Quantities with pint | ||
Pint is a Python package to define, operate and manipulate physical quantities: | ||
the product of a numerical value and a unit of measurement. | ||
It allows arithmetic operations between them and conversions | ||
from and to different units. | ||
https://pint.readthedocs.io/en/stable/ | ||
""" | ||
from pint import Quantity | ||
|
||
from magicgui import magicgui | ||
|
||
|
||
@magicgui | ||
def widget(q=Quantity("1 ms")): | ||
"""Widget allowing users to input quantity measurements.""" | ||
print(q) | ||
|
||
|
||
widget.show(run=True) |
5 changes: 4 additions & 1 deletion
5
examples/snells_law.py → docs/examples/applications/snells_law.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""# Input values dialog | ||
A basic example of a user input dialog. | ||
This will pause code execution until the user responds. | ||
# ![Values input dialog](../../images/values_input.png){ width=50% } | ||
```python linenums="1" | ||
from magicgui.widgets import request_values | ||
vals = request_values( | ||
age=int, | ||
name={"annotation": str, "label": "Enter your name:"}, | ||
title="Hi, who are you?", | ||
) | ||
print(repr(vals)) | ||
``` | ||
""" | ||
|
||
# %% |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Demo widget types | ||
|
||
Example gallery demonstrating the available widget types in magicgui. |
5 changes: 5 additions & 0 deletions
5
examples/change_label.py → docs/examples/demo_widgets/change_label.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.