Skip to content

Commit bf3dc47

Browse files
refactor (flet): revert to current flet
2 parents 3dd3a47 + 5a2138a commit bf3dc47

File tree

16 files changed

+82117
-3167
lines changed

16 files changed

+82117
-3167
lines changed

.editorconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ root = true
66
# Unix-style newlines and whitespace cleanup
77
[*]
88
end_of_line = lf
9-
insert_final_newline = true
109
trim_trailing_whitespace = true
1110
insert_final_newline = true
1211

@@ -15,7 +14,7 @@ insert_final_newline = true
1514
trim_trailing_whitespace = false
1615

1716
# general formatting
18-
[*.{bash,go,sh,zsh,justfile,Makefile}]
17+
[*.{bash,go,sh,zsh,justfile,Earthfile,Makefile}]
1918
indent_style = tab
2019
indent_size = 4
2120

@@ -29,6 +28,6 @@ indent_style = space
2928
indent_size = 4
3029

3130
# webdev et al
32-
[*.{html,xml,js,css,json,gql,lua,tf,tfvars,yml,yaml}]
31+
[*.{html,xml,js,ts,mjs,css,json,jsonc,gql,lua,tf,tfvars,yml,yaml}]
3332
indent_style = space
3433
indent_size = 2

.markdownlint.jsonc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md
3+
"default": true,
4+
// Trailing spaces
5+
"MD009": false,
6+
// Line length (default: 80)
7+
"MD013": false,
8+
// Duplicate headings (e.g., nested headings)
9+
"MD024": false,
10+
// Ordered list item prefix
11+
"MD029": {
12+
"style": "ordered"
13+
},
14+
// Fenced code blocks should be surrounded by blank lines
15+
"MD031": false,
16+
// Empahsis as heading (e.g., table of contents)
17+
"MD036": false
18+
}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.9.2
5+
rev: v0.11.9
66
hooks:
77
- id: ruff
88
args: [--fix, --exit-non-zero-on-fix]

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
python 3.11.11
2-
poetry 1.8.5
1+
python 3.12.10
2+
uv 0.7.3

.vscode/extensions.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,16 @@
33
"aaron-bond.better-comments",
44
"charliermarsh.ruff",
55
"codezombiech.gitignore",
6+
"DavidAnson.vscode-markdownlint",
67
"eamodio.gitlens",
78
"EditorConfig.EditorConfig",
8-
"foxundermoon.shell-format",
9-
"GitHub.copilot-chat",
10-
"GitHub.copilot",
119
"jetpack-io.devbox",
12-
"mads-hartmann.bash-ide-vscode",
1310
"mechatroner.rainbow-csv",
1411
"ms-azuretools.vscode-docker",
15-
"ms-kubernetes-tools.vscode-kubernetes-tools",
1612
"ms-python.python",
1713
"ms-vscode.atom-keybindings",
18-
"ms-vsliveshare.vsliveshare",
19-
"redhat.ansible",
2014
"redhat.vscode-yaml",
2115
"ryu1kn.partial-diff",
22-
"timonwong.shellcheck",
2316
"yzhang.markdown-all-in-one"
2417
]
2518
}

.vscode/launch.json

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,33 @@
2323
// "args": ["-f", "menubar.dmg"],
2424
// "args": ["-h"],
2525
},
26+
{
27+
"name": "Python: Django",
28+
"type": "debugpy",
29+
"request": "launch",
30+
"program": "${workspaceFolder}/manage.py",
31+
"console": "integratedTerminal",
32+
"args": [
33+
"runserver"
34+
],
35+
"django": true,
36+
"justMyCode": true
37+
},
38+
{
39+
"name": "Python: Flask",
40+
"type": "debugpy",
41+
"request": "launch",
42+
"program": "${workspaceFolder}/.venv/bin/flask",
43+
"console": "integratedTerminal",
44+
"args": [
45+
"run",
46+
"--host",
47+
"0.0.0.0",
48+
"--port",
49+
"8000"
50+
],
51+
"justMyCode": true
52+
},
2653
{
2754
"name": "Python: Flet",
2855
"type": "debugpy",
@@ -31,8 +58,8 @@
3158
"console": "integratedTerminal",
3259
"args": [
3360
"run",
34-
"main.py"
35-
// "-d"
61+
"main.py",
62+
"-d"
3663
],
3764
"env": {
3865
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
@@ -49,5 +76,17 @@
4976
],
5077
"console": "integratedTerminal"
5178
},
79+
{
80+
"name": "Node: Current File",
81+
"type": "node",
82+
"request": "launch",
83+
"program": "${file}",
84+
"console": "integratedTerminal",
85+
"skipFiles": [
86+
"<node_internals>/**"
87+
],
88+
// "runtimeExecutable": "${env:HOME}/.n/bin/node"
89+
}
5290
],
91+
"ansible.python.interpreterPath": "${workspaceFolder}/.venv/bin/python"
5392
}

