Commit Graph

189 Commits

Author SHA1 Message Date
Michael Genson
3fc120236d chore(deps): Bump Ruff (#4602) 2024-11-24 14:56:39 +11:00
Michael Genson
327da02fc8 feat: Structured Yields (#4489)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-11-20 08:46:27 -06:00
Michael Genson
0fed5f54f6 fix: Prevent Users From Being Created With Missing Group/Household (#4500) 2024-11-05 23:52:33 +00:00
boc-the-git
3dd61f7742 feat: Add summary to recipe instructions (#4410)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-10-23 11:27:47 +02:00
Michael Genson
b8e62ab8dd feat: Query Filter Builder for Cookbooks and Meal Plans (#4346) 2024-10-17 17:35:39 +02:00
Michael Genson
e47d171463 fix: Good data being deleted upon restore (#4376)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-10-16 14:56:07 +00:00
Michael Genson
cba381cb67 fix: Handle Data With Invalid User (#4325)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-10-14 15:10:55 +00:00
Tom Brennan
02c0fe993b feat: adding the rest ofthe nutrition properties from schema.org (#4301) 2024-10-13 15:04:29 +02:00
Michael Genson
b0ed242ff2 fix: Strip Timezone from Timestamps in DB (#4310)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-10-06 06:30:30 +00:00
Michael Genson
4712994242 feat: Add Household Filter to Meal Plan Rules (#4231) 2024-09-27 14:06:45 +00:00
Michael Genson
fd0257c1b8 feat: Additional Household Permissions (#4158)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-09-17 10:48:14 -05:00
Michael Genson
eb170cc7e5 feat: Add Households to Mealie (#3970) 2024-08-22 10:14:32 -05:00
Michael Genson
d5f7a883df fix: Make Mealie Timezone-Aware (#3847)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2024-07-08 21:12:20 +00:00
Michael Genson
f4827abc1d feat: Offline Shopping List (#3760)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
2024-06-29 09:58:58 +00:00
boc-the-git
a062a4beaa feat: Add the ability to flag a food as "on hand", to exclude from shopping list (#3777) 2024-06-28 15:16:04 +00:00
Michael Genson
94e91d3602 feat: Update Shopping List Timestamp on List Item Update (#3453) 2024-06-01 11:07:50 +00:00
Michael Genson
c610ec1344 fix: Broken Import (#3630) 2024-05-20 07:55:01 -08:00
Michael Genson
61becdbec7 chore: Remove Server Tasks (#3592) 2024-05-20 14:51:37 +00:00
Michael Genson
cca11b5a12 chore(deps): update dependency ruff to v0.4.2 (#3533)
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2024-05-01 16:07:10 +00:00
Michael Genson
3807778e2f feat: Recipe Actions (#3448)
Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-05-01 09:20:52 +02:00
Michael Genson
46f1ad7941 fix: Bad Recipe Rating Calc Preventing App Startup (#3475) 2024-04-16 20:47:15 +00:00
Michael Genson
2a541f081a feat: User-specific Recipe Ratings (#3345) 2024-04-11 21:28:43 -05:00
Hayden
1af0f426ae fix: remove deprecated lifecycle and consolidate startup actions (#3311)
* remove deprecated lifecycle and consolidate startup actions

* fix import
2024-03-14 19:27:26 +00:00
Hayden
5f6844eceb feat: Login with OAuth via OpenID Connect (OIDC) (#3280)
* initial oidc implementation

* add dynamic scheme

* e2e test setup

* add caching

* fix

* try this

* add libldap-2.5 to runtime dependencies (#2849)

* New translations en-us.json (Norwegian) (#2851)

* New Crowdin updates (#2855)

* New translations en-us.json (Italian)

* New translations en-us.json (Norwegian)

* New translations en-us.json (Portuguese)

* fix

* remove cache

* cache yarn deps

* cache docker image

* cleanup action

* lint

* fix tests

* remove not needed variables

* run code gen

* fix tests

* add docs

* move code into custom scheme

* remove unneeded type

* fix oidc admin

* add more tests

* add better spacing on login page

* create auth providers

* clean up testing stuff

* type fixes

* add OIDC auth method to postgres enum

* add option to bypass login screen and go directly to iDP

* remove check so we can fallback to another auth method oauth fails

* Add provider name to be shown at the login screen

* add new properties to admin about api

* fix spec

* add a prompt to change auth method when changing password

* Create new auth section. Add more info on auth methods

* update docs

* run ruff

* update docs

* format

* docs gen

* formatting

* initialize logger in class

* mypy type fixes

* docs gen

* add models to get proper fields in docs and fix serialization

* validate id token before using it

* only request a mealie token on initial callback

* remove unused method

* fix unit tests

* docs gen

* check for valid idToken before getting token

* add iss to mealie token

* check to see if we already have a mealie token before getting one

* fix lock file

* update authlib

* update lock file

* add remember me environment variable

* add user group setting to allow only certain groups to log in

---------

Co-authored-by: Carter Mintey <cmintey8@gmail.com>
Co-authored-by: Carter <35710697+cmintey@users.noreply.github.com>
2024-03-10 13:51:36 -05:00
Michael Genson
e30728e8e9 Merge branch 'mealie-next' into feat/filter-shopping-lists 2024-03-06 09:11:58 -06:00
Michael Genson
74d6f58363 added user to shopping list 2024-02-23 16:49:37 +00:00
Michael Genson
0a28d36df9 remove redundant uselist indicators 2024-02-20 16:24:48 +00:00
Michael Genson
994940f270 more db model fixes 2024-02-19 16:05:50 +00:00
Michael Genson
3adb324b25 fixed more db model definitions 2024-02-19 15:47:14 +00:00
Michael Genson
2a016ecce9 fixed some model definitions 2024-02-19 15:43:30 +00:00
Litchi Pi
3d73e7498f feat: allow overriding of some absolute paths using environment variables (#3102)
* Allow overriding of alembic config file path using environment variable

Signed-off-by: Litchi Pi <litchi.pi@proton.me>

* Allow overriding of MODEL_PATH using environment variable

Signed-off-by: Litchi Pi <litchi.pi@proton.me>

---------

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
2024-02-13 19:30:07 +00:00
Michael Genson
7a107584c7 feat: Upgrade to Pydantic V2 (#3134)
* bumped pydantic
2024-02-11 16:47:37 +00:00
Michael Genson
a5ef18669b fix: Upgrade Black (#3057)
* bump black

* bump black on precommit

* run black

* fix backend test runner
2024-01-27 15:11:54 -06:00
Michael Genson
7602c67449 fix: More Backup Restore Fixes (#2859)
* refactor normalized search migration to use dummy default

* changed group slug migration to use raw SQL

* updated comment

* added tests with anonymized backups (currently failing)

* typo

* fixed LDAP enum in test data

* fix for adding label settings across groups

* add migration data fixes

* fix shopping list label settings test

* re-run db init instead of just running alembic migration, to include fixes

* intentionally broke SQLAlchemy GUID handling

* safely convert between GUID types in different databases

* restore original test data after testing backup restores

* added missing group name update to migration
2024-01-03 04:19:04 +00:00
Michael Genson
8311db7e60 fix: Prevent Creating Groups With No Name (#2803)
* prevent creating groups with no name

* add db fix fro groups with no name

* moved non-actionable fix logs to debug level

* 🧹

* use id as default name to avoid collisions

* simplified group name constraint

* removed redundant import
2023-12-11 09:20:57 -09:00
Michael Genson
ff115284d9 add explicit handling for empty 1:many lists 2023-11-25 16:59:23 +00:00
Michael Genson
d440d51ffe feat: plural foods and units, and aliases (#2674)
* 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

* 🧹
2023-11-14 06:39:07 -09:00
Michael Genson
80968b02bb feat: Remove Explore URLs and make the normal URLs public (#2632)
* add groupSlug to most routes

* fixed more routing issues

* fixed jank and incorrect routes

* remove public explore links

* remove unused groupSlug and explore routes

* nuked explore pages

* fixed public toolstore bug

* fixed various routes missing group slug

* restored public app header menu

* fix janky login redirect

* 404 recipe API call returns to login

* removed unused explore layout

* force redirect when using the wrong group slug

* fixed dead admin links

* removed unused middleware from earlier attempt

* 🧹

* improve cookbooks sidebar
fixed sidebar link not working
fixed sidebar link target
hide cookbooks header when there are none

* added group slug to user

* fix $auth typehints

* vastly simplified groupSlug logic

* allow logged-in users to view other groups

* fixed some edgecases that bypassed isOwnGroup

* fixed static home ref

* 🧹

* fixed redirect logic

* lint warning

* removed group slug from group and user pages
refactored all components to use route groupSlug or user group slug
moved some group pages to recipe pages

* fixed some bad types

* 🧹

* moved groupSlug routes under /g/groupSlug

* move /recipe/ to /r/

* fix backend url generation and metadata injection

* moved shopping lists to root/other route fixes

* changed shared from /recipes/ to /r/

* fixed 404 redirect not awaiting

* removed unused import

* fix doc links

* fix public recipe setting not affecting public API

* fixed backend tests

* fix nuxt-generate command

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-11-05 16:07:02 -09:00
Michael Genson
a98e863bca fix: database unique constraints (#2594)
* fixed missing migration name

* added unique constraints to all m2m tables

* fixed bug trying to create duplicate tags

* added more unique constraints

* fixed duplicate seeder data

* updated tests

* fixed seed rollback error
2023-10-07 11:23:13 -08:00
Michael Genson
2dfbe9f08d feat: Improved Ingredient Matching (#2535)
* 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
2023-09-15 17:19:34 +00:00
Michael Genson
c9cc7a93c8 fix: Tools Shouldn't Be Unique Across Groups (#2505)
* fixed type/abc errors in tests

* fixed false positive multitentant tests

* fix tools not allowing unique slugs across groups

* fixed alembic refs

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-21 20:39:23 +00:00
Michael Genson
d6e4829e6f feat: Display Shopping List Item Recipe Refs (#2501)
* added recipe ref display to shopping list items

* added backend support for recipe notes

* added recipe note to item recipe ref display

* fixed note merge bug with 3+ notes

* tweak display

* lint

* updated alembic refs

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-21 09:18:37 -08:00
Michael Genson
095edef95e feat: Improve Public URL Readability (#2482)
* added support for group slugs

* modified frontend to use links with group slug

* fixed test refs

* unused import

---------

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
2023-08-20 10:38:46 -08:00
Jacob Corn
7e0d29afc7 feat: search tokenization, handling of quoted literal search, and postgres fuzziness (#2351)
* Creating postgres migration script and starting to set up to detect database

* non-working placeholders for postgres pg_tgrm

* First draft of some indexes

* non-working commit of postgres indexing

* Further non-working edits to db-centric fuzzy search

* update alembic for extensions

* More non-working setup

* Move db type check to init_db

* fix typo in db name check

* Add sqlite token search and postgres full text search

* reorder search to hit exact matches faster

* Add settings and docs for POSTGRES_LANGUAGE (full text search)

* Use user-specified POSTGRES_LANGUAGE in search

* fix fuzzy search typo

* Remove full text search and instead order by trigram match

* cleaner adding of indices, remove fulltext

* Cleanup old import of getting app settings

* Fix typo in index

* Fix some alembic fuzzy typos

* Remove diagnostic printing from alembic migration

* Fix mixed up commutator for trigram operator and relax criteria

* forgot to remove query debug

* sort only on name

* token and fuzzy search tests

* Refactor recipe search test to avoid rare random string cross-matches.

* Add ability to quote parts of search for exact match

* Remove internal punctuation, unless it's quoted for literal search

* Add tests for special character removal and literal search

* Remove the outer double quotes from searches, but leave internal single quotes alone.

* Update tests to avoid intra-test name collisions

* Fixing leftovers highlighted by lint

* cleanup linting and mypy errors

* Fix test cross-matching on dirty db (leftovers from bulk import)

* forgot to cleanup something when debugging mypy errors

* re-order pg_trgm loading in postgres

* address comments
2023-05-28 09:46:53 -08:00
Hayden
23786c1f5e bump ruff and do fixes (#2375) 2023-05-05 14:43:23 -08:00
Sören
4b426ddf2f Remove all sqlalchemy lazy-loading from app (#2260)
* Remove some implicit lazy-loads from user serialization

* implement full backup restore across different database versions

* rework all custom getter dicts to not leak lazy loads

* remove some occurances of lazy-loading

* remove a lot of lazy loading from recipes

* add more eager loading
remove loading options from repository
remove raiseload for checking

* fix failing test

* do not apply loader options for paging counts

* try using selectinload a bit more instead of joinedload

* linter fixes
2023-03-24 08:27:26 -08:00
Carter
2e6ad5da8e Feature: Add "Authentication Method" to allow existing users to sign in with LDAP (#2143)
* adds authentication method for users

* fix db migration with postgres

* tests for auth method

* update migration ids

* hide auth method on user creation form

* (docs): Added documentation for the new authentication method

* update migration

* add  to auto-form instead of having hidden fields
2023-02-26 10:12:16 -09:00
Michael Genson
a6c46a7420 Feature: Shopping List Label Section Improvements (#2090)
* added backend for shopping list label config

* updated codegen

* refactored shopping list ops to service
removed unique contraint
removed label settings from main route/schema
added new route for label settings

* codegen

* made sure label settings output in position order

* implemented submenu for label order drag and drop

* removed redundant label and tweaked formatting

* added view by label to user preferences

* made items draggable within each label section

* moved reorder labels to its own button

* made dialog scrollable

* fixed broken model

* refactored labels to use a service
moved shopping list label logic to service
modified label seeder to use service

* added tests

* fix for first label missing the tag icon

* fixed wrong mapped type

* added statement to create existing relationships

* fix restore test, maybe
2023-02-21 18:58:41 -09:00
Sören
6a5f9d7f6b feat: diacritic-insensitive search (#2132)
* add normalized columns and use them for search

* add migration to fill all normalized columns
2023-02-19 15:40:18 -09:00
Hayden
71f8c1066a feat: server side search (#2112) (#2117)
* feat: server side search API (#2112)

* refactor repository_recipes filter building

* add food filter to recipe repository page_all

* fix query type annotations

* working search

* add tests and make sure title matches are ordered correctly

* remove instruction matching again

* fix formatting and small issues

* fix another linting error

* make search test no rely on actual words

* fix failing postgres compiled query

* revise incorrectly ordered migration

* automatically extract latest migration version

* test migration orderes

* run type generators

* new search function

* wip: new search page

* sortable field options

* fix virtual scroll issue

* fix search casing bug

* finalize search filters/sorts

* remove old composable

* fix type errors

---------

Co-authored-by: Sören <fleshgolem@gmx.net>
2023-02-11 21:26:10 -09:00