Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
27 changes: 6 additions & 21 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,33 @@ on:
pull_request:

jobs:
build:
name: docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Execute linters and test suites
run: ./docker/cibuild
- name: Upload All coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
python-matrix:
name: python-matrix
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.9"]
defaults:
run:
shell: bash -l {0}
shell: bash -el {0}
steps:
- uses: actions/checkout@v2
- name: Set up conda cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('**/environment.yml') }}
restore-keys: ${{ runner.os }}-conda-
- name: Set up pip cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg', '**/requirements-dev.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Set up Conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Update Conda's environemnt
run: conda env update -f environment.yml -n test
environment-file: environment.yml
- name: Execute linters and test suites
run: ./scripts/cibuild
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.19.0
hooks:
- id: mypy
args:
Expand All @@ -32,6 +32,7 @@ repos:
- types-requests
- types-setuptools
- stactools
- pytest
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: stactools-modis
channels:
- conda-forge
- defaults
dependencies:
- python = 3.9
- python >= 3.9
- gdal >= 3.5.2
- libgdal-hdf4
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-multihash.*]
ignore_missing_imports = True
ignore_missing_imports = True
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ pre-commit
pytest
pytest-cov
types-setuptools
requests
setuptools
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ url = https://github.com/stactools-modis/stactools-modis
project_urls =
Documentation = https://stactools-modis.readthedocs.io/en/latest/
Issues = https://github.com/stactools-modis/stactools-modis/issues
keywords =
keywords =
stactools
pystac
catalog
Expand All @@ -19,8 +19,6 @@ keywords =
classifiers =
Development Status :: 4 - Beta
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

[options]
Expand Down
2 changes: 1 addition & 1 deletion src/stactools/modis/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_exception(xpath: str) -> Exception:

if qa_percent_cloud_cover and qa_percent_not_produced_cloud is None:
assert len(set(qa_percent_cloud_cover.values())) == 1, (
f"Mutiple, different 'qa_percent_cloud_cover' values exist "
f"Multiple, different 'qa_percent_cloud_cover' values exist "
f"in href={href}. This is not supported at this time."
)
qa_percent_not_produced_cloud = next(iter(qa_percent_cloud_cover.values()))
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ def create_external_data_dict() -> Dict[str, Dict[str, Any]]:

external_data = create_external_data_dict()

test_data = TestData(__file__, external_data=external_data)
test_data = TestData(__file__, external_data=external_data) # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-12Q1-006"
}
1 change: 0 additions & 1 deletion tests/data-files/expected/MCD12Q1/006/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@
}
},
"license": "proprietary",
"keywords": [],
"providers": [
{
"name": "NASA LP DAAC at the USGS EROS Center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,52 @@
-27.266667
],
[
-180.0,
-20.0
],
[
-170.268444,
-20.0
-178.596668,
-26.379167
],
[
-170.780379,
-20.466667
-177.268567,
-25.5
],
[
-171.316335,
-20.941667
-175.977753,
-24.604167
],
[
-171.852812,
-21.404167
-174.742432,
-23.704167
],
[
-172.40393,
-21.866667
-173.550944,
-22.791667
],
[
-172.9699,
-22.329167
],
[
-173.550944,
-22.791667
-172.40393,
-21.866667
],
[
-174.742432,
-23.704167
-171.852812,
-21.404167
],
[
-175.977753,
-24.604167
-171.316335,
-20.941667
],
[
-177.268567,
-25.5
-170.780379,
-20.466667
],
[
-178.596668,
-26.379167
-170.268444,
-20.0
],
[
-180.0,
-20.0
],
[
-180.0,
Expand Down Expand Up @@ -125,7 +125,7 @@
-20.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-15A2H-061"
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
-10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-15A3H-061"
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
50.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-43A4-006"
}
3 changes: 1 addition & 2 deletions tests/data-files/expected/MCD43A4/006/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"stac_extensions": [
"https://stac-extensions.github.io/classification/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
],
Expand Down Expand Up @@ -427,7 +427,6 @@
}
},
"license": "proprietary",
"keywords": [],
"providers": [
{
"name": "NASA LP DAAC at the USGS EROS Center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
-10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-43A4-061"
}
2 changes: 1 addition & 1 deletion tests/data-files/expected/MCD43A4/061/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
],
"stac_extensions": [
"https://stac-extensions.github.io/classification/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://stac-extensions.github.io/scientific/v1.0.0/schema.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
30.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-64A1-061"
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
-10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-09A1-061"
}
2 changes: 1 addition & 1 deletion tests/data-files/expected/MOD09A1/061/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://stac-extensions.github.io/scientific/v1.0.0/schema.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
-10.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-09Q1-061"
}
2 changes: 1 addition & 1 deletion tests/data-files/expected/MOD09Q1/061/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://stac-extensions.github.io/scientific/v1.0.0/schema.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
40.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-10A1-006"
}
1 change: 0 additions & 1 deletion tests/data-files/expected/MOD10A1/006/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
}
},
"license": "proprietary",
"keywords": [],
"providers": [
{
"name": "NASA NSIDC DAAC at CIRES",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
40.0
],
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
],
"collection": "modis-10A1-061"
}
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@
40.0
],
"stac_extensions": [
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
"https://stac-extensions.github.io/classification/v1.0.0/schema.json"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@
40.0
],
"stac_extensions": [
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.1.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json"
]
}
Loading
Loading