generated from stactools-packages/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for STAC Collections #2, add missing files
- Loading branch information
Showing
4 changed files
with
163 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from pytest import Parser | ||
|
||
|
||
def pytest_addoption(parser: Parser) -> None: | ||
parser.addoption( | ||
"--withcog", | ||
action="store_true", | ||
default=False, | ||
help="also test cog conversion (slow)", | ||
) | ||
|
||
|
||
def pytest_generate_tests(metafunc): | ||
# This is called for every test. Only get/set command line arguments | ||
# if the argument is specified in the list of test "fixturenames". | ||
option_value = metafunc.config.option.withcog | ||
if "withcog" in metafunc.fixturenames and option_value is True: | ||
metafunc.parametrize("withcog", [option_value]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
SRC_FOLDER = "./tests/data-files/" | ||
TEST_FILES = [ | ||
"C3S-LC-L4-LCCS-Map-300m-P1Y-2020-v2.1.1", | ||
"C3S-LC-L4-LCCS-Map-300m-P1Y-2016-v2.1.1", | ||
"ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7cds", | ||
"ESACCI-LC-L4-LCCS-Map-300m-P1Y-1992-v2.0.7cds", | ||
] | ||
|
||
# Collection | ||
TITLE = "ESA Climate Change Initiative Land Cover" | ||
START_DATETIME = "1992-01-01T00:00:00Z" | ||
END_DATETIME = "2020-12-31T23:59:59Z" | ||
BBOX = [-180.0, -90.0, 180.0, 90.0] | ||
|
||
# Item | ||
GEOMETRY = { | ||
"type": "Polygon", | ||
"coordinates": [[[-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90]]], | ||
} | ||
|
||
# Common | ||
GSD = 300 | ||
V1 = "2.0.7cds" | ||
V2 = "2.1.1" | ||
VERSIONS = [V1, V2] | ||
|
||
# Projection | ||
EPSG_CODE = 4326 | ||
|
||
# Scientific | ||
DOI = "10.24381/cds.006f2c9a" | ||
|
||
# Assets | ||
COG_MEDIA_TYPE = "image/tiff; application=geotiff; profile=cloud-optimized" | ||
COG_ROLES_DATA = ["data", "cloud-optimized"] | ||
COG_ROLES_QUALITY = ["quality", "cloud-optimized"] | ||
|
||
NETCDF_TITLE = "Original netCDF 4 file" | ||
NETCDF_MEDIA_TYPE = "application/netcdf" | ||
NETCDF_ROLES = ["data", "quality", "source"] | ||
NETCDF_KEY = "netcdf" | ||
|
||
DATA_VARIABLES = [ | ||
"change_count", | ||
"current_pixel_state", | ||
"lccs_class", | ||
"observation_count", | ||
"processed_flag", | ||
] | ||
|
||
TABLES = [ | ||
"current_pixel_state", | ||
"processed_flag", | ||
"lccs_class", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters