Skip to content

Commit 14fe14b

Browse files
committed
Merge branch 'release/0.10.0-RC1'
2 parents 10885ed + 9f91ae2 commit 14fe14b

File tree

314 files changed

+7268
-5637
lines changed

Some content is hidden

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

314 files changed

+7268
-5637
lines changed

.circleci/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!requirements-conda.txt
3+
!fix-permissions

.circleci/Dockerfile

Lines changed: 19 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,35 @@
1-
FROM circleci/openjdk:8-jdk
2-
3-
ENV MINICONDA_VERSION=4.8.2 \
4-
MINICONDA_MD5=87e77f097f6ebb5127c77662dfc3165e \
5-
CONDA_VERSION=4.8.2 \
6-
CONDA_DIR=/opt/conda \
7-
PYTHON_VERSION=3.7.7
1+
FROM circleci/openjdk:11-jdk
2+
#LABEL org.opencontainers.image.source=https://github.com/locationtech/rasterframes
83

94
USER root
105

11-
ENV PATH=$CONDA_DIR/bin:$PATH
12-
13-
# circleci is 3434
14-
COPY --chown=3434:3434 fix-permissions /tmp
15-
6+
# See: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html
167
RUN \
17-
apt-get update && \
18-
apt-get install -yq --no-install-recommends \
19-
sudo \
20-
wget \
21-
bzip2 \
22-
file \
23-
libtinfo5 \
24-
ca-certificates \
25-
gettext-base \
26-
locales && \
27-
apt-get clean && \
28-
rm -rf /var/lib/apt/lists/*
8+
curl -s https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
9+
install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \
10+
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \
11+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list
2912

3013
RUN \
31-
cd /tmp && \
32-
mkdir -p $CONDA_DIR && \
33-
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \
34-
echo "${MINICONDA_MD5} *Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - && \
35-
/bin/bash Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
36-
rm Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \
37-
conda config --system --set auto_update_conda false && \
38-
conda config --system --set show_channel_urls true && \
39-
conda config --system --set channel_priority strict && \
40-
if [ ! $PYTHON_VERSION = 'default' ]; then conda install --yes python=$PYTHON_VERSION; fi && \
41-
conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \
42-
conda install --quiet --yes conda && \
43-
conda install --quiet --yes pip && \
44-
pip config set global.progress_bar off && \
45-
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \
46-
conda clean --all --force-pkgs-dirs --yes --quiet && \
47-
sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null
14+
apt-get update && \
15+
apt-get install -yq --no-install-recommends conda && \
16+
apt-get clean && \
17+
rm -rf /var/lib/apt/lists/*
4818

49-
COPY requirements-conda.txt /tmp/
19+
ENV CONDA_DIR=/opt/conda
20+
ENV PATH=$CONDA_DIR/bin:$PATH
5021

22+
COPY requirements-conda.txt fix-permissions /tmp
5123
RUN \
52-
conda install --channel conda-forge --no-channel-priority --freeze-installed \
53-
--file /tmp/requirements-conda.txt && \
24+
conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \
25+
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \
26+
ldconfig && \
5427
conda clean --all --force-pkgs-dirs --yes --quiet && \
55-
sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null && \
56-
ldconfig 2> /dev/null
28+
sh /tmp/fix-permissions $CONDA_DIR
29+
5730

5831
# Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415
5932
ENV PROJ_LIB=/opt/conda/share/proj
6033

6134
USER 3434
62-
6335
WORKDIR /home/circleci

.circleci/Makefile

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
1-
IMAGE_NAME=miniconda-gdal
2-
VERSION=latest
3-
HOST=docker.pkg.github.com
4-
REPO=${HOST}/locationtech/rasterframes
5-
FULL_NAME=${REPO}/${IMAGE_NAME}:${VERSION}
1+
IMAGE_NAME=circleci-openjdk-conda-gdal
2+
SHA=$(shell git log -n1 --format=format:"%H" | cut -c 1-7)
3+
VERSION?=$(SHA)
4+
HOST=docker.io
5+
REPO=$(HOST)/s22s
6+
FULL_NAME=$(REPO)/$(IMAGE_NAME):$(VERSION)
67

7-
all: build login push
8+
.DEFAULT_GOAL := help
9+
help:
10+
# http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
11+
@echo "Usage: make [target]"
12+
@echo "Targets: "
13+
@grep -E '^[a-zA-Z0-9_%/-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\t\033[36m%-20s\033[0m %s\n", $$1, $$2}'
814

9-
build:
15+
all: build push ## Build and then push image
16+
17+
build: ## Build the docker image
1018
docker build . -t ${FULL_NAME}
1119

12-
login:
13-
docker login ${HOST}
20+
login: ## Login to the docker registry
21+
docker login
1422

15-
push:
23+
push: login ## Push docker image to registry
1624
docker push ${FULL_NAME}
1725

18-
shell: build
26+
run: build ## Build image and launch shell
1927
docker run --rm -it ${FULL_NAME} bash

.circleci/config.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ orbs:
66
executors:
77
default:
88
docker:
9-
- image: s22s/miniconda-gdal:latest
9+
- image: s22s/circleci-openjdk-conda-gdal:b8e30ee
1010
working_directory: ~/repo
1111
environment:
12-
SBT_VERSION: 1.3.8
13-
SBT_OPTS: -Xmx768m
12+
SBT_OPTS: "-Xms32M -Xmx2G -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"
1413
commands:
1514
setup:
1615
description: Setup for sbt build
@@ -24,8 +23,7 @@ orbs:
2423
steps:
2524
- run:
2625
name: "Compile Scala via sbt"
27-
command: |-
28-
sbt -v -batch compile test:compile it:compile
26+
command: sbt -v -batch compile test:compile it:compile
2927

3028
python:
3129
commands:
@@ -60,6 +58,7 @@ orbs:
6058
mkdir -p /tmp/core_dumps
6159
ls -lh /tmp
6260
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
61+
cp core/* /tmp/core_dumps/ 2> /dev/null || true
6362
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps 2> /dev/null || true
6463
when: on_fail
6564

@@ -125,24 +124,23 @@ jobs:
125124

126125
- run:
127126
name: "Scala Tests: core"
128-
command: sbt -batch core/test
127+
command: sbt -v -batch core/test
129128

130129
- run:
131130
name: "Scala Tests: datasource"
132-
command: sbt -batch datasource/test
131+
command: sbt -v -batch datasource/test
133132

134133
- run:
135134
name: "Scala Tests: experimental"
136-
command: sbt -batch experimental/test
135+
command: sbt -v -batch experimental/test
137136

138137
- run:
139138
name: "Create PyRasterFrames package"
140-
command: |-
141-
sbt -v -batch pyrasterframes/package
139+
command: sbt -v -batch pyrasterframes/package
142140

143141
- run:
144142
name: "Python Tests"
145-
command: sbt -batch pyrasterframes/test
143+
command: sbt -v -batch pyrasterframes/test
146144

147145
- rasterframes/save-artifacts
148146
- rasterframes/save-cache
@@ -237,10 +235,10 @@ workflows:
237235
- /fix\/.*docs.*/
238236
- /docs\/.*/
239237

