Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 3 additions & 11 deletions .github/workflows/cicd_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ jobs:
id: build
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.pdal
file: ./Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
build-args: |
GITHUB_REPOSITORY=alavenant/PDAL
GITHUB_SHA=master_28_05_25


# run the test on the docker build
- name: Run tests in docker image
Expand Down Expand Up @@ -68,12 +64,8 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.pdal
file: ./Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GITHUB_REPOSITORY=alavenant/PDAL
GITHUB_SHA=master_28_05_25

labels: ${{ steps.meta.outputs.labels }}
4 changes: 1 addition & 3 deletions .github/workflows/cicd_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- name: install cppunit
run: sudo apt install -y libcppunit-dev


# See https://github.com/marketplace/actions/setup-micromamba
- name: setup-micromamba
uses: mamba-org/setup-micromamba@v2.0.4
Expand All @@ -40,10 +39,9 @@ jobs:
cmake -G"Unix Makefiles" -DCONDA_PREFIX=$MAMBA_ROOT_PREFIX -DCMAKE_BUILD_TYPE=Release ../
make install


- name: run tests
shell: micromamba-shell {0}
run: |
export PDAL_DRIVER_PATH=./install/lib
echo $PDAL_DRIVER_PATH
python -m pytest -s -m "not pdal_custom"
python -m pytest -s
10 changes: 9 additions & 1 deletion Dockerfile.pdal
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Note :
## This Dockerfile allows us to build a PDAL image with the custom fork and branch
## It's used when it's necessary to use a specific version of PDAL
## typicaly when some features are not available in the conda-forge channel
## the PDAL version is specified by variables GITHUB_SERVER_URL and GITHUB_REPOSITORY
## and the branch by GITHUB_SHA
##

FROM condaforge/mambaforge:latest AS mamba_pdal

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
Expand Down Expand Up @@ -85,7 +93,7 @@ RUN cd build && ninja install

# Add our environment
RUN pip install laspy[lazrs]
RUN pip install ign-pdal-tools==1.13.0
RUN pip install ign-pdal-tools==1.15.0

FROM debian:bullseye-slim

Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@ clean:

IMAGE_NAME=pdal_ign_plugin
VERSION=`python -m pdal_ign_macro.version`
CUSTOM_PDAL_SHA=master_28_05_25
CUSTOM_PDAL_REPOSITORY=alavenant/PDAL

docker-build: clean
docker build --no-cache -t ${IMAGE_NAME}:${VERSION} -f Dockerfile .

docker-build-pdal: clean
docker build --build-arg GITHUB_REPOSITORY=alavenant/PDAL --build-arg GITHUB_SHA=master_28_05_25 -t ${IMAGE_NAME}:${VERSION} -f Dockerfile.pdal .
docker-build-custom-pdal: clean
docker build --build-arg GITHUB_REPOSITORY=${CUSTOM_PDAL_REPOSITORY} --build-arg GITHUB_SHA=${CUSTOM_PDAL_SHA} -t ${IMAGE_NAME}:${VERSION} -f Dockerfile.pdal .

docker-test-pdal: clean
docker run --rm -v `pwd`/tmp_data:/output -t ${IMAGE_NAME}:${VERSION} python -m pytest --log-cli-level=debug

docker-test:
docker run --rm -it ${IMAGE_NAME}:${VERSION} python -m pytest -s
docker run --rm -v `pwd`/tmp_data:/output -t ${IMAGE_NAME}:${VERSION} python -m pytest --log-cli-level=debug
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ See the `scripts` folder for example usages of this module.
There are two docker files.

- The main Dockerfile use the official pdal version.
- The Dockerfile.pdal permit to use non official version of pdal (the master or a fork for exemple). See the "docker-build-pdal" command in Makefile
- The Dockerfile.pdal permit to use custom version of pdal (the master or a fork for exemple). See the "docker-build-pdal" command in Makefile

### Usage from outside the docker image:

Expand Down
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### dev

- lib: update ign-pdal-tools to 1.15.0 (use pdal>=2.9)
- use pdal>=2.9 and deactivate the Dockerfile.pdal from CI

### 0.5.7

- fix version number and CI compilation
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ channels:
dependencies:
- python=3.12.*
- numpy
- conda-forge:pdal==2.8.*
- conda-forge:pdal>=2.9.*
- conda-forge:python-pdal>=3.4
- gdal
- geopandas
Expand All @@ -22,5 +22,5 @@ dependencies:
- pip
- pip:
- build # Installed via pip after issues when creating the environment ("build does not exist")
- ign-pdal-tools==1.13.0 # don't forget to update this version in environment_docker.yml as well
- ign-pdal-tools==1.15.0 # don't forget to update this version in environment_docker.yml as well
- laspy[lazrs]
4 changes: 2 additions & 2 deletions environment_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- python=3.12.*
- numpy
- conda-forge:pdal==2.8.*
- conda-forge:pdal>=2.9.*
- conda-forge:python-pdal>=3.4
- gdal
- geopandas
Expand All @@ -14,7 +14,7 @@ dependencies:
# --------- pip & pip libraries --------- #
- pip
- pip:
- ign-pdal-tools==1.13.0
- ign-pdal-tools==1.15.0
- laspy[lazrs]


11 changes: 4 additions & 7 deletions test/test_grid_decimation.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import csv
import json
import math
import os
import tempfile
from test import utils

import numpy as np
import pdal
import pdaltools.las_info as li
import pytest
Expand Down Expand Up @@ -128,9 +128,6 @@ def test_grid_decimation_empty():
)
pipeline.execute()

with open(tmp_out_wkt.name, "r") as f:
reader = csv.reader(f, delimiter="\t")
lines = [line for line in reader]
assert len(lines) == 0

assert np.all(pipeline.arrays[0]["grid"] == 0)
# since pdal 2.9, the filter is not run if the view is empty
# => the output wkt file is not created
assert not os.path.exists(tmp_out_wkt.name)
8 changes: 5 additions & 3 deletions test/test_pdal_custom.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
"""
test some PDAL features
"""

import os

import pdal
import pytest

TEST_PATH = os.path.dirname(os.path.abspath(__file__))


# this test only works with PDAL compiled on a custom fork and branch, so we mark it to avoid running it.
@pytest.mark.pdal_custom
def test_pdal_read_severals_extra_dims():
# test that we can read a las file with several extra dims
test_file = os.path.join(TEST_PATH, "data/las_with_several_extra_byte_bloc.laz")

pipeline = pdal.Reader.las(filename=test_file).pipeline()
Expand Down
Loading