forked from iloveitaly/python-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTODO
More file actions
243 lines (214 loc) · 15.4 KB
/
TODO
File metadata and controls
243 lines (214 loc) · 15.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
## python
better configuration py module: autoload and call configure() if it exists
custom default fastapi error handler https://grok.com/share/bGVnYWN5_fe5638b4-5f0b-4cca-afe6-369468eb5f2e
watch out for frozen dataclasses in excpetions https://grok.com/share/bGVnYWN5_914c248a-4efc-4b24-b05e-2deb11197554
pydantic doesn't render JSON schema in a way that retool likes https://github.com/pydantic/pydantic/issues/7161
https://github.com/gotcha/ipdb/blob/5b5c8683e2a3ac7fddc4013d3863c8086e23a639/ipdb/stdout.py#L9-L11 maybe this will fix some of our stdout issues?
should consume react router routes and only respond to those routes in the static glob
limit FE dynamic routes to generated react router routes
https://github.com/jd/tenacity - use this instead of backoff
https://github.com/astral-sh/ty?tab=readme-ov-file - new type checker, after it is out of beta
https://github.com/procrastinate-org/procrastinate - another pg-based job queue
https://github.com/janbjorge/PgQueuer - another job queue
https://tkte.ch/chancy/ look into this job queue?
I think we should adopt a `lib/` for any code that, in a perfect world, should be extracted out into a library.
https://grok.com/share/bGVnYWN5_8e8c1718-b3dc-4b32-95a3-61b85ab2be3e figure out how to limit threads that the async pool uses via an ENV var, useful for avoiding complex py-spy dumps in development
https://github.com/pydantic/pydantic-extra-types
https://celery.school/sqlalchemy-session-celery-tasks wrap celery task
flower update, custom branch
- https://github.com/mher/flower/pull/1417
- https://github.com/mher/flower/pull/1397
maybe treat sqlalchemy.exc.NoResultFound as 404 in fastapi?
I wonder if we should use named loggers instead https://github.com/replicate/cog/blob/c95774f18b8df6f6a7b841be1900153ca04a57ad/python/cog/server/http.py#L61C7-L61C27
remove static serving paths from fastapi openapi
https://github.com/astral-sh/ruff/issues/6514 - float to top DNE
https://github.com/0xthiagomartins/sqlmodel-controller/blob/main/.coveragerc - automatic coverage
timeout issue https://github.com/celery/celery/issues/3430 and https://github.com/celery/celery/discussions/8692
understand this https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_upper_case_table_or_column_names
ruff doesn't do everything that pylint does, but it's trying! https://github.com/astral-sh/ruff/issues/970
breakpoint() is not protected against by push? is this coming in ruff?
use BaseSettings in pydantic instead of decouple? https://github.com/replicate/cog/blob/c95774f18b8df6f6a7b841be1900153ca04a57ad/python/cog/config.py#L59
fastapi websocket with remix connection
do we need this https://github.com/fastapiutils/fastapi-utils/blob/master/fastapi_utils/guid_type.py?
favicon and other root handlers on the fastapi server
expanded import sort categories, can we do this with ruff?
fix html formatting, use a single formatter type
https://salabim.org/peek/#copying-to-the-clipboard
super user pattern in clerk https://discord.com/channels/856971667393609759/1330543476433227877
https://github.com/replicate/cog/blob/c95774f18b8df6f6a7b841be1900153ca04a57ad/python/cog/suppress_output.py#L7 interesting approach to surpressing output
exception group processor? https://github.com/apache/airflow/blob/4280b83977cd5a53c2b24143f3c9a6a63e298acc/task_sdk/src/airflow/sdk/log.py#L42
`localias debug config --print | yq --output-format json` to assert against the local .localias
we should lint against this `from migrations.seed import PYTHON_SERVER_HOST`, seed should only be executed directly
ipython in prod + dokku outputs logs directly to stdout https://stackoverflow.com/questions/11833654/log-ipython-output
## fastapi
https://pypi.org/project/apiexception/ - better logging of API error types
https://github.com/long2ice/fastapi-cache need a caching tool that I trust, ask to take over this one and make it more maintained.
## Observability
https://github.com/replicate/cog/blob/c95774f18b8df6f6a7b841be1900153ca04a57ad/python/cog/server/telemetry.py#L7 looks like there is some standard around this
https://victoriametrics.com - recommended instead of prometheus
## js
automatic required indicators for zod forms https://grok.com/share/bGVnYWN5_ca175942-e870-4b67-b47b-6d804bdc5428
https://github.com/dhaxor/super-utils-plus - functional utilities for js
https://github.com/remix-run/react-router/discussions/12522 - eslint for react router?
probably remove the _HOST vars which prepend https, we can just do that in the frontend logic
`pnpm exec react-router routes --json` to get routes, we should compare against openai routes
https://github.com/raineorshine/npm-check-updates/issues/1366 - exact versions not respected
https://github.com/shadcn-ui/ui/issues/5669 - can't use `"verbatimModuleSyntax": true,`
https://github.com/vantezzen/autoform - looks like an interesting way to autogenerate schema
https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1252#issuecomment-2593462128 - no camel case transformation on heyapi
https://github.com/hey-api/openapi-ts/issues/1571 - naming issues
https://github.com/remix-run/react-router/discussions/12427 - all clientLoaders are rerun, including allk ested layouts
https://discord.com/channels/770287896669978684/1326588296025083944 - vite html transformation plugin https://github.com/remix-run/react-router/issues/12736
https://github.com/josh-hemphill/vite-plugin-favicon - favicon generator
https://github.com/hey-api/openapi-ts/commit/b3c23ba99c361bdca3ab9c44017b6e5c044f40a7 use this for bearer auth https://github.com/hey-api/openapi-ts/releases/tag/%40hey-api%2Fclient-fetch%400.6.0
just py_js-build --watch implementation
sentry config, not yet ready for v7 https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/, https://github.com/remix-run/react-router/discussions/12423
posthog config, fix when v7 is released
add posthog usage example
logging config fine on the client side?
add middleware to client to catch authorization errors, create non-clerk-provider layout on the frontend
think through authenticated pattern, create a clientLoader action
https://github.com/hey-api/openapi-ts/pull/1378 - better log redirect, but need to handle ci and local builds
better error page, esp when 40x error when loading the client
https://simondosda.github.io/posts/2021-05-10-eslint-imports.html auto fix unused imports
js test build should not include valid sentry token, can we use a console DSN?
## deployment
https://grok.com/share/bGVnYWN5_0b800f1c-f85b-483f-bc7e-4e10f3b15536 need unregistry clearing script
app.json from movie tickets
grafana timing integration
https://grafana.com for observability
log ingestion service, need to investigate
can kamal work with a registry with container?
flightcontrol on AWS or something like that on azure
## pytest
playwright: In config: trace = "on-first-retry"
stabalized scrolling https://grok.com/share/bGVnYWN5_22b6f3ac-a0dc-49d5-a92a-223d43834a70
pytest-failure-tracker to track failures across test runs, if we combine this with locking
## dev
if someone's completion system is not initialized, the bash direnv export thing will fail with `compdef not defined` sort of error
`just direnv_export_docker '.env.production.frontend' --params` can still silently fail
https://grok.com/share/bGVnYWN5_74eae3f3-cd3f-4465-9a8d-f7d4fc0faf45 prevent py analysis from picking up seed, console, etc files
zrok? https://github.com/openziti/zrok/issues/1006
each PR gets a staging environment https://preevy.dev/tunnel-server or https://github.com/UffizziCloud/uffizzi?tab=readme-ov-file
when updating container versions, we need to restart the containers to pick up on the new version, otherwise the persisted versions will not be updated
https://github.com/terror/just-lsp/issues/60 - justfile lsp
if a command running inside a direnv .envrc fails, it doesn't change the exit code https://github.com/direnv/direnv/issues/893
forklift for s3 and remote storage
%load_ext pgcli.magic for ipython
add custom cspell dictionary instead of settings.json
https://github.com/TablePlus/TablePlus/issues/3407 orb stack connections sometimes break
fastapi dev conflicts with pdbr interactions, should allow fastapi logs to be funneled elsewhere; maybe we can detect breakpoint usage and do this automatically
should we use sops? Probably can just use 1p, think about mutation risks here https://github.com/getsops/sops?tab=readme-ov-file#yaml-json-env-and-ini-type-extensions
`uv pip install --config-setting editable_mode=compat --reinstall -e ./pypi/activemodel` and https://github.com/astral-sh/uv/issues/7028 and https://github.com/dagster-io/dagster/commit/9b3bf2dda8a44168326bb38f75bdd47493ee6da7#diff-85c2bb6d4721ed0a146ea51e2bd615dbdf2249ad3714adc1cacc1877707cadeeR161
https://github.com/astral-sh/uv/issues/9258#issuecomment-2488597047 - looks like local dev dependencies are supported?
autogen'd localalias based on ENV port config, use local
switch to binstall and see if this becomes a binary distribution https://github.com/yukihirop/ultraman/issues/58
look into devenv, maybe a replacement for some of the setup here? https://github.com/getsentry/sentry/blob/master/devenv/sync.py
only look at local .tool-versions instead of the entire system
mermaid postgres integrated into readme https://github.com/bastiensun/pg-mermaid
add some mermaid diagrams to the readme https://raw.githubusercontent.com/devrishik/medical-record-copilot/bc450aa523ba65e3b5a254f422696725512f8c30/README.md
## commitlint
removing unused import, should catch this specifically
## pytest
https://github.com/microsoft/playwright-pytest/issues/187 weird concurrency issues
https://grok.com/share/bGVnYWN5_db662e27-ebb0-4157-8c26-636ca80f5bbd better default pytest configuration
https://github.com/flexmock/flexmockc
interesting object matcher here https://github.com/replicate/cog/blob/c95774f18b8df6f6a7b841be1900153ca04a57ad/python/tests/conftest.py#L6-L23
timeout default for playwright to avoid hanging
test logs are a mess. I need to figure out what pytest is doing and make them sane.
--debug seems to generate a different test log
https://github.com/darrenburns/pytest-clarity - improve pytest logs
https://github.com/nicoddemus/pytest-rich/blob/main/src/pytest_rich/header.py
## ui
dialog ovefflow not working https://github.com/shadcn-ui/ui/issues/16
## ci
https://grok.com/share/bGVnYWN5_8e866e32-04ee-4404-856d-415b7578947c playwright doesn't like react, need more helpers, and copy existing helpers from movietickets
cache py dependencies https://github.com/astral-sh/setup-uv/blob/d837751086f305827240e5292bdf208a757ceef1/src/utils/inputs.ts#L59
https://graphite.dev/guides/github-actions-caching - cache docker build and postgres images? https://lipanski.com/posts/speed-up-your-docker-builds-with-cache-from
https://github.com/tecolicom/actions-use-apt-tools/issues/5
1p can hang CI https://1password-devs.slack.com/archives/C03NJV34SSC/p1733764637441309
can we use a op service account locally? Probably not a great idea since no 2f is required
pull mailpit contents (we can't pull screeshots)
distribute tests across databases and redis https://pytest-xdist.readthedocs.io/en/stable/distribution.html
enable verbose debugging on tests when GHA debug is enabled
maybe screenshot comments? https://github.com/ActivityWatch/aw-webui/blob/291da6f2c5e7a6b896f23a4eec5ffed9874321ba/.github/workflows/comment.yml#L69
add console logs to log `page.on("console", lambda msg: print(f"Console Message: {msg.type()}: {msg.text()}"))`
add domains for services just/docker.just https://github.com/dvddarias/docker-hoster/blob/develop/hoster.py and https://github.com/costela/docker-etchosts
downside with this action is it requires write access to the repo and manages a separate branch. instead we should just add a coverage failure threshold.
```
# TODO coverage data is not outputting properly right now
# - name: Add Coverage Comment to PR
# id: coverage_comment
# uses: py-cov-action/python-coverage-comment-action@v3
# with:
# GITHUB_TOKEN: ${{ github.token }}
```
https://github.com/tecolicom/actions-use-apt-tools/issues/4 - `sudo apt-get update` does work.
maybe use a different event loop? Faster / less issues with playwright?
```
# TODO this doesn't seem to fix the issue
# https://github.com/microsoft/playwright-pytest/issues/167#issuecomment-1546854047
# def pytest_configure():
# log.info("pytest_configure: nesting asyncio loop")
# nest_asyncio.apply()
# TODO we should look into uvloop if we end up doing async tests
# @pytest.fixture(scope="session")
# def event_loop_policy():
# return uvloop.EventLoopPolicy()
```
## build
add gitleaks check to local lefthook and CI, add lefthook documentation to upstream readme. brew install gitleaks
add nixpacks cache, waiting on comment from author about how to do this.
push to registry
switch to https://railpack.com/guides/running-railpack-in-production
pull azure build and push stuff into this
the build debug stuff doesn't work when there are spaces in the build args, this is also probably going to break with the new railpack system...
## act compat
https://github.com/catthehacker/docker_images/issues/138 - apt tool, still failing on apt-install but not because of missing packages
act --container-architecture linux/amd64 --job web
act --container-architecture linux/amd64 --env OP_SERVICE_ACCOUNT_TOKEN="$OP_SERVICE_ACCOUNT_TOKEN"
## vs code
file picker search for specific files even though they are in gitignore
https://marketplace.visualstudio.com/items?itemName=lolacod.exclude-format-on-save ignore ui components
binding for paste as plain text
```
{
"key": "ctrl+shift+v",
"command": "editor.action.pasteAs",
"args": {
"preferences": [
"text.plain"
]
}
}
```
## javascript
```
log.warn("Rewardful is not available")
// TODO would be cool if we could tag a message to also be sent to Sentry
Sentry.captureMessage("Rewardful is not available")
```
- [ ] wrap comments? https://github.com/dnut/Rewrap
- [ ] https://github.com/remix-run/react-router/issues/12761 understand safari caching more; have we fixed this with HTML caching?
- [ ] maybe remove log statements here? https://github.com/lunaticscode/vite-remove-console?tab=readme-ov-file
- [ ] https://grok.com/share/bGVnYWN5_7b44bc14-aea6-4a23-8218-d5550748692a better zod errors
- [ ] https://github.com/remix-run/react-router/discussions/14081 typed href query params
- [ ] vite image optimization import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
- [ ] client loader query string https://discord.com/channels/770287896669978684/1392961395930431528/1392961395930431528
## secrets
- [ ] OP_VAULT_UID in direnv export should be copied from the existing environemnt
- [ ] understand how the service account tokens show up in the web ui and how we can prevent duplicates https://1password-devs.slack.com/archives/C037XTZ9RA6/p1752017067566649
## open source
- [ ] pull typeid + model formatting into activemodel
- [ ] https://github.com/djlint/djLint/pull/1049#issuecomment-2656628325
- [ ] https://github.com/janglad/shadcn-dropzone/pull/5/files
- [ ] https://github.com/nainglinnkhant/lingua-time/pull/3
- [ ] pull copy to clipboard into a open source component
- [ ] pull combobox stuff into the parent repo
- [ ] create template for shadcn ui components that I can easily clone with copier and use for components
- [ ] polyfactory stuff
## ai
- [ ] postgres MCP connected to credentials
- [ ] https://github.com/orgs/community/discussions/137150 no url reading in copilot
## template
- [ ] would be neat to dynamically pick coices https://github.com/copier-org/copier/issues/2078