-
-
Notifications
You must be signed in to change notification settings - Fork 752
Bugfix/cookbookapp import #4322
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
base: develop
Are you sure you want to change the base?
Conversation
| "ms-python.flake8", | ||
| "ms-python.isort", | ||
| "eeyore.yapf" |
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.
Without these, vscode won't autoformat on save, unless the extensions are present in the environment.
| choices=((DEFAULT, _('Default')), (PAPRIKA, 'Paprika'), (NEXTCLOUD, 'Nextcloud Cookbook'), (MEALIE, 'Mealie'), (MEALIE1, 'Mealie1'), (CHOWDOWN, 'Chowdown'), | ||
| (SAFFRON, 'Saffron'), (CHEFTAP, 'ChefTap'), (PEPPERPLATE, 'Pepperplate'), (RECETTETEK, 'RecetteTek'), (RECIPESAGE, 'Recipe Sage'), (DOMESTICA, 'Domestica'), | ||
| (MEALMASTER, 'MealMaster'), (REZKONV, 'RezKonv'), (OPENEATS, 'Openeats'), (RECIPEKEEPER, 'Recipe Keeper'), (PLANTOEAT, | ||
| 'Plantoeat'), (COOKBOOKAPP, 'CookBook Manager'), |
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.
Nothing changed in this file except for this line (isort/flake8 autoformatting)
|
|
||
| # Configs | ||
| vetur.config.js | ||
| .venv/ |
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.
Added some commonly used folders and files on macOS
| "experimentalTernaries": true, | ||
| "printWidth": 179, | ||
| "semi": false, | ||
| "singleQuote": true, |
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.
I noticed you prefer single quotes so I explicitly set it here. My editor defaults to double quotes.
| autopep8==2.3.2 | ||
| flake8==7.3.0 | ||
| yapf==0.40.2 | ||
| isort==7.0.0 |
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.
Added this so no need to install isort globally (also simplifies formatting in dev containers)
|
thank you, looks good on first glance, will try to get this merged with the next release if the review checks out. Regarding the tag: this is not your fault nor a fault at all because I add a unique tag to each import automatically in the base import handler. maybe at some point we can make that customizable |
Summary
This is a bugfix for the cookbookapp import, referenced by this issue.
Implementation
I basically exported my own zip file from cookbookapp, matched the schema in the yaml file, and rewrote the scraper to directly import from yaml using pyyaml. The schema is pretty loosey goosey on cookbookapps end, all fields are optional and semi-structured, so it's hard to guarantee 100% parity depending on how user's filled out their own recipes.
I also updated all references to CookbookApp to Cookbook Manager in the docs and forms. I didn't touch variable names since they are not user-facing.
Testing
I didn't write any unit tests but I did test it personally on my own 300+ recipe zipfile that I exported from my cookbookapp account.
Issues
There's one bug I can't fix, all imported recipes have a tag called
Import 5. I cannot find any references to this when using the Keyword class, no idea where it's coming from, any ideas?Out of scope changes
I noticed some quirks/nits related to linting and vscode settings, I'll point them out below, hope you don't mind.