Skip to content
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

Merged
merged 119 commits into from
Aug 26, 2023
Merged

Conversation

smilerz
Copy link
Collaborator

@smilerz smilerz commented Apr 24, 2023

No description provided.

AquaticLava and others added 4 commits September 4, 2022 16:31
cookbook/helper/ingredient_parser.py Show resolved Hide resolved
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'):
Copy link
Collaborator

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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] <support@github.com>
cookbook/helper/ingredient_parser.py Dismissed Show dismissed Hide dismissed
vabene1111 and others added 27 commits August 23, 2023 11:24
Changed remote auth var-name in env, info in docs and processing in settings
…dients

Added option: Hide step ingredients
@vabene1111 vabene1111 merged commit 6ba4db6 into TandoorRecipes:develop Aug 26, 2023
3 checks passed
@vabene1111
Copy link
Collaborator

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.

@smilerz smilerz deleted the new_automations branch December 2, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet