Skip to content

Commit

Permalink
numpy to 1.22.4 (avoid scipy conflict). R off.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohns-databricks committed Jan 5, 2024
1 parent b447246 commit f493a50
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/actions/python_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
run: |
cd python
pip install build wheel pyspark==${{ matrix.spark }}
pip install numpy~=${{ matrix.numpy }}
pip install numpy==${{ matrix.numpy }}
pip install --no-cache-dir --force-reinstall GDAL[numpy]==${{ matrix.gdal }}
pip install .
- name: Test and build python package
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/scala_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
sudo apt-get update -y
# - install numpy first
pip install --upgrade pip
pip install numpy~=${{ matrix.numpy }}
pip install numpy==${{ matrix.numpy }}
# - install natives
sudo apt-get install -y unixodbc libcurl3-gnutls libsnappy-dev libopenjp2-7
sudo apt-get install -y gdal-bin libgdal-dev
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
python: [ 3.10.12 ]
numpy: [ 1.26.3 ]
numpy: [ 1.22.4 ]
gdal: [ 3.4.1 ]
spark: [ 3.4.0 ]
R: [ 4.2.2 ]
Expand All @@ -28,7 +28,7 @@ jobs:
uses: ./.github/actions/scala_build
- name: build python
uses: ./.github/actions/python_build
- name: build R
uses: ./.github/actions/r_build
# - name: build R
# uses: ./.github/actions/r_build
- name: upload artefacts
uses: ./.github/actions/upload_artefacts
2 changes: 1 addition & 1 deletion .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
python: [ 3.10.12 ]
numpy: [ 1.26.3 ]
numpy: [ 1.22.4 ]
gdal: [ 3.4.1 ]
spark: [ 3.4.0 ]
R: [ 4.2.2 ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python: [ 3.10.12 ]
numpy: [ 1.26.3 ]
numpy: [ 1.22.4 ]
gdal: [ 3.4.1 ]
spark: [ 3.4.0 ]
R: [ 4.2.2 ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
python: [ 3.10.12 ]
numpy: [ 1.26.3 ]
numpy: [ 1.22.4 ]
gdal: [ 3.4.1 ]
spark: [ 3.4.0 ]
R: [ 4.2.2 ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
python: [ 3.10.12 ]
numpy: [ 1.26.2 ]
numpy: [ 1.22.4 ]
gdal: [ 3.4.1 ]
spark: [ 3.4.0 ]
R: [ 4.2.2 ]
Expand Down
7 changes: 2 additions & 5 deletions scripts/mosaic-gdal-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# - setup_gdal(...)
# [4] this script has conditional logic based on variables
# Author: Michael Johns | [email protected]
# Last Modified: 04 JAN, 2024
# Last Modified: 05 JAN, 2024

# TEMPLATE-BASED REPLACEMENT
# - can also be manually specified
Expand All @@ -28,8 +28,7 @@ WITH_FUSE_SO=0 # <- use fuse dir shared objects (vs wget)
# SPECIFIED VERSIONS
# - may be changed by conditional logic
# - https://docs.scipy.org/doc/scipy/dev/toolchain.html#toolchain-roadmap
NUMPY_VERSION='<1.27,>=1.26' # <- for GDAL
SCIPY_VERSION='<1.12,>=1.11' # <- adjusted for numpy
NUMPY_VERSION='<1.23,>=1.22' # <- for GDAL + Mosaic
GDAL_VERSION=3.4.1 # <- ubuntugis is 3.4.3

# - optional: install Mosaic
Expand All @@ -54,10 +53,8 @@ then
sudo apt-get update -y

# - install specific numpy version
# - install scipy version (dep conflict)
pip install --upgrade pip
pip install --no-cache-dir --force-reinstall "numpy$NUMPY_VERSION"
pip install --no-cache-dir --force-reinstall "scipy$SCIPY_VERSION"

# - install natives
sudo apt-get install -y gdal-bin libgdal-dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ trait RST_MergeAggBehaviors extends QueryTest {
val rastersInMemory = spark.read
.format("gdal")
.option("raster_storage", "in-memory")
.option("pathGlobFilter", "*_B01.TIF")
.load("src/test/resources/modis")

val gridTiles = rastersInMemory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ trait RST_MergeBehaviors extends QueryTest {
val rastersInMemory = spark.read
.format("gdal")
.option("raster_storage", "in-memory")
.option("pathGlobFilter", "*_B01.TIF")
.load("src/test/resources/modis")

val gridTiles = rastersInMemory
Expand Down

0 comments on commit f493a50

Please sign in to comment.