* Move recipe validations from RecipeSummary to Recipe
* fix RepositoryRecipes loading recipes with ingredients even when load_food is False
* Add eager loading of ingredient units
* fix trying to instantiate PaginationBase with concrete type not being valid for mypy
* fix linting issue
* tidied up shopping list item models
redefined recipe refs and updated models
added calculated display attribute to unify shopping list item rendering
added validation to use a food's label if an item's label is null
* fixed schema reference
* refactored shopping list item service
route all operations through one central method to account for edgecases
return item collections for all operations to account for merging
consolidate recipe items before sending them to the shopping list
* made fractions prettier
* replaced redundant display text util
* fixed edgecase for zero quantity items on a recipe
* fix for pre-merging recipe ingredients
* fixed edgecase for merging create_items together
* fixed bug with merged updated items creating dupes
* added test for self-removing recipe ref
* update items are now merged w/ existing items
* refactored service to make it easier to read
* added a lot of tests
* made it so checked items are never merged
* fixed bug with dragging + re-ordering
* fix for postgres cascade issue
* added prevalidator to recipe ref to avoid db error
* add httpx depedency for async http requests
* rework scraper strategies to download recipe html asynchronously
* rework recipe_data_service to download recipe images asynchronously
* fix recipe_parser test, so it can use async results
* fix bulk import so that it also works with async scraper
* fix broken recipe_parser tests
* Fix issues found by scanners
* Add additional checks for ingredient and instruction count in test_create_by_url
* Revert changes in test recipe_data
Since we are checking ingredients and instructions in test_create_url now, these would fail with the stored html of recipe data
* Add explicit type annotation in recipe_data_service.largest_content_len
* Fix typo in annotation
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (Slovak)
* New translations en-US.json (French)
* New translations en-US.json (French)
* New translations en-US.json (Finnish)
* New translations en-US.json (French)
* New translations en-US.json (French)
* New translations en-US.json (Portuguese)
* New translations en-US.json (French)
* New translations en-US.json (French)
* New translations en-US.json (Finnish)
* New translations en-US.json (Finnish)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Finnish)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Finnish)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Italian)
* New translations en-US.json (Italian)
* New translations en-US.json (Finnish)
* New translations en-US.json (Finnish)
* New translations en-US.json (Italian)
* New translations en-US.json (Italian)
* New translations en-US.json (Finnish)
* New translations en-US.json (Italian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Hungarian)
* New translations en-US.json (Hungarian)
* New translations en-US.json (Hungarian)
* New translations en-US.json (Hungarian)
* Fix issue where recipes could not have all their ingredients/instructions removed
* Add test for removing all instructions and ingredients from a recipe
* prevent list refresh while re-ordering items
* update position of new items to stay at the bottom
* prevent refresh while loading
* copy item while editing so it isn't refreshed
* added loading count to handle overlapping actions
* fixed recipe reference throttling
* prevent merging checked and unchecked items
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Polish)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (German)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Bulgarian)
* New translations en-US.json (Bulgarian)
* propogate scale changes to print view
* fixed incorrect variable reference
* refactored shopping list recipe routes
cleaned up existing logic
added support for recipe scaling
* updated current revision
* adding to shopping list respects UI recipe scale
* added field annotations
* added tests for recipe scaling
* made column nullable and set to 1 during migration
* New translations en-US.json (Polish)
* New translations en-US.json (Polish)
* New translations en-US.json (Polish)
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (French)
* New translations en-US.json (Turkish)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (German)
* changed default sort direction for certain attrs
* added workaround for filtering out null datetimes
* filtered out null-valued results for certain sorts
* removed unecessary parse
* used minyear instead of 1900
* New translations en-US.json (German)
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (German)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Ukrainian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* New translations en-US.json (Lithuanian)
* added chef hat
* removed unnecessary log
* modified recipe and recipe timeline event schema
changed timeline event "message" -> "event_message"
added "last made" timestamp to recipe
* added "I made this" dialog to recipe action menu
* added missing field and re-ran code-gen
* moved dialog out of context menu and refactored
removed references in action menu and context menu
refactored dialog to be triggered by a button instead
added route to update recipe last made timestamp
added visual for last made timestamp to recipe header and title
* added sorting by last made
* switched event type to comment
* replaced alter column with pydantic alias
* added tests for event message alias
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Czech)
* New translations en-US.json (Norwegian)
* New translations en-US.json (Norwegian)
* New translations en-US.json (Norwegian)
* New translations en-US.json (Dutch)
* added recipe_timeline_events table to db
* added schema and routes for recipe timeline events
* added missing mixin and fixed update schema
* added tests
* adjusted migration revision tree
* updated alembic revision test
* added initial timeline event for new recipes
* added additional tests
* added event bus support
* renamed event_dt to timestamp
* add timeline_events to ignore list
* run code-gen
* use new test routes implementation
* use doc string syntax
* moved event type enum from db to schema
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (Dutch)
* New translations en-US.json (German)
* New translations en-US.json (Polish)
* health check as python script
* install crfpp model via python
* drop curl from finale container
* use uvicorn by default w/ gunicorn as opt in
* recommend setting mem limit for container
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.