Skip to content

Commit 67f6f58

Browse files
committed
rel 2024.3
1 parent a8694e8 commit 67f6f58

File tree

14 files changed

+338
-158
lines changed

14 files changed

+338
-158
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6+
## 2024.3 - 2024/10/05
7+
8+
- Code improvements
9+
610
## 2024.2 - 2024/10/04
711

812
- Add `freesimplegui`

documentation/reference/cli2gui/application/application.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Establish the main entry point.
2222
#### Signature
2323

2424
```python
25-
def run(buildSpec: types.FullBuildSpec) -> None: ...
25+
def run(buildSpec: types.FullBuildSpec) -> Any: ...
2626
```

documentation/reference/cli2gui/application/application2args.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
- [docoptFormat](#docoptformat)
1212
- [getoptFormat](#getoptformat)
1313
- [optparseFormat](#optparseformat)
14+
- [processValue](#processvalue)
1415

1516
## argFormat
1617

17-
[Show source in application2args.py:59](../../../../cli2gui/application/application2args.py#L59)
18+
[Show source in application2args.py:86](../../../../cli2gui/application/application2args.py#L86)
1819

1920
Format the args for the desired parser.
2021

@@ -39,7 +40,7 @@ def argFormat(values: dict[str, Any], argumentParser: str | ParserType) -> Any:
3940

4041
## argparseFormat
4142

42-
[Show source in application2args.py:11](../../../../cli2gui/application/application2args.py#L11)
43+
[Show source in application2args.py:41](../../../../cli2gui/application/application2args.py#L41)
4344

4445
Format args for argparse.
4546

@@ -53,7 +54,7 @@ def argparseFormat(values: dict[str, Any]) -> argparse.Namespace: ...
5354

5455
## clickFormat
5556

56-
[Show source in application2args.py:49](../../../../cli2gui/application/application2args.py#L49)
57+
[Show source in application2args.py:75](../../../../cli2gui/application/application2args.py#L75)
5758

5859
Format args for click.
5960

@@ -67,7 +68,7 @@ def clickFormat(values: dict[str, Any]) -> list[Any]: ...
6768

6869
## docoptFormat
6970

70-
[Show source in application2args.py:39](../../../../cli2gui/application/application2args.py#L39)
71+
[Show source in application2args.py:64](../../../../cli2gui/application/application2args.py#L64)
7172

7273
Format args for docopt.
7374

@@ -81,7 +82,7 @@ def docoptFormat(values: dict[str, Any]) -> dict[str, Any]: ...
8182

8283
## getoptFormat
8384

84-
[Show source in application2args.py:34](../../../../cli2gui/application/application2args.py#L34)
85+
[Show source in application2args.py:59](../../../../cli2gui/application/application2args.py#L59)
8586

8687
Format args for getopt.
8788

@@ -95,12 +96,24 @@ def getoptFormat(values: dict[str, Any]) -> tuple[list[Any], list[Any]]: ...
9596

9697
## optparseFormat
9798

98-
[Show source in application2args.py:26](../../../../cli2gui/application/application2args.py#L26)
99+
[Show source in application2args.py:50](../../../../cli2gui/application/application2args.py#L50)
99100

100101
Format args for optparse.
101102

102103
#### Signature
103104

104105
```python
105-
def optparseFormat(values: dict[str, Any]) -> dict[str, Any]: ...
106+
def optparseFormat(values: dict[str, Any]) -> tuple[optparse.Values, list[str]]: ...
107+
```
108+
109+
110+
111+
## processValue
112+
113+
[Show source in application2args.py:13](../../../../cli2gui/application/application2args.py#L13)
114+
115+
#### Signature
116+
117+
```python
118+
def processValue(key: str, value: str) -> tuple[str, Any]: ...
106119
```

documentation/reference/cli2gui/decorators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## Cli2Gui
1313

14-
[Show source in decorators.py:168](../../../cli2gui/decorators.py#L168)
14+
[Show source in decorators.py:172](../../../cli2gui/decorators.py#L172)
1515

1616
Use this decorator in the function containing the argument parser.
1717
Serialises data to JSON and launches the Cli2Gui application.
@@ -73,7 +73,7 @@ def Cli2Gui(
7373

7474
## Click2Gui
7575

76-
[Show source in decorators.py:105](../../../cli2gui/decorators.py#L105)
76+
[Show source in decorators.py:109](../../../cli2gui/decorators.py#L109)
7777

7878
Use this decorator in the function containing the argument parser.
7979
Serializes data to JSON and launches the Cli2Gui application.

documentation/reference/cli2gui/gui/abstract_gui.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ Abstract base class for GUI wrappers.
1818

1919
```python
2020
class AbstractGUI(ABC):
21+
@abstractmethod
2122
def __init__(self) -> None: ...
2223
```
2324

2425
### AbstractGUI().main
2526

26-
[Show source in abstract_gui.py:14](../../../../cli2gui/gui/abstract_gui.py#L14)
27+
[Show source in abstract_gui.py:15](../../../../cli2gui/gui/abstract_gui.py#L15)
2728

2829
Abstract method for the main function.
2930

documentation/reference/cli2gui/gui/dearpygui_wrapper.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,53 @@ class DearPyGuiWrapper(AbstractGUI):
3131

3232
### DearPyGuiWrapper().addItemsAndGroups
3333

34-
[Show source in dearpygui_wrapper.py:86](../../../../cli2gui/gui/dearpygui_wrapper.py#L86)
34+
[Show source in dearpygui_wrapper.py:104](../../../../cli2gui/gui/dearpygui_wrapper.py#L104)
3535

3636
Items and groups and return a list of these so we can get values from the dpg widgets.
3737

38-
:param types.Group section: section with a name to display and items
38+
#### Arguments
39+
40+
- `section` *Group* - section with a name to display and items
3941

4042
#### Returns
4143

42-
Type: *list[types.Item]*
44+
Type: *list[Item]*
4345
flattened list of items
4446

4547
#### Signature
4648

4749
```python
48-
def addItemsAndGroups(self, section: types.Group) -> list[types.Item]: ...
50+
def addItemsAndGroups(self, section: Group) -> list[Item]: ...
4951
```
5052

53+
#### See also
54+
55+
- [Group](../types.md#group)
56+
- [Item](../types.md#item)
57+
5158
### DearPyGuiWrapper().addWidgetFromItem
5259

53-
[Show source in dearpygui_wrapper.py:70](../../../../cli2gui/gui/dearpygui_wrapper.py#L70)
60+
[Show source in dearpygui_wrapper.py:83](../../../../cli2gui/gui/dearpygui_wrapper.py#L83)
5461

5562
Select a widget based on the item type.
5663

57-
:param types.Item item: the item
64+
#### Arguments
65+
66+
- `item` *Item* - the item
5867

5968
#### Signature
6069

6170
```python
62-
def addWidgetFromItem(self, item: types.Item) -> None: ...
71+
def addWidgetFromItem(self, item: Item) -> None: ...
6372
```
6473

74+
#### See also
75+
76+
- [Item](../types.md#item)
77+
6578
### DearPyGuiWrapper().main
6679

67-
[Show source in dearpygui_wrapper.py:130](../../../../cli2gui/gui/dearpygui_wrapper.py#L130)
80+
[Show source in dearpygui_wrapper.py:148](../../../../cli2gui/gui/dearpygui_wrapper.py#L148)
6881

6982
Run the gui (dpg) with a given buildSpec, quit_callback, and run_callback.
7083

@@ -73,7 +86,9 @@ Run the gui (dpg) with a given buildSpec, quit_callback, and run_callback.
7386
- Create Window, set up Menu and Widgets
7487
- Then, start dpg
7588

76-
:param types.FullBuildSpec buildSpec: Full cli parse/ build spec
89+
#### Arguments
90+
91+
- `buildSpec` *FullBuildSpec* - Full cli parse/ build spec
7792
:param Callable[[], None] quit_callback: generic callable used to quit
7893
:param Callable[[dict[str, Any]], None] run_callback: generic callable used to run
7994

@@ -82,15 +97,19 @@ Run the gui (dpg) with a given buildSpec, quit_callback, and run_callback.
8297
```python
8398
def main(
8499
self,
85-
buildSpec: types.FullBuildSpec,
100+
buildSpec: FullBuildSpec,
86101
quit_callback: Callable[[], None],
87102
run_callback: Callable[[dict[str, Any]], None],
88103
) -> None: ...
89104
```
90105

106+
#### See also
107+
108+
- [FullBuildSpec](../types.md#fullbuildspec)
109+
91110
### DearPyGuiWrapper().open_menu_item
92111

93-
[Show source in dearpygui_wrapper.py:116](../../../../cli2gui/gui/dearpygui_wrapper.py#L116)
112+
[Show source in dearpygui_wrapper.py:134](../../../../cli2gui/gui/dearpygui_wrapper.py#L134)
94113

95114
Open a menu item.
96115

0 commit comments

Comments
 (0)