Skip to content

Commit 0fd30fc

Browse files
authoredOct 6, 2022
Merge pull request #490 from sentinel-hub/develop
Release version 1.3.0
2 parents 872686d + ecc8d80 commit 0fd30fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1399
-674
lines changed
 

‎.flake8

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[flake8]
2-
ignore = E203, W503
2+
ignore = E203, W503, C408
33
exclude = .git, __pycache__, build, dist
44
max-line-length= 120
55
max-complexity = 15
6+
min_python_version = 3.7.0
67
per-file-ignores =
78
# imported but unused
89
__init__.py: F401

‎.github/workflows/ci_action.yml

+40-25
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,76 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- 'master'
8-
- 'develop'
7+
- "master"
8+
- "develop"
99
schedule:
10-
- cron: '0 0 * * *'
10+
- cron: "0 0 * * *"
1111

1212
env:
1313
# The only way to simulate if-else statement
1414
CHECKOUT_BRANCH: ${{ github.event_name == 'schedule' && 'develop' || github.ref }}
1515

16-
1716
jobs:
18-
19-
check-code-black-isort-flake8:
17+
check-pre-commit-hooks:
2018
runs-on: ubuntu-latest
2119
steps:
2220
- name: Checkout branch
2321
uses: actions/checkout@v2
2422
with:
2523
ref: ${{ env.CHECKOUT_BRANCH }}
26-
24+
2725
- name: Setup Python
2826
uses: actions/setup-python@v2
2927
with:
3028
python-version: "3.8"
3129
architecture: x64
3230

33-
- name: Prepare linters
34-
run: pip install black[jupyter] isort flake8 nbqa
31+
- name: Prepare pre-commit validators
32+
run: |
33+
pip install pre-commit
3534
36-
- name: Check code compliance with black
37-
run: black . --check --diff
35+
- name: Check code compliance with pre-commit validators
36+
run: pre-commit run --all-files
3837

39-
- name: Check code compliance with isort
40-
run: |
41-
isort . --check --diff
42-
nbqa isort . --nbqa-diff
38+
check-code-pylint-and-mypy:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout branch
42+
uses: actions/checkout@v2
43+
with:
44+
ref: ${{ env.CHECKOUT_BRANCH }}
45+
46+
- name: Setup Python
47+
uses: actions/setup-python@v2
48+
with:
49+
python-version: "3.8"
50+
architecture: x64
4351

44-
- name: Check code compliance with flake8
52+
- name: Install packages
4553
run: |
46-
flake8 .
47-
nbqa flake8 . --nbqa-exclude=examples/core/CoreOverview.ipynb
54+
sudo apt-get update
55+
sudo apt-get install -y build-essential libgdal-dev graphviz proj-bin gcc libproj-dev libspatialindex-dev
56+
pip install -r requirements-dev.txt --upgrade
57+
python install_all.py -e
58+
59+
- name: Run pylint
60+
run: make pylint
61+
62+
- name: Run mypy
63+
run: mypy core/eolearn/core
4864

4965
test-on-github:
5066
runs-on: ubuntu-latest
5167
strategy:
5268
matrix:
5369
python-version:
54-
- '3.7'
55-
- '3.9'
56-
- '3.10'
57-
include:
70+
- "3.7"
71+
- "3.9"
72+
- "3.10"
73+
include:
5874
# A flag marks whether full or partial tests should be run
5975
# We don't run integration tests on pull requests from outside repos, because they don't have secrets
60-
- python-version: '3.8'
76+
- python-version: "3.8"
6177
full_test_suite: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
6278
steps:
6379
- name: Checkout branch
@@ -86,10 +102,9 @@ jobs:
86102
--sh_client_secret "${{ secrets.SH_CLIENT_SECRET }}"
87103
pytest --cov --cov-report=term --cov-report=xml
88104
89-
- name: Run pylint and reduced tests
105+
- name: Run reduced tests
90106
if: ${{ !matrix.full_test_suite }}
91107
run: |
92-
make pylint
93108
pytest -m "not sh_integration"
94109
95110
- name: Upload code coverage

0 commit comments

Comments
 (0)