Skip to content

Commit 5216c93

Browse files
Merge pull request #156 from WFP-VAM/v1.0rc
Release version 1.0
2 parents 74e3805 + 080d32f commit 5216c93

Some content is hidden

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

71 files changed

+6406
-7997
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- dev
7+
pull_request:
8+
branches:
9+
- master
10+
- dev
11+
12+
jobs:
13+
build_and_test:
14+
runs-on: ubuntu-18.04
15+
strategy:
16+
matrix:
17+
python-version: [3.6, 3.7, 3.8, 3.9]
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: install dependencies
25+
run: |
26+
sudo add-apt-repository ppa:ubuntugis/ppa
27+
sudo apt-get update && sudo apt-get install -y libgdal-dev
28+
pip install cython numpy
29+
- name: build gdal
30+
run: pip install gdal==$(gdal-config --version)
31+
- name: build
32+
run: pip install $GITHUB_WORKSPACE
33+
- name: test
34+
run: python $GITHUB_WORKSPACE/setup.py test

.github/workflows/docker.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish Docker image
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
push_to_registry:
8+
name: Push Docker image to GitHub Packages
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the repo
12+
uses: actions/checkout@v2
13+
- name: Push to GitHub Packages
14+
uses: docker/build-push-action@v1
15+
with:
16+
username: ${{ github.actor }}
17+
password: ${{ secrets.GITHUB_TOKEN }}
18+
registry: docker.pkg.github.com
19+
repository: wfp-vam/modape/modape
20+
tag_with_ref: true

