Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark 3.2 #587

Merged
merged 35 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
30e7004
bumped dev version
metasim Mar 14, 2022
0b4309e
CI fix.
metasim Apr 7, 2022
80e6992
Dependency updates.
metasim Apr 7, 2022
d0e5bd5
Spark 3.1.3
metasim May 4, 2022
ff00b41
bumped dev version
metasim Mar 14, 2022
7f5e078
withNewChildrenInternal
echeipesh Jun 30, 2022
160f351
Try Aggregator implemtnation
echeipesh Jun 30, 2022
eb8ccb9
more explicit
echeipesh Jun 30, 2022
a92ee4e
Fix UDF style Aggregates
echeipesh Jul 6, 2022
8da8bd7
Bring in the Kryo setup
echeipesh Dec 5, 2022
ef2f4ee
Register functions directly
echeipesh Dec 5, 2022
d12ace5
Bump versions
echeipesh Dec 5, 2022
aab5486
Landsat PDS is gone :(
echeipesh Dec 9, 2022
a3ac4cf
Fix Resample and ResampleNearest
echeipesh Dec 10, 2022
0214fa2
fix masking functions
echeipesh Dec 11, 2022
285e03d
Fix test: 6900 bit at position 4 is 1 -- expect NODATA after mask
echeipesh Dec 11, 2022
725c9d5
TileRasterizerAggregate expects column in rf_raster_proj order
echeipesh Dec 11, 2022
91468b4
Use spark-testing-base - core tests green
echeipesh Dec 11, 2022
72a76a0
Update StacApiDataSourceTest.scala
echeipesh Dec 14, 2022
ae3acc4
disable GeoTrellisDataSourceSpec
echeipesh Dec 14, 2022
460971a
Shade caffeine
echeipesh Dec 14, 2022
b937a70
Merge branch 'develop' into spark-3.2
echeipesh Dec 14, 2022
43e8d3d
boop
echeipesh Dec 14, 2022
d1cfb99
Expressions constructors toSeq conversion
pomadchin Jan 3, 2023
b28a10b
Downgrade scaffeine to 4.1.0 for JDK 8 support in caffeine 2.9
echeipesh Jan 3, 2023
15b420c
pyspark version 3.2.1
echeipesh Jan 3, 2023
05b4c44
why exclude log4j ? tests need it
echeipesh Jan 3, 2023
ec3c5f4
GitHub actions build.
metasim Sep 27, 2021
3a7b90f
Fix formatting
echeipesh Jan 3, 2023
4f24ad5
Fix Expressions arity issue
pomadchin Jan 3, 2023
9be3cb6
Add .jvmopts
pomadchin Jan 3, 2023
61081b7
Fix: Mask operations preserver the target tile cell type
echeipesh Jan 4, 2023
b14adaa
Pin GitHub Actions to ubuntu-20.04
echeipesh Jan 13, 2023
df552b8
Implement withNewChildrenInternal directly
echeipesh Jan 13, 2023
c5cf70c
Remove python build from CI
echeipesh Jan 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .circleci/README.md

This file was deleted.

131 changes: 0 additions & 131 deletions .github/disabled-workflows/build-test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/image/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!requirements-conda.txt
!fix-permissions
28 changes: 28 additions & 0 deletions .github/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM adoptopenjdk/openjdk11:debian-slim

# See: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html
RUN \
apt-get update && \
apt-get install -yq gpg && \
curl -s https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \
gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \
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 && \
apt-get update && \
apt-get install -yq --no-install-recommends conda && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV CONDA_DIR=/opt/conda
ENV PATH=$CONDA_DIR/bin:$PATH

COPY requirements-conda.txt /tmp
RUN \
conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \
echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \
ldconfig && \
conda clean --all --force-pkgs-dirs --yes --quiet

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

27 changes: 27 additions & 0 deletions .github/image/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
IMAGE_NAME=debian-openjdk-conda-gdal
SHA=$(shell git log -n1 --format=format:"%H" | cut -c 1-7)
VERSION?=$(SHA)
HOST=docker.io
REPO=$(HOST)/s22s
FULL_NAME=$(REPO)/$(IMAGE_NAME):$(VERSION)

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

all: build push ## Build and then push image

build: ## Build the docker image
docker build . -t ${FULL_NAME}

login: ## Login to the docker registry
docker login

push: login ## Push docker image to registry
docker push ${FULL_NAME}

run: build ## Build image and launch shell
docker run --rm -it ${FULL_NAME} bash
5 changes: 5 additions & 0 deletions .github/image/requirements-conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python==3.8
gdal==3.1.2
libspatialindex
rasterio[s3]
rtree
71 changes: 71 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build and Test

on:
pull_request:
branches: ['**']
push:
branches: ['master', 'develop', 'release/*']
tags: [v*]
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
container:
image: s22s/debian-openjdk-conda-gdal:6790f8d

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.11

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Conda dependencies
run: |
# $CONDA_DIR is an environment variable pointing to the root of the miniconda directory
$CONDA_DIR/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt

# Do just the compilation stage to minimize sbt memory footprint
- name: Compile
run: sbt -v -batch compile test:compile it:compile

- name: Core tests
run: sbt -batch core/test

- name: Datasource tests
run: sbt -batch datasource/test

- name: Experimental tests
run: sbt -batch experimental/test

- name: Create PyRasterFrames package
run: sbt -v -batch pyrasterframes/package

- name: Python tests
run: sbt -batch pyrasterframes/test

- name: Collect artifacts
if: ${{ failure() }}
run: |
mkdir -p /tmp/core_dumps
ls -lh /tmp
cp core.* *.hs /tmp/core_dumps/ 2> /dev/null || true
cp ./core/*.log /tmp/core_dumps/ 2> /dev/null || true
cp -r /tmp/hsperfdata* /tmp/*.hprof /tmp/core_dumps/ 2> /dev/null || true
cp repo/core/core/* /tmp/core_dumps/ 2> /dev/null || true

- name: Upload core dumps
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: core-dumps
path: /tmp/core_dumps
68 changes: 68 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Compile documentation

on:
workflow_dispatch:

pull_request:
branches: ['**docs*']
push:
branches: ['master', 'release/*']
release:
types: [published]

jobs:
docs:
runs-on: ubuntu-latest
container:
image: s22s/debian-openjdk-conda-gdal:6790f8d

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: adopt@1.11

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Conda dependencies
run: |
# $CONDA_DIR is an environment variable pointing to the root of the miniconda directory
$CONDA_DIR/bin/conda install -c conda-forge --yes --file pyrasterframes/src/main/python/requirements-condaforge.txt

- name: Build documentation
run: sbt makeSite

- name: Collect artifacts
if: ${{ failure() }}
run: |
mkdir -p /tmp/core_dumps
cp core.* *.hs /tmp/core_dumps 2> /dev/null || true
mkdir -p /tmp/markdown
cp pyrasterframes/target/python/docs/*.md /tmp/markdown 2> /dev/null || true

- name: Upload core dumps
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: core-dumps
path: /tmp/core_dumps

- name: Upload markdown
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: markdown
path: /tmp/markdown

- name: Upload rf-site
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: rf-site
path: docs/target/site
2 changes: 2 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-Xms2g
-Xmx4g
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ lazy val core = project
ExclusionRule(organization = "com.github.mpilquist")
),
scaffeine,
scalatest,
sparktestingbase excludeAll ExclusionRule("org.scala-lang.modules", "scala-xml_2.12"),
`scala-logging`
),
libraryDependencies ++= {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class RasterRefIT extends TestEnvironment {
describe("practical subregion reads") {
it("should construct a natural color composite") {
import spark.implicits._
def scene(idx: Int) = URI.create(s"https://landsat-pds.s3.us-west-2.amazonaws.com" +
s"/c1/L8/176/039/LC08_L1TP_176039_20190703_20190718_01_T1/LC08_L1TP_176039_20190703_20190718_01_T1_B$idx.TIF")
def scene(idx: Int) = TestData.remoteCOGSingleBand(idx)

val redScene = RFRasterSource(scene(4))
// [west, south, east, north]
Expand Down
Loading