* try to match units when brute parsing and no amount is matched
* brute parser: better handle multiple word food items
Also checks the case when a food might have been split in a unit + ingredient
* fix formatting
* add test cases for ingredient parsing that don't start with an amount
* parametrized tests and added ingredient data fixture
* fixed group_id ref in tests
* fixed test inputs
* add extra tests for units as third token
---------
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
* added plural names and alias tables to foods/units
* updated models to include plural names and aliases
* updated parser to include plural and aliases
* fixed migrations
* fixed recursive models
* added plural abbreviation to migration
* updated parser and display prop
* update displays to use plurals
* fix display edgecase and remove print
* added/updated display tests
* fixed model bug and added parser tests
* added tests for aliases
* added new plural options to data management page
* removed unique constraint
* made base dialog more customizable
* added alias management to food and unit data pages
* removed unused awaits
* 🧹
* added normalization to foods and units
* changed search to reference new normalized fields
* fix tests
* added parsed food matching to backend
* prevent pagination from ordering when searching
* added extra fuzzy matching to sqlite ing matching
* added tests
* only apply search ordering when order_by is null
* enabled post-search fuzzy matching for postgres
* fixed postgres fuzzy search test
* idk why this is failing
* 🤦
* simplified frontend ing matching
and restored automatic unit creation
* tightened food fuzzy threshold
* change to rapidfuzz
* sped up fuzzy matching with process
* fixed units not matching by abbreviation
* fast return for exact matches
* replace db searching with pure fuzz
* added fuzzy normalization
* tightened unit fuzzy matching thresh
* cleaned up comments/var names
* ran matching logic through the dryer
* oops
* simplified order by application logic
* 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>
* docs: fix typos
* typos: fix typos found by `codespell` across the codebase
* docs: fix `macOS` spelling
* docs: fix `authentification` terminology
"Authentification" is not a thing.
* docs: fix `localhost` typo in example link
* typos: fix in-code typos
These are potentially higher risk, but no other mentions of these typos
show up in the codebase.
* increased float rounding precision for crf parser
* limited fractions to a max denominator of 32 to prevent weirdly specific values
* add test cases for 1/8 and 1/32
* add rounding to avoid more digits than necessary
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fix UI column width
* words
* update parser to support diff strats
* add new model url
* make button more visible
* fix nutrition error
* feat(backend): ✨ add 'brute' strategy for parsing ingredients
* satisfy linter
* update UI for creation page
* feat(backend): ✨ log 422 errors in detail when not in PRODUCTION
* add strategy selector
Co-authored-by: Hayden <hay-kot@pm.me>