240-
nightly:
238+
weekly:
241239
triggers:
242240
- schedule:
243-
cron: "0 8 * * *"
241+
cron: "0 8 4 * *"
244242
filters:
245243
branches:
246244
only:
@@ -249,4 +247,3 @@ workflows:
249247
- test
250248
- it
251249
- it-no-gdal
252-
- docs

.circleci/fix-permissions

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
#!/usr/bin/env bash
2-
# set permissions on a directory
3-
# after any installation, if a directory needs to be (human) user-writable,
4-
# run this script on it.
5-
# It will make everything in the directory owned by the group $NB_GID
6-
# and writable by that group.
7-
# Deployments that want to set a specific user id can preserve permissions
8-
# by adding the `--group-add users` line to `docker run`.
9-
10-
# uses find to avoid touching files that already have the right permissions,
11-
# which would cause massive image explosion
12-
13-
# right permissions are:
14-
# group=$NB_GID
15-
# AND permissions include group rwX (directory-execute)
16-
# AND directories have setuid,setgid bits set
172

183
set -e
194

.circleci/requirements-conda.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
gdal==2.4.4
1+
python==3.8
2+
gdal==3.1.2
23
libspatialindex
4+
rasterio[s3]
35
rtree

.github/workflows/build-test.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches: ['**']
6+
push:
7+
branches: ['master', 'develop', 'release/*']
8+
tags: [v*]
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: s22s/circleci-openjdk-conda-gdal:b8e30ee
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- uses: coursier/cache-action@v6
23+
- uses: olafurpg/setup-scala@v13
24+
with:
25+
java-version: [email protected]
26+
27+
- name: Set up Python 3.8
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.8
31+
32+
- name: Install Conda dependencies
33+
run: |
34+
# $CONDA is an environment variable pointing to the root of the miniconda directory
35+
$CONDA/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt
36+
37+
- run: ulimit -c unlimited -S
38+
39+
# Do just the compilation stage to minimize sbt memory footprint
40+
- name: Compile
41+
run: sbt -v -batch compile test:compile it:compile
42+
43+
- name: Core tests
44+
run: sbt -batch core/test
45+
46+
- name: Datasource tests
47+
run: sbt -batch datasource/test
48+
49+
- name: Experimental tests
50+
run: sbt -batch experimental/test
51+
52+
- name: Create PyRasterFrames package
53+
run: sbt -v -batch pyrasterframes/package
54+
55+
- name: Python tests
56+
run: sbt -batch pyrasterframes/test
57+
58+
- name: Collect artifacts
59+
if: ${{ failure() }}
60+
run: |
61+
mkdir -p /tmp/core_dumps
62+
ls -lh /tmp
63+
cp core.* *.hs /tmp/core_dumps/ 2> /dev/null || true
64+
cp ./core/*.log /tmp/core_dumps/ 2> /dev/null || true
65+
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps/ 2> /dev/null || true
66+
cp repo/core/core/* /tmp/core_dumps/ 2> /dev/null || true
67+
68+
- name: Upload core dumps
69+
if: ${{ failure() }}
70+
uses: actions/upload-artifact@v2
71+
with:
72+
name: core-dumps
73+
path: /tmp/core_dumps
74+
75+
docs:
76+
runs-on: ubuntu-latest
77+
container:
78+
image: s22s/circleci-openjdk-conda-gdal:b8e30ee
79+
80+
steps:
81+
- uses: actions/checkout@v2
82+
with:
83+
fetch-depth: 0
84+
- uses: coursier/cache-action@v6
85+
- uses: olafurpg/setup-scala@v13
86+
with:
87+
java-version: [email protected]
88+
89+
- name: Set up Python 3.8
90+
uses: actions/setup-python@v2
91+
with:
92+
python-version: 3.8
93+
94+
- name: Install Conda dependencies
95+
run: |
96+
# $CONDA is an environment variable pointing to the root of the miniconda directory
97+
$CONDA/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt
98+
99+
- run: ulimit -c unlimited -S
100+
101+
- name: Build documentation
102+
run: sbt makeSite
103+
104+
- name: Collect artifacts
105+
if: ${{ failure() }}
106+
run: |
107+
mkdir -p /tmp/core_dumps
108+
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
109+
mkdir -p /tmp/markdown
110+
cp pyrasterframes/target/python/docs/*.md /tmp/markdown 2> /dev/null || true
111+
112+
- name: Upload core dumps
113+
if: ${{ failure() }}
114+
uses: actions/upload-artifact@v2
115+
with:
116+
name: core-dumps
117+
path: /tmp/core_dumps
118+
119+
- name: Upload markdown
120+
if: ${{ failure() }}
121+
uses: actions/upload-artifact@v2
122+
with:
123+
name: markdown
124+
path: /tmp/markdown
125+
126+
- name: Upload rf-site
127+
if: ${{ failure() }}
128+
uses: actions/upload-artifact@v2
129+
with:
130+
name: rf-site
131+
path: docs/target/site

0 commit comments

Comments
 (0)