.github/workflows/wheels.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build_wheels:
9+
name: Build wheels
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-python@v2
16+
17+
- name: Install cibuildwheel
18+
run: python -m pip install cibuildwheel==1.10.0
19+
20+
- name: Build wheels
21+
run: python -m cibuildwheel --output-dir wheelhouse
22+
env:
23+
CIBW_BEFORE_BUILD: "pip install cython numpy"
24+
CIBW_BUILD: "{cp,pp}3*-*"
25+
CIBW_SKIP: "cp35-* *-manylinux_i686"
26+
27+
- uses: actions/upload-artifact@v2
28+
with:
29+
path: ./wheelhouse/*.whl
30+
31+
build_sdist:
32+
name: Build source distribution
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- uses: actions/setup-python@v2
38+
name: Install Python
39+
with:
40+
python-version: '3.8'
41+
42+
- name: Install dependencies
43+
run: python -m pip install numpy cython
44+
45+
- name: Build sdist
46+
run: python setup.py sdist
47+
48+
- uses: actions/upload-artifact@v2
49+
with:
50+
path: dist/*.tar.gz
51+
52+
upload_pypi:
53+
needs: [build_wheels, build_sdist]
54+
runs-on: ubuntu-latest
55+
if: github.event_name == 'release' && github.event.action == 'published'
56+
steps:
57+
- uses: actions/download-artifact@v2
58+
with:
59+
name: artifact
60+
path: dist
61+
62+
- uses: pypa/gh-action-pypi-publish@master
63+
with:
64+
user: __token__
65+
password: ${{ secrets.PYPI_API_TOKEN }}
66+
repository_url: https://pypi.org/legacy/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,5 @@ ENV/
103103
# cred files
104104
wsmtk.cred.pkl
105105
wsmtk.key.pkl
106+
107+
docenv/*

.pylintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ disable=too-many-instance-attributes,
7070
too-many-arguments,
7171
too-many-locals,
7272
attribute-defined-outside-init,
73-
no-self-use
73+
no-self-use,
74+
C0411
7475

7576

7677
# Enable the message, report, category or checker with the given id(s). You can
@@ -491,7 +492,7 @@ valid-metaclass-classmethod-first-arg=cls
491492
[DESIGN]
492493

493494
# Maximum number of arguments for function / method.
494-
max-args=5
495+
max-args=25
495496

496497
# Maximum number of attributes for a class (see R0902).
497498
max-attributes=7

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

CHANGES.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# CHANGES
22

3+
- ## v 1.0
4+
- #### v 1.0.0
5+
- New Dockerfile (fix #82)
6+
- Improved downloading based on python requests #93
7+
- Better catching of failed downloads #29
8+
- new executable script
9+
- add option for matching start time stamp #123
10+
- allows downloading all available data from NASA CMR #86
11+
- adds option to fail if target directory is not empty #90
12+
- robust downloading checking file size and checksum #138
13+
- Reworked collection into MODIS raw HDF5 (#98)
14+
- new executable script
15+
- new `io` module with HDF5Base class
16+
- reworked `ModisRawH5` class with inheritance from HDF5Base
17+
- enable cleanup of collected HDF files with tracefile (#91)
18+
- enable check on last_collected
19+
- fail on collection of corrupt HDF files with possible override #151
20+
- Reworked smoothing of raw HDF5 files (#100)
21+
- new executable script
22+
- reworked `ModisSmoothH5` class with inheritance from HDF5Base and single smoothing method which covers all Whittaker options
23+
- enable check on last_collected
24+
- fail if smoothing from non-initialized sgrid is requested (#80)
25+
- Reworked mosaicing to GeoTiff from HDF5 (#104)
26+
- new executable script
27+
- reworked `ModisMosaic` leveraging `gdal` VRT and in-memory rasters for performing the mosaicing
28+
- Warping can now be performed to user defined target spatial reference instead of just EPSG:4326
29+
- Optional clipping is now performed after warp, generating coherent results independent of the medthod (#85)
30+
- Improved control over gdal's `creationOptions`, including ability to pass kwargs directly to `gdal.Translate` (#89)
31+
- Optional clipping to valid data range or MODIS NDVI and LST (#88)
32+
- Optional rounding of integers to exponents of 10 (#88)
33+
- Reworked `csv_smooth.py`
34+
- New executable script
35+
- fix #83
36+
337
- ## v 0.3
438
- #### v 0.3.0:
539
- Split `modis.py` into separate sub-modules

Dockerfile

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
FROM continuumio/miniconda3
1+
FROM ubuntu:bionic
22

33
LABEL maintainer="[email protected]"
44

5-
ENV CONDA_ENV_PATH /opt/conda/envs/
6-
ENV CONDA_ENV "python36"
7-
ENV CPL_ZIP_ENCODING UTF-8
5+
ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt \
6+
LC_ALL=C.UTF-8 \
7+
LANG=C.UTF-8
88

9-
RUN conda install -y python=3.6
9+
RUN apt-get update && apt-get install -y \
10+
gcc \
11+
build-essential \
12+
aria2 \
13+
software-properties-common \
14+
python3 \
15+
python3-dev \
16+
python3-pip \
17+
&& rm -rf /var/lib/apt/lists/*
1018

11-
RUN apt-get update && apt-get install -y vim gcc build-essential aria2
19+
RUN add-apt-repository ppa:ubuntugis/ppa
1220

13-
RUN useradd -m worker
21+
RUN apt-get update && apt-get install -y \
22+
gdal-bin \
23+
python3-gdal \
24+
&& rm -rf /var/lib/apt/lists/*
1425

15-
RUN conda install -y \
16-
pip h5py gdal
26+
RUN apt-get update && apt-get install -y libpq-dev \
27+
&& rm -rf /var/lib/apt/lists/*
1728

18-
RUN conda clean -y -t
29+
RUN python3 -m pip install cython
1930

31+
RUN useradd -m worker
2032
ADD . /home/worker
2133
WORKDIR /home/worker
2234

23-
RUN python setup.py install
24-
RUN python setup.py test
35+
RUN pip3 install .
36+
RUN python3 setup.py test
2537

2638
RUN rm -rf *
2739

2840
USER worker
2941

30-
CMD ["/bin/bash"]
42+
CMD ["modape_version"]

0 commit comments

Comments
 (0)