Repository navigation
Replies: 2 comments 11 replies
|
I completely agree, we are having lots of code fragmentation right now Same thing with the providers, we are having more and more providers, so having some sort of plugin system would help too there By the way, I added you as a contributor, so you should have privilege to merge PRs too You did tremendous work on this project and I trust you ! |
|
@calibrain an update on the route work, and what I would like to do with it. The Moving only the groups the 1.5.0 PRs added would leave the file half done, so I would like to do all of it.
Added later: a docs PR that writes the convention down comes before any of the moves (#1622), so the rest of them match it. After row 7 come the four groups that are not routes, one PR each, with the new home still a proposal:
What I would hold every PR to, since this is a lot of moved code:
I would rather this take longer and be right than land quickly and pick up a subtle change on the way. If you would rather I stop after a few groups to see how it goes, say so and I will. Otherwise I will start with the first row. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@calibrain not a PR, but more a question about direction.
After the large number of PRs merging for 1.5.0 I was concerned about bugs slipping in as things were woven together, so I had Claude run a pass over it. Nothing significant came up (a few small PRs are pending), but the maintainability side kept coming back to main.py. It went from 3587 to 3890 lines in this release, and five of the 1.5.0 PRs added routes and helpers there (#1506, #1419, #1489, #1422/#1488, #1501). Three of those are mine, so I am part of the reason for the growth, which is why I'm asking.
The repo already has two ways of adding routes. Most of them are defined directly in main.py (41
@app.routehandlers now), but seven modules register their own throughregister_*_routes(app, ...)(activity, requests, admin, self user, OIDC, release inspect, admin settings), and main.py hands them what they need as parameters. The question is whether we want new route groups to keep going the second way, and whether it is worth moving the five recent ones over and standardizing on it.What I think it buys:
What it costs:
activity_routesalready uses, but it has to be done carefully.If it sounds useful, I am willing to do the PRs to make it work, and I'd start with
/api/statssince it is 35 lines and core/stats.py already imports nothing from main, so it is a clean sample of the shape. If it doesn't, no problem, I'll keep new routes wherever you prefer and we can leave main.py as it is.All reactions