Skip to content

Commit 8331358

Browse files
authored
Merge pull request #587 from locationtech/spark-3.2
Spark 3.2.1
2 parents 1e314ea + c5cf70c commit 8331358

File tree

142 files changed

+1753
-1008
lines changed

Some content is hidden

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

142 files changed

+1753
-1008
lines changed

.circleci/README.md

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

.github/disabled-workflows/build-test.yml

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

.github/image/.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

.github/image/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM adoptopenjdk/openjdk11:debian-slim
2+
3+
# See: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html
4+
RUN \
5+
apt-get update && \
6+
apt-get install -yq gpg && \
7+
curl -s https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
8+
install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \
9+
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \
10+
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 && \
11+
apt-get update && \
12+
apt-get install -yq --no-install-recommends conda && \
13+
apt-get clean && \
14+
rm -rf /var/lib/apt/lists/*
15+
16+
ENV CONDA_DIR=/opt/conda
17+
ENV PATH=$CONDA_DIR/bin:$PATH
18+
19+
COPY requirements-conda.txt /tmp
20+
RUN \
21+
conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \
22+
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \
23+
ldconfig && \
24+
conda clean --all --force-pkgs-dirs --yes --quiet
25+
26+
# Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415
27+
ENV PROJ_LIB=/opt/conda/share/proj
28+

.github/image/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
IMAGE_NAME=debian-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)
7+
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}'
14+
15+
all: build push ## Build and then push image
16+
17+
build: ## Build the docker image
18+
docker build . -t ${FULL_NAME}
19+
20+
login: ## Login to the docker registry
21+
docker login
22+
23+
push: login ## Push docker image to registry
24+
docker push ${FULL_NAME}
25+
26+
run: build ## Build image and launch shell
27+
docker run --rm -it ${FULL_NAME} bash
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
python==3.8
2+
gdal==3.1.2
3+
libspatialindex
4+
rasterio[s3]
5+
rtree

.github/workflows/build-test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches: ['**']
6+
push:
7+
branches: ['master', 'develop', 'release/*', 'spark-3.2']
8+
tags: [v*]
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- uses: coursier/cache-action@v6
21+
- name: Setup JDK
22+
uses: actions/setup-java@v3
23+
with:
24+
distribution: temurin
25+
java-version: 8
26+
cache: sbt
27+
28+
# Do just the compilation stage to minimize sbt memory footprint
29+
- name: Compile
30+
run: sbt -v -batch compile test:compile it:compile
31+
32+
- name: Core tests
33+
run: sbt -batch core/test
34+
35+
- name: Datasource tests
36+
run: sbt -batch datasource/test
37+
38+
- name: Experimental tests
39+
run: sbt -batch experimental/test
40+
41+
## TODO: Update python build to be PEP 517 compatible
42+
# - name: Install Conda dependencies
43+
# run: |
44+
# # $CONDA_DIR is an environment variable pointing to the root of the miniconda directory
45+
# $CONDA_DIR/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt
46+
# - name: Create PyRasterFrames package
47+
# run: sbt -v -batch pyrasterframes/package
48+
# - name: Python tests
49+
# run: sbt -batch pyrasterframes/test
50+
51+
- name: Collect artifacts
52+
if: ${{ failure() }}
53+
run: |
54+
mkdir -p /tmp/core_dumps
55+
ls -lh /tmp
56+
cp core.* *.hs /tmp/core_dumps/ 2> /dev/null || true
57+
cp ./core/*.log /tmp/core_dumps/ 2> /dev/null || true
58+
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps/ 2> /dev/null || true
59+
cp repo/core/core/* /tmp/core_dumps/ 2> /dev/null || true
60+
61+
- name: Upload core dumps
62+
if: ${{ failure() }}
63+
uses: actions/upload-artifact@v2
64+
with:
65+
name: core-dumps
66+
path: /tmp/core_dumps

.github/workflows/docs.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Compile documentation
2+
3+
on:
4+
workflow_dispatch:
5+
6+
pull_request:
7+
branches: ['**docs*']
8+
push:
9+
branches: ['master', 'release/*']
10+
release:
11+
types: [published]
12+
13+
jobs:
14+
docs:
15+
runs-on: ubuntu-latest
16+
container:
17+
image: s22s/debian-openjdk-conda-gdal:6790f8d
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
- uses: coursier/cache-action@v6
24+
- uses: olafurpg/setup-scala@v13
25+
with:
26+
java-version: [email protected]
27+
28+
- name: Set up Python 3.8
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: 3.8
32+
33+
- name: Install Conda dependencies
34+
run: |
35+
# $CONDA_DIR is an environment variable pointing to the root of the miniconda directory
36+
$CONDA_DIR/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt
37+
38+
- name: Build documentation
39+
run: sbt makeSite
40+
41+
- name: Collect artifacts
42+
if: ${{ failure() }}
43+
run: |
44+
mkdir -p /tmp/core_dumps
45+
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
46+
mkdir -p /tmp/markdown
47+
cp pyrasterframes/target/python/docs/*.md /tmp/markdown 2> /dev/null || true
48+
49+
- name: Upload core dumps
50+
if: ${{ failure() }}
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: core-dumps
54+
path: /tmp/core_dumps
55+
56+
- name: Upload markdown
57+
if: ${{ failure() }}
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: markdown
61+
path: /tmp/markdown
62+
63+
- name: Upload rf-site
64+
if: ${{ failure() }}
65+
uses: actions/upload-artifact@v2
66+
with:
67+
name: rf-site
68+
path: docs/target/site

.jvmopts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-Xms2g
2+
-Xmx4g

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ lazy val core = project
7878
ExclusionRule(organization = "com.github.mpilquist")
7979
),
8080
scaffeine,
81-
scalatest,
81+
sparktestingbase excludeAll ExclusionRule("org.scala-lang.modules", "scala-xml_2.12"),
8282
`scala-logging`
8383
),
8484
libraryDependencies ++= {

0 commit comments

Comments
 (0)