|
1 | 1 | # Project TODO and Notes |
2 | 2 |
|
3 | | -## Refactoring TODOs |
| 3 | +## TODOs: |
4 | 4 |
|
5 | | -- Typing |
| 5 | +- PyPi deployment |
6 | 6 |
|
7 | | - - ✅ Try to get rid of `Optional[Dict[str, Any]]` args - replaced with |
8 | | - ParamDict, FormDataDict, JSONDict for more type safety |
| 7 | +- For all `create_...`methods, add the ID from the response to logs and maybe |
| 8 | + something human readable, like the first n characters of the name??. Right |
| 9 | + now: |
| 10 | + |
| 11 | +```log |
| 12 | +[2025-02-05 06:09:34,828] INFO [fitbit_client.NutritionResource] create_food_log succeeded for foods/log.json (status 201) |
| 13 | +``` |
9 | 14 |
|
10 | 15 | - base.py: reorganize and see what we can move out. |
11 | 16 |
|
12 | 17 | - Rename to `_base`? Files it first, makes it clearer that everything in it is |
13 | 18 | private |
14 | | - - ✅ Move the methods for building `curl` commands into a mixin. |
15 | | - - refactor `_make_request`. |
16 | | - - do we need both `data` and `json`? Also, could we simplify a lot of typing |
17 | | - if we separated GET, POST, and DELETE methods? Maybe even a separate, |
18 | | - second non-auth GET? Could use `@overload` |
19 | | - - we had to makee a `ParamDict` type in `nutrition.py`. Use this everywhere? |
20 | | - - start by looking at how many methods use which params |
21 | 19 |
|
22 | 20 | - client.py: |
23 | 21 |
|
|
61 | 59 | be reused. |
62 | 60 | - We may need a public version of a generic `make_request` method. |
63 | 61 |
|
64 | | -- For all `create_...`methods, add the ID from the response to logs and maybe |
65 | | - something human readable, like the first n characters of the name??. Right |
66 | | - now: |
67 | | - |
68 | | -```log |
69 | | -[2025-02-05 06:09:34,828] INFO [fitbit_client.NutritionResource] create_food_log succeeded for foods/log.json (status 201) |
70 | | -``` |
71 | | - |
72 | 62 | - Form to change scopes are part of OAuth flow? Maybe get rid of the cut and |
73 | 63 | paste method altogether? It's less to test... |
74 | 64 |
|
|
85 | 75 | one. (there might be several of these that make sense--just take an ID and |
86 | 76 | then the signature of the "create" method). |
87 | 77 |
|
88 | | -- PyPI deployment |
89 | | - |
90 | 78 | - Enum for units? (it'll be big, maybe just common ones?) |
91 | | - |
92 | | -## CI/CD/Linting |
93 | | - |
94 | | -- GitHub Actions Setup |
95 | | - |
96 | | - - Linting |
97 | | - - black |
98 | | - - isort |
99 | | - - mdformat |
100 | | - - mypy |
101 | | - - Test running (TBD) |
102 | | - - Coverage reporting (TBD) |
103 | | - - Automated PyPI deployment |
0 commit comments