Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt-lucuma-lib to 0.11.3 #180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
94 changes: 39 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -75,26 +61,30 @@ 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

- 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
Expand All @@ -103,7 +93,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.2.2]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -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
8 changes: 4 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .scalafmt-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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.7"
style = default

runner.dialect = scala213source3
runner.dialect = scala3

maxColumn = 100
project.git = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ class Coordinate(var x: Double, var y: Double, var z: Double)
*
* @param o
* the <code>Coordinate</code> with which this <code>Coordinate</code> is being compared return
* -1, zero, or 1 as this <code>Coordinate</code> is less than, equal to, or greater than the
* specified <code>Coordinate</code>
* -1, zero, or 1 as this <code>Coordinate</code> is less than, equal to, or greater than the
* specified <code>Coordinate</code>
*/
override def compareTo(o: Coordinate): Int = {
val other = o.asInstanceOf[Coordinate]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ class LineSegment(var p0: Coordinate, var p1: Coordinate)
*
* @param seg
* the LineSegment to compare return 1 if <code>seg</code> is to the left of this segment return
* -1 if <code>seg</code> is to the right of this segment return 0 if <code>seg</code> is
* collinear to or crosses this segment
* -1 if <code>seg</code> is to the right of this segment return 0 if <code>seg</code> is
* collinear to or crosses this segment
*/
def orientationIndex(seg: LineSegment): Int = {
val orient0 = Orientation.index(p0, p1, seg.p0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: <blockquote><pre> 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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package org.locationtech.jts.geom
*/

/**
* Utility functions for working with quadrants, which are numbered as follows: <pre> 1 | 0
* --+-- 2 | 3 </pre>
* Utility functions for working with quadrants, which are numbered as follows: <pre> 1 | 0 --+-- 2
* \| 3 </pre>
*
* @version 1.7
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 4 additions & 5 deletions modules/jts/src/main/scala/org/locationtech/jts/math/DD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ import java.io.Serializable
* <p> 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. <pre> DD a = new DD(2.0); DD b = new DD(3.0);
* DD c = a.add(b); </pre> In contrast, the following approach uses only one object: <pre> DD a =
* new DD(2.0);
* a.selfAdd(3.0); </pre> <p> 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); </pre> <p> 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.
*
* <h3>References</h3> <ul> <li>Priest, D., <i>Algorithms for Arbitrary Precision Floating Point
* Arithmetic</i>, in P. Kornerup and D. Matula, Eds., Proc. 10th Symposium on Computer Arithmetic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: <pre> \2|1/ 3 \|/ 0
* ---+-- 4 /|\ 7 /5|6\ </pre> If line segments lie along a coordinate axis, the octant is the lower
* of the two possible values.
* follows: <pre> \2|1/ 3 \|/ 0 ---+-- 4 /|\ 7 /5|6\ </pre> If line segments lie along a coordinate
* axis, the octant is the lower of the two possible values.
*
* @version 1.7
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <br> 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
* <b>both</b> 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 <b>both</b> sides.
*/
private def computeLabelSide(geomIndex: Int, side: Int): Unit = {
val it = iterator
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.10.13")
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.11.3")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
Loading