Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into chefjeanpierre
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy committed Jan 17, 2025
2 parents 254d527 + 371a663 commit 20931f4
Show file tree
Hide file tree
Showing 289 changed files with 102,895 additions and 14,054 deletions.
13 changes: 0 additions & 13 deletions .coveragerc

This file was deleted.

41 changes: 37 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
[flake8]
# FS002 comes from pugin "flake8-use-fstring"
# and would error on `str.format()` usage
ignore = E203, E501, W503, FS002, N818
# Error codes we ignore:
#
# Ignored because Black handles code formatting:
# E203: Whitespace before ':'
# E501: Line too long (82 > 79 characters)
# W503: Line break occurred before a binary operator
#
# Other ignored rules:
# N818: Exception names should end in 'Error'
ignore =
E203,
E501,
W503,
N818

# To match Black's default
max-line-length = 88

# McCabe complexity checker
# Standard is 10, we should aim to improve
max-complexity = 21
select = B,C,E,F,N,W,T4,B9

# Selected error codes:
# B: bugbear checks
# C: complexity checks
# E: pycodestyle errors
# F: pyflakes
# N: naming checks (from pep8-naming)
# W: pycodestyle warnings
# T4: mypy type checks
select =
B,
C,
E,
F,
N,
W,
T4

exclude =
./.tox/
./.venv/
Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/1_issue_new_webiste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: New website
about: Request support for a new recipe website
title: "I'd like to request support for <website>"
labels: enhancement
assignees: ''

---

Please verify the website is not listed in: https://docs.recipe-scrapers.com/getting-started/supported-sites/

Sample recipe URLs:
- https://
- https://


-----

Optional information that helps us understand our users better:
- Which version of recipe-scrapers are you using?
- How did you discover the package?
- What's your use case for recipe-scrapers?
Feel free to delete this section.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/2_issue_website_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Scraper bug
about: Report an issue with an existing scraper
title: "Scraper issue with <website>"
labels: bug
assignees: ''

---

Recipe URL with the issue:
- https://


Which data is not being scraped correctly?
(e.g. ingredients, instructions, etc):

What should be shown instead?


-----

Optional information that helps us understand our users better:
- Which version of recipe-scrapers are you using?
- How did you discover the package?
- What's your use case for recipe-scrapers?
Feel free to delete this section.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/3_issue_show_and_tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Show and tell
about: Share what you've built using recipe-scrapers
title: "Built with recipe-scrapers: <project name>"
labels: show-and-tell
assignees: ''

---

Tell us about your project built with recipe-scrapers!

You can also share it as a comment in https://github.com/hhursev/recipe-scrapers/issues/9.

Project details:
<!-- Share whatever you're comfortable with - a description, links, screenshots, etc. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/4_issue_other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Other
about: For questions and issues that don't fit other categories
title: ""
labels: ''
assignees: ''

---


Describe your question or issue here


-----

Optional information that helps us understand our users better:
- Which version of recipe-scrapers are you using?
- How did you discover the package?
- What's your use case for recipe-scrapers?
Feel free to delete this section.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: true
blank_issues_enabled: false
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/new_scraper.md

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/scraper_bug_report.md

This file was deleted.

41 changes: 15 additions & 26 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,28 @@ name: coverage

on:
push:
branches:
- main
- v14
branches: [ main, v14 ]
pull_request:
branches:
- main
- v14
branches: [ main, v14 ]
types: [ opened, synchronize, reopened ]

jobs:
coverage:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: run unittests
run: |
pip install tox
tox -e py
- name: (coveralls.io) Report code coverage
uses: AndreMiras/coveralls-python-action@develop
python-version: "3.12"
cache: pip
- name: Install test packages
run: pip install ".[tests]"
- name: Run tests with coverage
env:
PYTHONWARNINGS: "always:::recipe_scrapers,ignore:::recipe_scrapers.plugins.static_values"
run: coverage run -m unittest
- name: Report coverage to coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: "SmlfzlVJy4ow55rduU7IU5GmmFCfAdGeq"
- if: github.event_name == 'push'
name: (codacy) Create coverage xml report
run: |
pip install coverage
coverage xml
- if: github.event_name == 'push'
name: (codacy) Report code coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: "coverage.xml"
22 changes: 10 additions & 12 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ name: linters

on:
push:
branches:
- main
- v14
branches: [ main, v14 ]
pull_request:
branches:
- main
- v14
branches: [ main, v14 ]
types: [ opened, synchronize, reopened ]

jobs:
linters:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
python-version: "3.12"
cache: pip
cache-dependency-path: .pre-commit-config.yaml
- run: pip install pre-commit
- run: pre-commit run --all-files
- name: Install linters related packages
run: pip install ".[linters]"
- name: Run pre-commit hooks
run: pre-commit run --all-files
12 changes: 8 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ on:

jobs:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/recipe-scrapers
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build the package
Expand All @@ -20,8 +26,6 @@ jobs:
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
- name: Show build version used
run: pip list | grep build
34 changes: 0 additions & 34 deletions .github/workflows/test_publish.yaml

This file was deleted.

19 changes: 7 additions & 12 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ name: unittests

on:
push:
branches:
- main
- v14
branches: [ main, v14 ]
pull_request:
branches:
- main
- v14
branches: [ main, v14 ]
types: [ opened, synchronize, reopened ]

jobs:
test:
Expand All @@ -19,16 +16,14 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: python -m pip install .[dev]
- name: Install parallel test runner
run: python -m pip install unittest-parallel
- name: Install tests dependencies
run: pip install ".[tests]"
- name: Run Tests
env:
PYTHONWARNINGS: "always:::recipe_scrapers,ignore:::recipe_scrapers.plugins.static_values"
Expand Down
Loading

0 comments on commit 20931f4

Please sign in to comment.