Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/.backend_git_ref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
main
35bae875265258dfacb8c9103e6967c7c934406a
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
check:
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@main
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@ubuntu-24

strategy:
fail-fast: false
Expand All @@ -28,7 +28,7 @@ jobs:
# Checks the library using minimum version resolution
# `uv` has this feature built-in, c.f. https://github.com/astral-sh/uv
check-min-version:
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@main
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@ubuntu-24

with:
python-version: 3.9
Expand Down
57 changes: 16 additions & 41 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,8 @@ on:

jobs:
check:
runs-on: ubuntu-22.04

services:
postgres:
image: postgis/postgis
env:
POSTGRES_USER: geoengine
POSTGRES_PASSWORD: geoengine
POSTGRES_DB: geoengine
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-24.04
container: quay.io/geoengine/devcontainer:latest

defaults:
run:
Expand All @@ -46,9 +36,9 @@ jobs:
echo "GEOENGINE_VERSION=$(cat .github/.backend_git_ref)" >> $GITHUB_OUTPUT
if ${{ inputs.use-uv }}; then
echo "PIP_INSTALL=uv pip install --resolution=lowest-direct" >> $GITHUB_OUTPUT
echo "VENV_CALL=source .venv/bin/activate" >> $GITHUB_OUTPUT
echo "VENV_CALL=. .venv/bin/activate" >> $GITHUB_OUTPUT
else
echo "PIP_INSTALL=pip install" >> $GITHUB_OUTPUT
echo "PIP_INSTALL=python -m pip install" >> $GITHUB_OUTPUT
echo "VENV_CALL=" >> $GITHUB_OUTPUT
fi
if ${{ inputs.coverage }}; then
Expand All @@ -62,28 +52,6 @@ jobs:
repository: geo-engine/geoengine
ref: ${{ steps.vars.outputs.GEOENGINE_VERSION }}
path: backend
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Install lld & GDAL & Protobuf
run: |
sudo apt-get update
sudo apt-get install lld libgdal-dev gdal-bin build-essential clang curl protobuf-compiler libgeos-dev libproj-dev
sudo apt-get clean
export C_INCLUDE_PATH=/usr/include/gdal:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/usr/include/gdal:$CPLUS_INCLUDE_PATH
sudo ldconfig
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -93,7 +61,7 @@ jobs:
- name: Setup UV and create venv
if: ${{ inputs.use-uv }}
run: |
pip install uv
python -m pip install uv
uv venv
- name: Install build dependencies
run: |
Expand Down Expand Up @@ -133,16 +101,23 @@ jobs:
python -m mypy tests
- name: Test
run: |
service postgresql start
${{ steps.vars.outputs.VENV_CALL }}
pytest ${{ steps.vars.outputs.COVERAGE_COMMAND }}
env:
GEOENGINE_TEST_CODE_PATH: ${{ github.workspace }}/backend
GEOENGINE_TEST_BUILD_TYPE: "release"
- name: Upload coverage to Coveralls
- name: Report coverage to Coveralls
if: ${{ inputs.coverage }}
uses: coverallsapp/github-action@v2
with:
base-path: library
# 1. We need to adjust the paths in the lcov file to match the repository structure.
# 2. We need to download the coveralls script and upload the report.
run: |
sed -i 's|SF:geoengine/|SF:|' ../coverage.lcov
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz && ./coveralls report ../coverage.lcov
# If we don't run it in the code folder, the paths in the report will prefixed with `library/geoengine/`.
working-directory: library/geoengine
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}
- name: Examples
run: |
${{ steps.vars.outputs.VENV_CALL }}
Expand Down
6 changes: 3 additions & 3 deletions examples/layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -196,7 +196,7 @@
}
],
"source": [
"test_collection = root_of_layerdb.items[1].load()\n",
"test_collection = root_of_layerdb.items[0].load()\n",
"test_collection"
]
},
Expand Down Expand Up @@ -1162,7 +1162,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.12.3"
},
"orig_nbformat": 4,
"vscode": {
Expand Down