Skip to content

Commit

Permalink
Merge pull request #235 from raphaelrpl/b-0.8
Browse files Browse the repository at this point in the history
Fix bugs related with 0.8.0; Landsat publish and setup dependencies (…
  • Loading branch information
raphaelrpl authored May 7, 2021
2 parents f080920 + 6a42a0b commit 8b36edc
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Changes
=======


Version 0.8.1 (2021-05-07)
--------------------------

- Fix dependency resolver for Docker images.
- Fix PosixPath entry while publish Landsat files `234 <https://github.com/brazil-data-cube/bdc-collection-builder/issues/234>`_.


Version 0.8.0 (2021-05-04)
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions bdc_collection_builder/celery/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def publish_collection(scene_id: str, data: BaseCollection, collection: Collecti

geom = convex_hull = None

is_compressed = file.endswith('.zip') or file.endswith('.tar.gz')
is_compressed = str(file).endswith('.zip') or str(file).endswith('.tar.gz')

if is_compressed:
destination = data.compressed_file(collection).parent
Expand Down Expand Up @@ -253,7 +253,7 @@ def publish_collection(scene_id: str, data: BaseCollection, collection: Collecti

tile_id = data.parser.tile_id()

if file.endswith('.hdf'):
if str(file).endswith('.hdf'):
from ..collections.hdf import to_geotiff

opts = dict(prefix=Config.CUBES_DATA_DIR)
Expand Down
2 changes: 1 addition & 1 deletion bdc_collection_builder/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def radcor(cls, args: dict):
cloud = float(args['cloud'])
action = args.get('action', 'preview')

collections = Collection.query().filter(Collection.collection_type == 'collection').all()
collections = Collection.query().filter(Collection.collection_type.in_(['collection', 'cube'])).all()

# TODO: Review this code. The collection name is not unique anymore.
collections_map = {f'{c.name}-{c.version}': c.id for c in collections}
Expand Down
2 changes: 1 addition & 1 deletion bdc_collection_builder/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"""


__version__ = '0.8.0'
__version__ = '0.8.1'
13 changes: 6 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM registry.dpi.inpe.br/brazildatacube/geo:0.2
FROM osgeo/gdal:ubuntu-full-3.2.1

ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

ADD . /app

WORKDIR /app

RUN apt-get update && \
apt-get install --yes nano && \
apt-get install --yes nano python3-pip git pkg-config cmake libtool autoconf && \
pip3 install pip --upgrade && \
rm -rf /var/lib/apt/lists/*

ADD . /app

WORKDIR /app

RUN pip install wheel && \
pip install gdal==2.4.0 && \
pip install pymodis && \
pip install -e .[all]
3 changes: 2 additions & 1 deletion docker/Dockerfile.atm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM osgeo/gdal:ubuntu-full-3.2.1

ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
Expand All @@ -17,6 +17,7 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
docker-ce-cli \
git \
python3 \
pkg-config cmake libtool autoconf \
python3-pip \
nano && \
rm -rf /var/lib/apt/lists/*
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@
'docutils>=0.10,<0.15'
'Flask>=1.1.1',
'marshmallow-sqlalchemy>=0.19.0',
'rasterio>=1.1.2',
'rasterio>=1.1.2,<1.2',
'rio-cogeo>=1.1,<2',
'numpy>=1.17.2',
'numpngw>=0.0.8',
'scikit-image>=0.16.2',
'SQLAlchemy[postgresql_psycopg2binary]>=1.3,<2',
'SQLAlchemy[postgresql_psycopg2binary]>=1.3,<1.4',
'bdc-collectors @ git+git://github.com/brazil-data-cube/bdc-collectors.git@v0.4.0#egg=bdc-collectors',
'celery[librabbitmq]>=4.3,<4.4.3',
'python-dateutil>=2,<3',
'Werkzeug>=0.16,<1.0',
'shapely>=1.7,<2'
]
Expand Down

0 comments on commit 8b36edc

Please sign in to comment.