`email.com` is not a reserved domain, incorrect configuration could result in unintentional effects.
`example.com` is reserved by IANA for bogus purposes, see RFC 6761.
* upgrade sqlalchemy to 2.0
* rewrite all db models to sqla 2.0 mapping api
* fix some importing and typing weirdness
* fix types of a lot of nullable columns
* remove get_ref methods
* fix issues found by tests
* rewrite all queries in repository_recipe to 2.0 style
* rewrite all repository queries to 2.0 api
* rewrite all remaining queries to 2.0 api
* remove now-unneeded __allow_unmapped__ flag
* remove and fix some unneeded cases of "# type: ignore"
* fix formatting
* bump black version
* run black
* can this please be the last one. okay. just. okay.
* fix repository errors
* remove return
* drop open API validator
---------
Co-authored-by: Sören Busch <fleshgolem@gmx.net>
This PR does too many things :(
1. Major refactoring of the dev/scripts and dev/code-generation folders.
Primarily this was removing duplicate code and cleaning up some poorly written code snippets as well as making them more idempotent so then can be re-run over and over again but still maintain the same results. This is working on my machine, but I've been having problems in CI and comparing diffs so running generators in CI will have to wait.
2. Re-Implement using the generated api routes for testing
This was a _huge_ refactor that touched damn near every test file but now we have auto-generated typed routes with inline hints and it's used for nearly every test excluding a few that use classes for better parameterization. This should greatly reduce errors when writing new tests.
3. Minor Perf improvements for the All Recipes endpoint
A. Removed redundant loops
B. Uses orjson to do the encoding directly and returns a byte response instead of relying on the default
jsonable_encoder.
4. Fix some TS type errors that cropped up for seemingly no reason half way through the PR.
See this issue https://github.com/phillipdupuis/pydantic-to-typescript/issues/28
Basically, the generated TS type is not-correct since Pydantic will automatically fill in null fields. The resulting TS type is generated with a ? to indicate it can be null even though we _know_ that i can't be.
* count responses
* perf(backend): ⚡ remove validation on recipe summary response
use the construct() method from pydantic to reduce get time as well as optimize the SQL query for recipes
* update UI to support new categories/tags
* fix(backend): 🐛 restrict recipes by group
Co-authored-by: Hayden <hay-kot@pm.me>