From 7af23e41dea0b8450ae03cafbe0d37afabc25989 Mon Sep 17 00:00:00 2001
From: "lucuma-steward[bot]"
<106720676+lucuma-steward[bot]@users.noreply.github.com>
Date: Tue, 1 Aug 2023 20:34:43 +0000
Subject: [PATCH 1/2] Update sbt-lucuma-lib to 0.11.4
---
project/plugins.sbt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 3ccbae4e..072cab1c 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,2 +1,2 @@
-addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.10.13")
+addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.11.4")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
From c6ff0b23206c5f4b5926ac4502b20147f29d500a Mon Sep 17 00:00:00 2001
From: "lucuma-steward[bot]"
<106720676+lucuma-steward[bot]@users.noreply.github.com>
Date: Tue, 1 Aug 2023 20:35:28 +0000
Subject: [PATCH 2/2] Run prePR with sbt-typelevel
Executed command: sbt tlPrePrBotHook
---
.github/workflows/ci.yml | 94 ++++++++-----------
.mergify.yml | 8 +-
.scalafmt-common.conf | 4 +-
.../jts/algorithm/CGAlgorithmsDD.scala | 2 +-
.../locationtech/jts/algorithm/Centroid.scala | 4 +-
.../locationtech/jts/geom/Coordinate.scala | 4 +-
.../locationtech/jts/geom/LineSegment.scala | 4 +-
.../jts/geom/util/AffineTransformation.scala | 4 +-
.../locationtech/jts/geomgraph/EdgeList.scala | 3 +-
.../locationtech/jts/geomgraph/Quadrant.scala | 4 +-
.../jts/index/strtree/AbstractSTRtree.scala | 2 +-
.../scala/org/locationtech/jts/math/DD.scala | 9 +-
.../org/locationtech/jts/noding/Octant.scala | 5 +-
.../jts/operation/overlayng/LineBuilder.scala | 4 +-
.../jts/operation/relate/EdgeEndBundle.scala | 11 +--
15 files changed, 71 insertions(+), 91 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a4e5fbcd..01b89882 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,56 +15,42 @@ on:
tags: [v*]
env:
- PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
- SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
- SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- PGP_SECRET: ${{ secrets.PGP_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+concurrency:
+ group: ${{ github.workflow }} @ ${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
- scala: [3.2.2, 2.13.10]
+ scala: [3, 2.13]
java: [temurin@17]
project: [rootJS, rootJVM]
runs-on: ${{ matrix.os }}
+ timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0
- - name: Download Java (temurin@17)
- id: download-java-temurin-17
- if: matrix.java == 'temurin@17'
- uses: typelevel/download-java@v2
- with:
- distribution: temurin
- java-version: 17
-
- name: Setup Java (temurin@17)
+ id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
- distribution: jdkfile
+ distribution: temurin
java-version: 17
- jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
+ cache: sbt
- - name: Cache sbt
- uses: actions/cache@v3
- with:
- path: |
- ~/.sbt
- ~/.ivy2/cache
- ~/.coursier/cache/v1
- ~/.cache/coursier/v1
- ~/AppData/Local/Coursier/Cache/v1
- ~/Library/Caches/Coursier/v1
- key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
+ - name: sbt update
+ if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
+ run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
- run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'show coverageEnabled'
@@ -75,6 +61,10 @@ jobs:
if: matrix.java == 'temurin@17'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck lucumaScalafmtCheck lucumaScalafixCheck
+ - name: Check scalafix lints
+ if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
+ run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'
+
- name: scalaJSLink
if: matrix.project == 'rootJS'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
@@ -82,19 +72,19 @@ jobs:
- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
- - name: Check scalafix lints
- if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
- run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'
-
- name: Check binary compatibility
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
+ - name: Generate API documentation
+ if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
+ run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
+
- name: Aggregate coverage reports
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' coverageReport coverageAggregate
- name: Upload code coverage data
- run: 'bash <(curl -s https://codecov.io/bash)'
+ uses: codecov/codecov-action@v3
publish:
name: Publish Artifacts
@@ -103,7 +93,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- scala: [3.2.2]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
@@ -112,44 +101,39 @@ jobs:
with:
fetch-depth: 0
- - name: Download Java (temurin@17)
- id: download-java-temurin-17
- if: matrix.java == 'temurin@17'
- uses: typelevel/download-java@v2
- with:
- distribution: temurin
- java-version: 17
-
- name: Setup Java (temurin@17)
+ id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v3
with:
- distribution: jdkfile
+ distribution: temurin
java-version: 17
- jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
+ cache: sbt
- - name: Cache sbt
- uses: actions/cache@v3
- with:
- path: |
- ~/.sbt
- ~/.ivy2/cache
- ~/.coursier/cache/v1
- ~/.cache/coursier/v1
- ~/AppData/Local/Coursier/Cache/v1
- ~/Library/Caches/Coursier/v1
- key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
+ - name: sbt update
+ if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
+ run: sbt reload +update
- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
+ env:
+ PGP_SECRET: ${{ secrets.PGP_SECRET }}
+ PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: echo $PGP_SECRET | base64 -di | gpg --import
- name: Import signing key and strip passphrase
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
+ env:
+ PGP_SECRET: ${{ secrets.PGP_SECRET }}
+ PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
- name: Publish
- run: sbt '++ ${{ matrix.scala }}' tlCiRelease
+ env:
+ SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
+ SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
+ run: sbt tlCiRelease
diff --git a/.mergify.yml b/.mergify.yml
index 49ef909b..06f3f95f 100644
--- a/.mergify.yml
+++ b/.mergify.yml
@@ -13,10 +13,10 @@ pull_request_rules:
- body~=labels:.*early-semver-patch
- body~=labels:.*early-semver-minor
- 'title=flake.lock: Update'
- - status-success=Build and Test (ubuntu-latest, 3.2.2, temurin@17, rootJS)
- - status-success=Build and Test (ubuntu-latest, 3.2.2, temurin@17, rootJVM)
- - status-success=Build and Test (ubuntu-latest, 2.13.10, temurin@17, rootJS)
- - status-success=Build and Test (ubuntu-latest, 2.13.10, temurin@17, rootJVM)
+ - status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJS)
+ - status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJVM)
+ - status-success=Build and Test (ubuntu-latest, 2.13, temurin@17, rootJS)
+ - status-success=Build and Test (ubuntu-latest, 2.13, temurin@17, rootJVM)
actions:
merge: {}
- name: Label jts PRs
diff --git a/.scalafmt-common.conf b/.scalafmt-common.conf
index 0218680c..c4fcf16e 100644
--- a/.scalafmt-common.conf
+++ b/.scalafmt-common.conf
@@ -4,10 +4,10 @@
# this file by hand! Instead, if you wish to make changes, you should
# make a PR to sbt-lucuma.
-version = "3.7.2"
+version = "3.7.11"
style = default
-runner.dialect = scala213source3
+runner.dialect = scala3
maxColumn = 100
project.git = true
diff --git a/modules/jts/src/main/scala/org/locationtech/jts/algorithm/CGAlgorithmsDD.scala b/modules/jts/src/main/scala/org/locationtech/jts/algorithm/CGAlgorithmsDD.scala
index c6ebbfdd..4a489d31 100644
--- a/modules/jts/src/main/scala/org/locationtech/jts/algorithm/CGAlgorithmsDD.scala
+++ b/modules/jts/src/main/scala/org/locationtech/jts/algorithm/CGAlgorithmsDD.scala
@@ -70,7 +70,7 @@ object CGAlgorithmsDD {
* @return
* 1 if q is counter-clockwise (left) from p1-p2
* @return
- * -1 if q is clockwise (right) from p1-p2
+ * -1 if q is clockwise (right) from p1-p2
* @return
* 0 if q is collinear with p1-p2
*/
diff --git a/modules/jts/src/main/scala/org/locationtech/jts/algorithm/Centroid.scala b/modules/jts/src/main/scala/org/locationtech/jts/algorithm/Centroid.scala
index 0235232e..3ca8fd75 100644
--- a/modules/jts/src/main/scala/org/locationtech/jts/algorithm/Centroid.scala
+++ b/modules/jts/src/main/scala/org/locationtech/jts/algorithm/Centroid.scala
@@ -120,8 +120,8 @@ class Centroid(val geom: Geometry) {
def getCentroid: Coordinate = {
/**
- * The centroid is computed from the highest dimension components present in the input.
- * I.e. areas dominate lineal geometry, which dominates points. Degenerate geometry are computed
+ * The centroid is computed from the highest dimension components present in the input. I.e.
+ * areas dominate lineal geometry, which dominates points. Degenerate geometry are computed
* using their effective dimension (e.g. areas may degenerate to lines or points)
*/
val cent = new Coordinate
diff --git a/modules/jts/src/main/scala/org/locationtech/jts/geom/Coordinate.scala b/modules/jts/src/main/scala/org/locationtech/jts/geom/Coordinate.scala
index 50dacff1..873c153e 100644
--- a/modules/jts/src/main/scala/org/locationtech/jts/geom/Coordinate.scala
+++ b/modules/jts/src/main/scala/org/locationtech/jts/geom/Coordinate.scala
@@ -375,8 +375,8 @@ class Coordinate(var x: Double, var y: Double, var z: Double)
*
* @param o
* the Coordinate
with which this Coordinate
is being compared return
- * -1, zero, or 1 as this Coordinate
is less than, equal to, or greater than the
- * specified Coordinate
+ * -1, zero, or 1 as this Coordinate
is less than, equal to, or greater than the
+ * specified Coordinate
*/
override def compareTo(o: Coordinate): Int = {
val other = o.asInstanceOf[Coordinate]
diff --git a/modules/jts/src/main/scala/org/locationtech/jts/geom/LineSegment.scala b/modules/jts/src/main/scala/org/locationtech/jts/geom/LineSegment.scala
index 6e9ed428..f7ab7891 100644
--- a/modules/jts/src/main/scala/org/locationtech/jts/geom/LineSegment.scala
+++ b/modules/jts/src/main/scala/org/locationtech/jts/geom/LineSegment.scala
@@ -128,8 +128,8 @@ class LineSegment(var p0: Coordinate, var p1: Coordinate)
*
* @param seg
* the LineSegment to compare return 1 if seg
is to the left of this segment return
- * -1 if seg
is to the right of this segment return 0 if seg
is
- * collinear to or crosses this segment
+ * -1 if seg
is to the right of this segment return 0 if seg
is
+ * collinear to or crosses this segment
*/
def orientationIndex(seg: LineSegment): Int = {
val orient0 = Orientation.index(p0, p1, seg.p0)
diff --git a/modules/jts/src/main/scala/org/locationtech/jts/geom/util/AffineTransformation.scala b/modules/jts/src/main/scala/org/locationtech/jts/geom/util/AffineTransformation.scala
index bd5198f9..f6600f6c 100644
--- a/modules/jts/src/main/scala/org/locationtech/jts/geom/util/AffineTransformation.scala
+++ b/modules/jts/src/main/scala/org/locationtech/jts/geom/util/AffineTransformation.scala
@@ -414,8 +414,8 @@ class AffineTransformation()
* of the inverse is equal to the inverse of the matrix for the transformation. It is computed as
* follows:
1 inverse(A) = --- x adjoint(A) det * - * \= 1 | m11 -m01 m01*m12-m02*m11 | - * --- x | -m10 m00 -m00*m12+m10*m02 | det | 0 0 m00*m11-m10*m01 | + * \= 1 | m11 -m01 m01*m12-m02*m11 | --- x | -m10 m00 -m00*m12+m10*m02 | det | 0 0 m00*m11-m10*m01 + * \| * * \= | m11/det -m01/det m01*m12-m02*m11/det | * | -m10/det m00/det -m00*m12+m10*m02/det | diff --git a/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/EdgeList.scala b/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/EdgeList.scala index be01f047..e725a5a5 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/EdgeList.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/EdgeList.scala @@ -69,8 +69,7 @@ class EdgeList() { /** * If the edge e is already in the list, return its index. * - * return index, if e is already in the list - * -1 otherwise + * return index, if e is already in the list -1 otherwise */ def findEdgeIndex(e: Edge): Int = { var i = 0 diff --git a/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/Quadrant.scala b/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/Quadrant.scala index 0ab9874b..f97dfec7 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/Quadrant.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/geomgraph/Quadrant.scala @@ -19,8 +19,8 @@ package org.locationtech.jts.geom */ /** - * Utility functions for working with quadrants, which are numbered as follows:1 | 0 - * --+-- 2 | 3+ * Utility functions for working with quadrants, which are numbered as follows:1 | 0 --+-- 2 + * \| 3* * @version 1.7 */ diff --git a/modules/jts/src/main/scala/org/locationtech/jts/index/strtree/AbstractSTRtree.scala b/modules/jts/src/main/scala/org/locationtech/jts/index/strtree/AbstractSTRtree.scala index f83b3337..9dc2973e 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/index/strtree/AbstractSTRtree.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/index/strtree/AbstractSTRtree.scala @@ -382,7 +382,7 @@ abstract class AbstractSTRtree(var nodeCapacity: Int) /** * @param level - * -1 to get items + * -1 to get items */ private def boundablesAtLevel( level: Int, diff --git a/modules/jts/src/main/scala/org/locationtech/jts/math/DD.scala b/modules/jts/src/main/scala/org/locationtech/jts/math/DD.scala index 40c5b989..215a1c66 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/math/DD.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/math/DD.scala @@ -37,11 +37,10 @@ import java.io.Serializable *For example, the following code example constructs three DD instances: two to hold the input * values and one to hold the result of the addition.
DD a = new DD(2.0); DD b = new DD(3.0); * DD c = a.add(b);In contrast, the following approach uses only one object:DD a = - * new DD(2.0); - * a.selfAdd(3.0);This implementation uses algorithms originally designed variously by - * Knuth, Kahan, Dekker, and Linnainmaa. Douglas Priest developed the first C implementation of - * these techniques. Other more recent C++ implementation are due to Keith M. Briggs and David - * Bailey et al. + * new DD(2.0); a.selfAdd(3.0);
This implementation uses algorithms originally designed + * variously by Knuth, Kahan, Dekker, and Linnainmaa. Douglas Priest developed the first C + * implementation of these techniques. Other more recent C++ implementation are due to Keith M. + * Briggs and David Bailey et al. * *
References
- Priest, D., Algorithms for Arbitrary Precision Floating Point * Arithmetic, in P. Kornerup and D. Matula, Eds., Proc. 10th Symposium on Computer Arithmetic, diff --git a/modules/jts/src/main/scala/org/locationtech/jts/noding/Octant.scala b/modules/jts/src/main/scala/org/locationtech/jts/noding/Octant.scala index fa84d586..1bb6d649 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/noding/Octant.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/noding/Octant.scala @@ -18,9 +18,8 @@ import org.locationtech.jts.geom.Coordinate /** * Methods for computing and working with octants of the Cartesian plane Octants are numbered as - * follows:
\2|1/ 3 \|/ 0 - * ---+-- 4 /|\ 7 /5|6\If line segments lie along a coordinate axis, the octant is the lower - * of the two possible values. + * follows:\2|1/ 3 \|/ 0 ---+-- 4 /|\ 7 /5|6\If line segments lie along a coordinate + * axis, the octant is the lower of the two possible values. * * @version 1.7 */ diff --git a/modules/jts/src/main/scala/org/locationtech/jts/operation/overlayng/LineBuilder.scala b/modules/jts/src/main/scala/org/locationtech/jts/operation/overlayng/LineBuilder.scala index 6edc7b7f..12b91b12 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/operation/overlayng/LineBuilder.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/operation/overlayng/LineBuilder.scala @@ -189,8 +189,8 @@ class LineBuilder( } /** - * Omit edge which is a collapse along a boundary. - * I.e a result line edge must be from a input line OR two coincident area boundaries. + * Omit edge which is a collapse along a boundary. I.e a result line edge must be from a input + * line OR two coincident area boundaries. * * This logic is only used if not including collapse lines in result. */ diff --git a/modules/jts/src/main/scala/org/locationtech/jts/operation/relate/EdgeEndBundle.scala b/modules/jts/src/main/scala/org/locationtech/jts/operation/relate/EdgeEndBundle.scala index 01f6d814..4903aa6f 100644 --- a/modules/jts/src/main/scala/org/locationtech/jts/operation/relate/EdgeEndBundle.scala +++ b/modules/jts/src/main/scala/org/locationtech/jts/operation/relate/EdgeEndBundle.scala @@ -120,12 +120,11 @@ class EdgeEndBundle(val boundaryNodeRule: BoundaryNodeRule, val e: EdgeEnd) /* * To compute the summary label for a side, the algorithm is: FOR all edges IF any edge's location * is INTERIOR for the side, side location = INTERIOR ELSE IF there is at least one EXTERIOR * attribute, side location = EXTERIOR ELSE side location = NULL
Note that it is possible for - * two sides to have apparently contradictory information - * i.e. one edge side may indicate that it is in the interior of a geometry, while another edge - * side may indicate the exterior of the same geometry. This is not an incompatibility - - * GeometryCollections may contain two Polygons that touch along an edge. This is the reason for - * Interior-primacy rule above - it results in the summary label having the Geometry interior on - * both sides. + * two sides to have apparently contradictory information i.e. one edge side may indicate that it + * is in the interior of a geometry, while another edge side may indicate the exterior of the same + * geometry. This is not an incompatibility - GeometryCollections may contain two Polygons that + * touch along an edge. This is the reason for Interior-primacy rule above - it results in the + * summary label having the Geometry interior on both sides. */ private def computeLabelSide(geomIndex: Int, side: Int): Unit = { val it = iterator