-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signification modification to unittests for the water-atcor-develop b…
…ranch (#115) * changed to include resampling of imagery and simple naming convention (grid name) in as_geo_docs() * modified normalise_band_name() to account for Sentinel-2's 8A band * extensive modifications to perform MNDWI masking and work-around for Sentinel-2's absent level-1 metadata yaml file * mndwi h5 file added for the integration tests * changes to water-atcor packaging implemented to eodatasets3/scripts/packagewagl.py * changes to water-atcor packaging applied to tests/integration/test_packagewagl.py * black formatting to eodatasets3/images.py * black formatting to eodatasets3/scripts/packagewagl.py * black formatting to eodatasets3/scripts/tostac.py * black formatting to eodatasets3/wagl.py * black formatting to tests/integration/test_packagewagl.py * reformated eodatasets3/images.py with latest version of black * reformated eodatasets3/scripts/tostac.py with latest version of black * reformatted eodatasets3/wagl.py with latest version of black * removed LC08_L1TP_092084_20160628_20170323_01_T1.yaml * removed LC80920842016180LGN01.fmask.img-luigi-tmp-8404334440.aux.xm * removed LC80920842016180LGN01.fmask.yaml * removed LC80920842016180LGN01.gqa.yaml * removed LC80920842016180LGN01.mndwi.h5 * removed LC80920842016180LGN01.tesp.yaml * removed LC80920842016180LGN01.wagl.h5 * added LC08_L1TP_091086_20141106_20170417_01_T1.odc-metadata.yaml * added LC80920842016180LGN01.fmask.img * added LC80920842016180LGN01.fmask.img-luigi-tmp-0242778241.aux.xml * added LC80920842016180LGN01.fmask.tmp..img.aux.xml * added LC80910862014310LGN01.fmask.yaml * added LC80910862014310LGN01.gqa.yaml * added LC80910862014310LGN01.mndwi.h5 * added LC80910862014310LGN01.tesp.yaml * added LC80910862014310LGN01.wagl.h5 * added LC80910862014310LGN01.fmask.img * added LC80910862014310LGN01.fmask.img-luigi-tmp-1118760197.aux.xml * added LC80910862014310LGN01.fmask.tmp..img.aux.xml * modification: naming of grids back to default for common, and RES_XX for others * modification: packaging folder hierarchy to include an additional time folder for S2A/B * modification: to package wagl-water-atcor products * modification: infer_datetime_range set to True * modification: added sh module in tests_require * modification: naming of grids * modification: code cleanup and include mndwi.h5 downsampling * modification: size_bytes to current value - fudged as this isn't used in wagl-water-atcor packaging * modification: accommodate new path names and S2A/B folder hierarchy * modification: packaging of wagl-water-atcor lambertian product * formatting: flake8 and black * formatting: flake8 and black * formatting: flake8 and black * formatting: flake8 and black * formatting: flake8 and black * Mention release process in readme And minor doc reword + correction * Update DEA naming for non-final products As requested by the C3 ARD people: interim datasets go in a different folder than final datasets. This is implemented as an expansion to the existing 'DEA' naming conventions rather than a new naming convention as it doesn't modify existing (final) products. * Don't Error if no h5py when generating thumbnails * Add bits'n'bobs to test with `make docker-test` * Allow inheriting geometry from source datasets Useful when it's potentially very expensive to do all the vector operations to determine the valid region from the data itself. * Add in a lookuptable thumbnail function * Black formatting * Fix bug in image renaming * Fix another type annotation * Resolve Jeremy's comments * Fix silly bug * Black, it's always black * Fix the makefile to rebuild before tests * Update tests, data type for singleband writer * Tighten the public stac conversion methods, expand them * Add WKT2 fallback for EO3 CRSes * Only declare stac extensions that we use * Move new stac api into a library, restore old api The old dc_to_stac function is used externally so we need to keep a shim of it for backwards compatibilty. * Clearer properties, docs, for stac api * More robust Stac schema downloads - Use one session for all downloads - Use a timeout - Keep cached items much longer when they're stable Stac versions. - Allow skipping of the cache - Allow no-network-access usage - Verbose option for users * Use stac location for measurements in legacy eo3-to-stac * Fix Travis' Python 3.6 dependencies. Cattrs removed 3.6 support, yet it's still trying to install the new version. * Consistent float handling in doc comparison * Improve, clarify stac conversion docs * Move rapidjson from test to install requires * removed LC80920842016180LGN01.mndwi.h5 * resolved flake8 issues tests/integration/test_packagewagl.py * added hdf5-tools to .travis.yml * changed filesize to pass travis-ci build. This file/test is unused in water-atcor-develop Co-authored-by: Rodrigo Garcia <rg3290@gadi-login-08.gadi.nci.org.au> Co-authored-by: Rodrigo Garcia <rg3290@gadi-login-04.gadi.nci.org.au> Co-authored-by: Jeremy Hooke <jez@stulk.com> Co-authored-by: Damien Ayers <damien@omad.net> Co-authored-by: Alex Leith <alexgleith@gmail.com> Co-authored-by: Rodrigo Garcia <rg3290@gadi-login-06.gadi.nci.org.au> Co-authored-by: Rodrigo Garcia <rg3290@gadi-login-09.gadi.nci.org.au>
- Loading branch information
1 parent
b08eade
commit 9d8f984
Showing
45 changed files
with
1,266 additions
and
681 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
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,52 @@ | ||
FROM opendatacube/geobase:wheels as env_builder | ||
ARG py_env_path=/env | ||
ARG ENVIRONMENT=test | ||
|
||
COPY requirements*.txt /tmp/ | ||
# RUN env-build-tool new /tmp/requirements.txt ${py_env_path} | ||
RUN if [ "$ENVIRONMENT" = "test" ] ; then \ | ||
env-build-tool new /tmp/requirements-test.txt ${py_env_path} ; \ | ||
else \ | ||
env-build-tool new /tmp/requirements.txt ${py_env_path} ; \ | ||
fi | ||
|
||
ENV PATH=${py_env_path}/bin:$PATH | ||
|
||
# Copy source code and install it | ||
RUN mkdir -p /code | ||
WORKDIR /code | ||
ADD . /code | ||
|
||
RUN pip install --use-feature=2020-resolver . | ||
|
||
# Build the production runner stage from here | ||
FROM opendatacube/geobase:runner | ||
|
||
ENV LC_ALL=C.UTF-8 \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
SHELL=bash | ||
|
||
COPY --from=env_builder /env /env | ||
ENV PATH=/env/bin:$PATH | ||
|
||
# # Environment can be whatever is supported by setup.py | ||
# # so, either deployment, test | ||
# ARG ENVIRONMENT=test | ||
# RUN echo "Environment is: $ENVIRONMENT" | ||
# | ||
# # Set up a nice workdir, and only copy the things we care about in | ||
# ENV APPDIR=/code | ||
# RUN mkdir -p $APPDIR | ||
# WORKDIR $APPDIR | ||
# ADD . $APPDIR | ||
# | ||
# # These ENVIRONMENT flags make this a bit complex, but basically, if we are in dev | ||
# # then we want to link the source (with the -e flag) and if we're in prod, we | ||
# # want to delete the stuff in the /code folder to keep it simple. | ||
# RUN if [ "$ENVIRONMENT" = "deployment" ] ; then rm -rf $APPDIR ; \ | ||
# else pip install --editable .[$ENVIRONMENT] ; \ | ||
# fi | ||
|
||
RUN python | ||
|
||
CMD ["python"] |
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,6 @@ | ||
|
||
.PHONY: docker-tests | ||
|
||
docker-tests: | ||
docker build -t eodatasets:test . | ||
docker run -it --rm --volume "${PWD}/tests":/tests eodatasets:test pytest --cov eodatasets --durations=5 /tests |
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
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
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
Oops, something went wrong.