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

WIP: Use poetry for dependency management #552

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip list
pip install poetry
poetry install
poetry show
- name: Run black checks
run: black . --check --diff
run: poetry run black . --check --diff
weiji14 marked this conversation as resolved.
Show resolved Hide resolved

flake8:
name: flake8
runs-on: ubuntu-latest
Expand All @@ -36,13 +37,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip list
pip install poetry
poetry install
poetry show
- name: Run flake8 checks
run: flake8
run: poetry run flake8

isort:
name: isort
runs-on: ubuntu-latest
Expand All @@ -53,13 +55,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip list
pip install poetry
poetry install
poetry show
- name: Run isort checks
run: isort . --check --diff
run: poetry run isort . --check --diff

pydocstyle:
name: pydocstyle
runs-on: ubuntu-latest
Expand All @@ -70,13 +73,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip list
pip install poetry
poetry install
poetry show
- name: Run pydocstyle checks
run: pydocstyle
run: poetry run pydocstyle

pyupgrade:
name: pyupgrade
runs-on: ubuntu-latest
Expand All @@ -87,10 +91,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[style]
pip list
pip install poetry
poetry install
poetry show
- name: Run pyupgrade checks
run: pyupgrade --py37-plus $(find . -name "*.py")
run: poetry run pyupgrade --py37-plus $(find . -name "*.py")
19 changes: 10 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip list
pip install poetry
poetry install
poetry show
- name: Run mypy checks
run: mypy .
run: poetry run mypy .

pytest:
name: pytest
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -61,11 +62,11 @@ jobs:
conda list
conda info
if: ${{ runner.os == 'Windows' }}
- name: Install pip dependencies
- name: Install pip dependencies via poetry
run: |
pip install --pre 'rasterio>=1.0.16'
pip install .[datasets,tests]
pip list
pip install poetry
poetry install --extras "datasets"
poetry show
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
- name: Report coverage
Expand Down
Loading