-
-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add NEVER_UNIT automation #2432
Conversation
…lanner. delete method deletes all records for testing the auto planner.
… no longer deletes all records for testing the auto planner.
cookbook/helper/ingredient_parser.py
Outdated
ingredient = re.sub(rf"\b({rule[0]}) ({rule[1]})\b", r"\2 \1", ingredient) | ||
|
||
else: | ||
for rule in Automation.objects.filter(space=self.request.space, type=Automation.TRANSPOSE_WORDS, disabled=False).order_by('order'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this hits the database for every ingredient parsed and might also execute extremly large amounts of regex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would only occur if not cached - I can take that out and have it so the rule never runs if the cache doesn't exist. Or do you thoughts on another way to limit it?
@@ -68,6 +68,17 @@ You can also create them manually by setting the following | |||
These rules are processed whenever you are importing recipes from websites or other apps | |||
and when using the simple ingredient input (shopping, recipe editor, ...). | |||
|
|||
## Transpose Words |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there also documentation for never unit ? or is that the same as transpose words?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are both there...
Bumps [bleach](https://github.com/mozilla/bleach) from 5.0.1 to 6.0.0. - [Release notes](https://github.com/mozilla/bleach/releases) - [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES) - [Commits](mozilla/bleach@v5.0.1...v6.0.0) --- updated-dependencies: - dependency-name: bleach dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
|
||
# if amount and unit are connected add space in between | ||
if re.match('([0-9])+([A-z])+\s', ingredient): | ||
if re.match('([0-9])+([A-z])+\\s', ingredient): |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range
# Conflicts: # vue/src/apps/MealPlanView/MealPlanView.vue
…ways be the current day.
…l plan if it has no keywords. Added debug buttons to help with testing.
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.1.6. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/commits) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Expose food description in food form
fixed rating sort order and updated tests
Changed remote auth var-name in env, info in docs and processing in settings
…hown. User-level default added to settings
…dients Added option: Hide step ingredients
ok so finally got this merged, thanks for your patience. I think one of the next things we need to do with automations is write some more/proper tests because i am slowly loosing oversight but other than that everything seems to be correct. |
No description provided.