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

Modernization: introduce poetry as a packaging and dependency tool #654

Closed
wants to merge 8 commits into from
1 change: 1 addition & 0 deletions .flake8
Expand Up @@ -6,5 +6,6 @@ max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4,B9
exclude =
./.tox/
./.venv/
./venv/
11 changes: 2 additions & 9 deletions .github/workflows/linters.yaml
Expand Up @@ -17,12 +17,5 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: black and flake checks
run: |
black --check .
flake8 --count .
mypy recipe_scrapers tests
- run: pip install tox
- run: tox -e lint
19 changes: 6 additions & 13 deletions .github/workflows/unittests.yaml
Expand Up @@ -23,26 +23,19 @@ jobs:
python-version: "3.11.0-rc.1"
- os: windows-latest
python-version: "3.11.0-rc.1"
include:
- toxenv: py
- os: macos-latest
toxenv: py-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# The system-provided libxml2 on MacOS is typically outdated and this can lead to lxml parsing issues
# Using PyPi-provided binary wheels instead resolves this
# We are affected by https://bugs.launchpad.net/lxml/+bug/1949271 in test_wild_mode when using system-provided libxml2 on MacOS
- name: Install lxml from wheel on MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: pip install --only-binary=lxml lxml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Unittest and Coverage Report
run: |
python run_tests.py
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
# Provide code coverage reports on Linux
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: coveralls.io
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -341,7 +341,7 @@ Assuming you have ``>=python3.7`` installed, navigate to the directory where you
source .venv/bin/activate &&
pip install -r requirements-dev.txt &&
pre-commit install &&
python run_tests.py
tox -e py

In case you want to run a single unittest for a newly developed scraper

Expand Down