.vscode/settings.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,15 @@
1515
// https://github.com/astral-sh/ruff-vscode
1616
"python.analysis.ignore": [
1717
"*"
18-
]
18+
],
19+
"[markdown]": {
20+
"editor.formatOnSave": true,
21+
"editor.quickSuggestions": {
22+
"comments": "off",
23+
"strings": "off",
24+
"other": "off"
25+
},
26+
"files.trimTrailingWhitespace": false,
27+
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
28+
},
1929
}

README.md

Lines changed: 52 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
[@pythoninthegrass](https://github.com/pythoninthegrass)
66

77
## Setup
8+
89
* Install
910
* [asdf](https://asdf-vm.com/guide/getting-started.html)
10-
* [poetry](https://python-poetry.org/docs/)
11+
* [uv](https://docs.astral.sh/uv/getting-started/installation/)
1112
* [docker-compose](https://docs.docker.com/compose/install/)
1213
* [editorconfig](https://editorconfig.org/)
1314
* [playwright](https://playwright.dev/python/docs/intro#installation)
@@ -54,62 +55,70 @@ Additional tooling includes but is not limited to:
5455

5556
* Install [asdf](https://asdf-vm.com/guide/getting-started.html#_2-download-asdf)
5657
* Usage
58+
5759
```bash
5860
# add python plugin
59-
asdf plugin-add python
61+
asdf plugin add python
6062

6163
# install stable python
62-
asdf install python <latest|3.11.11>
64+
asdf install python <latest|3.12.10>
6365

6466
# set stable to system python
65-
asdf global python latest
67+
asdf set -u python 3.12.10
6668

67-
# add poetry asdf plugin
68-
asdf plugin-add poetry https://github.com/asdf-community/asdf-poetry.git
69+
# add uv asdf plugin
70+
asdf plugin add uv https://github.com/asdf-community/asdf-uv.git
6971

7072
# install latest version via asdf
71-
asdf install poetry <latest|2.0.1>
73+
asdf install uv <latest|0.7.4>
7274

7375
# set latest version as default
74-
asdf global poetry latest
76+
asdf set -u uv latest
7577
```
7678

77-
#### poetry
79+
#### uv
7880

79-
* Install [poetry](https://python-poetry.org/docs/#installation) if not using `asdf`
81+
* Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if not using `asdf`
8082
* Usage
83+
8184
```bash
82-
# use venv in repo
83-
poetry config virtualenvs.in-project true
85+
# create a venv w/system python (./.venv)
86+
uv venv
87+
88+
# activate venv
89+
source .venv/bin/activate
8490
8591
# install dependencies
86-
poetry install
92+
uv pip install -r pyproject.toml
93+
94+
# install with extras (for development)
95+
uv pip install -r pyproject.toml --all-extras
8796
8897
# add new dependency
89-
poetry add <package>
98+
uv add <package>
9099
91-
# remove dependency
92-
poetry remove <package>
100+
# add optional dependency to dev group
101+
uv add --optional dev <package>
93102
94-
# activate virtual environment
95-
poetry shell
103+
# export requirements.txt from pyproject.toml
104+
uv pip compile pyproject.toml -o requirements.txt
96105
97106
# run program
98107
python main.py
99108
100109
# exit virtual environment
101-
exit
110+
deactivate
102111
```
103112

104-
#### vscode
113+
#### VSCode
105114

106-
* Install [vscode](https://code.visualstudio.com/download)
107-
* Setup [vscode settings](.vscode/launch.json)
115+
* Install [VSCode](https://code.visualstudio.com/download)
116+
* Setup [VSCode settings](.vscode/launch.json)
108117
* Handles debug settings for generic python programs as well as others (e.g., django, flask, etc.)
109118
* Dev Containers
110119
* [Command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) (⇧⌘P) > Dev Containers: Reopen in Container
111120
* F5 for debug
112-
* May need to select interpreter (e.g., `/opt/venv/bin/python`) first
121+
* May need to select interpreter (e.g., `/opt/venv/bin/python`) first
113122

114123
#### ruff
115124

@@ -143,7 +152,7 @@ Additional tooling includes but is not limited to:
143152

144153
```bash
145154
# install pre-commit dev dependency
146-
poetry install
155+
uv pip install -r pyproject.toml --all-extras
147156
148157
# install pre-commit hooks
149158
pre-commit install
@@ -160,49 +169,27 @@ Handles formatting of files. [Install the editorconfig plugin](https://editorcon
160169

161170
* [Dependabot](https://dependabot.com/) is a GitHub tool that automatically creates pull requests to keep dependencies up to date.
162171

172+
#### repomix
173+
174+
* Capture upstream source code context for LLMs via [repomix](https://repomix.com/guide/)
175+
176+
```bash
177+
# install repomix
178+
brew install repomix
179+
180+
# generate summary
181+
repomix --remote https://github.com/flet-dev/flet \
182+
--output docs/flet_summary.md \
183+
--style markdown \
184+
--compress \
185+
--remove-comments \
186+
--remove-empty-lines
187+
```
188+
163189
## TODO
164190

165-
* Build
166-
* justfile -> taskfile
167-
* UI/UX
168-
* Fix padding between buttons
169-
* Move "logo" to top left of container
170-
* Package
171-
* Web
172-
* Fly.io
173-
* Self-host
174-
* Desktop [Tauri](https://v1.tauri.app/)
175-
* macOS
176-
* Linux
177-
* Windows
178-
* Mobile (TBD)
179-
* iOS
180-
* Android
181-
* Test
182-
* Unit tests
183-
* Integration tests
184-
* E2E tests
185-
* CI/CD
186-
* Docker
187-
* GitHub Actions
188-
* semver
189-
* [release-please](https://github.com/marketplace/actions/release-please-action)
190-
* Lint
191-
* Format
192-
* Run tests
193-
* Build
194-
* ArgoCD / Flux
195-
* Extend
196-
* sqlite -> ~~postgres~~ [Litestream](https://litestream.io/) / [Turso](https://turso.tech/)
197-
* Fancy category
198-
* Images
199-
* Menus
200-
* API calls to Yelp, Google, etc.
201-
* Tinder swipe right/left mechanic hehehe
202-
* Document
191+
See [TODO.md](TODO.md).
203192

204193
## Further Reading
205194

206-
* [FastHTML](https://fastht.ml/)
207-
* [Python Poetry, finally easy build and deploy packages | by Jose Alberto Torres Agüera | Lambda Automotive | Medium](https://medium.com/lambda-automotive/python-poetry-finally-easy-build-and-deploy-packages-e1e84c23401f)
208-
* [Python 101: Developing Package with Poetry | by Julio Anthony Leonard | Bootcampers | Medium](https://medium.com/bootcampers/python-101-developing-package-with-poetry-449c57690350)
195+
* ^^

TODO.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# TODO
2+
3+
* UI/UX
4+
* Never roll the same option twice in a row
5+
* Clear last roll output after
6+
* 0 seconds after deleting a restaurant
7+
* 10 seconds after roll
8+
* Move "logo" to top left of container
9+
* Build
10+
* justfile -> taskfile
11+
* Package
12+
* Web
13+
* Fly.io
14+
* Self-host
15+
* Desktop [Tauri](https://v1.tauri.app/)
16+
* macOS
17+
* Linux
18+
* Windows
19+
* Mobile (TBD)
20+
* iOS
21+
* Android
22+
* Test
23+
* Unit tests
24+
* Integration tests
25+
* E2E tests
26+
* CI/CD
27+
* Docker
28+
* GitHub Actions
29+
* semver
30+
* [release-please](https://github.com/marketplace/actions/release-please-action)
31+
* Lint
32+
* Format
33+
* Run tests
34+
* Build
35+
* ArgoCD / Flux
36+
* Extend
37+
* sqlite -> ~~postgres~~ [Litestream](https://litestream.io/) / [Turso](https://turso.tech/)
38+
* Fancy category
39+
* Images
40+
* Menus
41+
* API calls to Yelp, Google, etc.
42+
* Tinder swipe right/left mechanic hehehe
43+
* Document
44+
* Fill out [README.md](README.md#further-reading)

0 commit comments

Comments
 (0)