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 recipe website miljuschka.nl #1254

Merged
merged 6 commits into from
Sep 20, 2024
Merged

Add recipe website miljuschka.nl #1254

merged 6 commits into from
Sep 20, 2024

Conversation

jaspervzwi
Copy link
Contributor

No description provided.

@jknndy
Copy link
Collaborator

jknndy commented Sep 10, 2024

Hi @jaspervzwi ,

Thanks for the contribution, just a few small things to address!

  • This site has a few additional fields that we'll need to add test coverage for including category, cook_time, prep_time, cuisine, ratings, ratings_count, nutrients & keywords. All of these fields are returned through the general schema so you'll just need to update the test to include these fields.
  • This site could support ingredient groups if you're interested in adding support. No issue if not, it can be added as part of a later update.
  • And lastly, once you've had a chance to add the missing fields this library abides to a specific order for the JSON test keys. Thankfully we also offer an auto-reorder script which can be run via the command below.
python scripts/reorder_json_keys.py`

Thanks again for the contribution & let me know if you have any questions!

@jaspervzwi
Copy link
Contributor Author

Hi @jknndy,

Thanks for the feedback and tips!

I've implemented the following changes in my last commit:

  • Added the missing test fields
  • Added support for ingredient groups
  • Ordered test keys

Let me know if you have any additional call-outs

@jaspervzwi jaspervzwi closed this Sep 17, 2024
@jaspervzwi jaspervzwi reopened this Sep 17, 2024
@jknndy
Copy link
Collaborator

jknndy commented Sep 17, 2024

Just one last thing, for sites that have ingredient_groups support we like to have two test cases (one with groupings & one without) included. Usually with the naming convention...

sitename_1.json & testhtml for the case without groupings example page
sitename_2.json & testhmtl for case with. (the existing test data)

@jaspervzwi
Copy link
Contributor Author

Thanks @jknndy , I overlooked that part.

I've added the test cases for groupings.

As a quick call-out, I noticed two points in the generate.py script that were not expected behavior:

  • the 'from.. import..' statement was put all the way at the top of the init.py file, rather than a more logical alphabatically determined position (caught it and fixed it in the last commit)
  • when generating a class, the script does not take into account if one already exists. I created a duplicate class when I ran it to generate the second html & template (caught it and fixed it in the second-to-last commit)

Just minor points, but perhaps worth a check in the future.
Love the clear structure & documentation though

Copy link
Collaborator

@jknndy jknndy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I did just push a small commit adding test coverage for nutrients in test 1 & cuisine / keywords in test 2 but everything else looks great!

Thanks for the bug reports, if you'd like to open an issue with a bug report that'd be great! (no worries if not i can open one myself later this week)

It could probably be easier to tell if you've covered all of the fields that are available as part of the testing suite. I'll open another issue to research this a little more later this week too

@jaspervzwi
Copy link
Contributor Author

Thanks @jknndy I've opened a ticket in #1259

@jknndy jknndy merged commit 18ed031 into hhursev:main Sep 20, 2024
3 checks passed
arisa-s added a commit to arisa-s/recipe-scrapers that referenced this pull request Jan 6, 2025
* Add recipe website miljuschka.nl

---------

Co-authored-by: Joey <[email protected]>
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.

2 participants