Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Sep 26, 2024
1 parent e2a8b21 commit b671969
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: Replace media paths in README.md
run: sed -E 's#(\]\((docs/asset/[a-zA-Z0-9._-]+))#](https://github.com/CZ-NIC/mininterface/blob/main/\2?raw=True#g' README.md | less > README.md.tmp && mv README.md.tmp README.md
run: sed -E 's#(\]\((asset/[a-zA-Z0-9._-]+))#](https://github.com/CZ-NIC/mininterface/blob/main/\2?raw=True#g' README.md | less > README.md.tmp && mv README.md.tmp README.md
- name: Build the package
run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
Expand Down
9 changes: 7 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ if __name__ == "__main__":
## You got CLI
It was all the code you need. No lengthy blocks of code imposed by an external dependency. Besides the GUI/TUI, you receive powerful YAML-configurable CLI parsing.

TODO regenerate output and all the images
TODO it seems that input missing dataclass fields is broken, it just shows it must be set via cli

```bash
$ ./hello.py
Expand Down Expand Up @@ -277,6 +275,13 @@ m.form(my_dictionary)













Expand Down
8 changes: 5 additions & 3 deletions mininterface/mininterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ def form(self, form: FormDictOrEnv | None = None, title: str = "") -> FormDictOr
title: Optional form title
Returns:
dict or dataclass:
dataclass:
If the `form` is null, the output is [`self.env`][mininterface.Mininterface.env].
dict:
If the `form` is a dict, the output is another dict.
Whereas the original form stays intact (with the values update),
Whereas the original dict stays intact (with the values updated),
we return a new raw dict with all values resolved
(all [`Tag`][mininterface.Tag] objects are resolved to their value).
Expand All @@ -215,6 +216,7 @@ def form(self, form: FormDictOrEnv | None = None, title: str = "") -> FormDictOr
print(output["my label"]) # False
```
---
Why this behaviour? You need to do some validation, hence you put
`Tag` objects in the input dict. Then, you just need to work with the values.
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "mininterface"
version = "0.6.0"
version = "0.6.1"
description = "A minimal access to GUI, TUI, CLI and config"
authors = ["Edvard Rejthar <[email protected]>"]
license = "GPL-3.0-or-later"
Expand All @@ -15,7 +15,6 @@ readme = "README.md"
python = "^3.10"
tyro = "*"
pyyaml = "*"
envelope = "*"
requests = "*"
textual = "*"
tkinter-tooltip = "*"
Expand Down

0 comments on commit b671969

Please sign in to comment.