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
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
report: ${{ steps.prepare-report.outputs.report }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Set up Java & Maven
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
echo "date=$(TZ=Europe/Paris date +'%Y-%m-%dT%H:%M:%S (%Z)')" >> "$GITHUB_OUTPUT"
exit $code
- name: Upload voxatile.jar as build artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
id: upload-artifact
with:
name: voxatile.jar
Expand Down Expand Up @@ -148,14 +148,14 @@ jobs:
if: ${{ always() && needs.build.outputs.pr-number != 0 }}
steps:
- name: Find existing comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@v4
id: find-comment
with:
issue-number: ${{ needs.build.outputs.pr-number }}
comment-author: "github-actions[bot]"
body-includes: "[Maven Build Status]"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@v5
with:
issue-number: ${{ needs.build.outputs.pr-number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
Expand All @@ -169,6 +169,6 @@ jobs:
if: ${{ always() && needs.build.outputs.pr-number == 0 }}
steps:
- name: Create commit comment with artifact URL
uses: peter-evans/commit-comment@v3
uses: peter-evans/commit-comment@v4
with:
body: ${{ needs.build.outputs.report }}
4 changes: 2 additions & 2 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Run checkstyle
uses: dbelyaev/action-checkstyle@v1.12.0
uses: dbelyaev/action-checkstyle@v4.4.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
checkstyle_config: checkstyle.xml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Set up Java & Maven
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
cache: maven
- name: Generate Javadoc with Maven
run: mvn --batch-mode --no-transfer-progress --update-snapshots javadoc:javadoc
- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: target/reports/apidocs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
6 changes: 3 additions & 3 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Set up Java & Maven
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
cache: maven
- name: Generate Javadoc with Maven
run: mvn --batch-mode --no-transfer-progress --update-snapshots javadoc:javadoc
- name: Upload standard artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Javadoc
path: target/reports/apidocs
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/parameters-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: '17'
distribution: 'temurin'
java-version: 17
distribution: temurin
cache: maven

- name: Build with Maven
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v7
- name: Set up Java & Maven
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Set up Java & Maven
uses: actions/setup-java@v4
uses: actions/setup-java@v6
with:
java-version: 17
distribution: temurin
Expand Down
30 changes: 15 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>3.1.0</version>
<version>3.2.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -88,25 +88,25 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.43.2.2</version>
<version>3.53.4.0</version>
</dependency>
<!-- Logging framework abstraction -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
<version>2.0.19</version>
</dependency>
<!-- Simple logger (default Java implementation) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.9</version>
<version>2.0.19</version>
</dependency>
<!-- JTS (vector geometry data library) -->
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.19.0</version>
<version>1.20.0</version>
</dependency>
<!-- GeoTools (geographic data manipulation library) -->
<dependency>
Expand Down Expand Up @@ -170,19 +170,19 @@
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.8.0</version>
<version>1.11.0</version>
</dependency>
<!-- Type-specific collections -->
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil-core</artifactId>
<version>8.5.16</version>
<version>8.5.19</version>
</dependency>
<!-- Apache pools utility -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.12.1</version>
<version>2.13.1</version>
</dependency>
<!-- OSM4J -->
<dependency>
Expand Down Expand Up @@ -212,14 +212,14 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.2</version>
<version>6.1.3</version>
<scope>test</scope>
</dependency>
<!-- No-op logger (to silent logs during unit tests) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>2.0.9</version>
<version>2.0.19</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -239,23 +239,23 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<version>3.16.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<version>3.6.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<version>3.5.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.4</version>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
<version>3.2.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public BuildLayoutTaskParams(List<LayoutBuilderParams> build, WorldCoords3dParam

@Override
public void validate() {
at.validate();
build.forEach(LayoutBuilderParams::validate);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
package fr.ign.voxatile.core.parameters.utils;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;

import fr.ign.voxatile.core.parameters.JsonWrapper;
import fr.ign.voxatile.core.utils.IntegerInterval;
import fr.ign.voxatile.core.utils.world3d.WorldBBox3d;

/**
* Parameters describing a {@link WorldBBox3d}.
* <p>
* A BBox can be described as an array of three coordinates or coordinates intervals (in x, y, z order).
*
* @param x coordinate interval on the x-axis
* @param y coordinate interval on the y-axis
* @param z coordinate interval on the z-axis
*/
@JsonWrapper
public class WorldBBox3dParams {
/**
* The three intervals (required).
*/
@JsonSetter(nulls = Nulls.FAIL, contentNulls = Nulls.FAIL)
public List<IntegerIntervalParams> intervals;

@JsonFormat(shape = JsonFormat.Shape.ARRAY)
public record WorldBBox3dParams(IntegerIntervalParams x, IntegerIntervalParams y, IntegerIntervalParams z) {
/**
* Validates parameters.
*/
public void validate() {
if (intervals.size() != 3)
throw new IllegalArgumentException("3d box should have three coordinates");
intervals.get(0).validate();
intervals.get(1).validate();
intervals.get(2).validate();
x.validate();
y.validate();
z.validate();
}

/**
Expand All @@ -39,9 +31,9 @@ public void validate() {
* @return created {@link WorldBBox3d}
*/
public WorldBBox3d create() {
IntegerInterval xs = intervals.get(0).create();
IntegerInterval ys = intervals.get(1).create();
IntegerInterval zs = intervals.get(2).create();
IntegerInterval xs = x.create();
IntegerInterval ys = y.create();
IntegerInterval zs = z.create();

return new WorldBBox3d(xs.begin(), ys.begin(), zs.begin(), xs.size(), ys.size(), zs.size());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,24 @@
package fr.ign.voxatile.core.parameters.utils;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;

import fr.ign.voxatile.core.parameters.JsonWrapper;
import fr.ign.voxatile.core.utils.world3d.WorldCoords3d;

/**
* Parameters describing a 3d position as {@link WorldCoords3d}.
*
* @param x coordinate on the x-axis
* @param y coordinate on the y-axis
* @param z coordinate on the z-axis
*/
@JsonWrapper
public class WorldCoords3dParams {
/**
* The three coordinates (required).
*/
@JsonSetter(nulls = Nulls.FAIL, contentNulls = Nulls.FAIL)
public List<Integer> coordinates;

/**
* Validates parameters.
*/
public void validate() {
if (coordinates.size() != 3)
throw new IllegalArgumentException("3d position should have three coordinates");
}

@JsonFormat(shape = JsonFormat.Shape.ARRAY)
public record WorldCoords3dParams(int x, int y, int z) {
/**
* Creates a new {@link WorldCoords3d} out of parameters.
*
* @return created {@link WorldCoords3d}
*/
public WorldCoords3d create() {
return new WorldCoords3d(coordinates.get(0), coordinates.get(1), coordinates.get(2));
return new WorldCoords3d(x, y, z);
}
}
Loading
Loading