Skip to content

Commit

Permalink
Update GeoTrellis Server deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed May 13, 2024
1 parent 2a1fab9 commit abdc232
Show file tree
Hide file tree
Showing 142 changed files with 1,699 additions and 1,189 deletions.
93 changes: 0 additions & 93 deletions .circleci/config.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
22 changes: 22 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name-template: '$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: 'Added'
labels:
- 'feature'
- title: 'Changed'
labels:
- 'enhancement'
- 'dependency-update'
- title: 'Fixed'
labels:
- 'fix'
- 'bugfix'
- 'bug'
exclude-labels:
- 'skip-changelog'
- 'docs'
- 'build'
change-template: '- $TITLE [#$NUMBER](https://github.com/geotrellis/geotrelis-server/pull/$NUMBER) (@$AUTHOR)'
template: |
$CHANGES
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI
on:
pull_request:
branches: ['**']
push:
branches: ['**']
tags: [v*]
jobs:
build:
name: Build and Test
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'geotrellis/geotrellis-server'
strategy:
matrix:
os: [ubuntu-latest]
java: [11, 21]
distribution: [temurin]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Check formatting
run: sbt scalafmtCheckAll

- name: Build project
run: sbt +test

publish:
name: Publish Artifacts
needs: [build]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
os: [ubuntu-latest]
java: [11]
distribution: [temurin]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Release
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }}
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .jabbarc

This file was deleted.

13 changes: 8 additions & 5 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
version = 3.1.1
runner.dialect = scala212
version=3.8.1
runner.dialect = scala3
align.openParenCallSite = true
align.openParenDefnSite = true
maxColumn = 150
continuationIndent.defnSite = 2
continuationIndent.callSite = 2
assumeStandardLibraryStripMargin = true
danglingParentheses.preset = true
rewrite.rules = [SortImports, RedundantBraces, RedundantParens, SortModifiers]
rewrite.rules = [AvoidInfix, SortImports, RedundantParens, SortModifiers]
docstrings = JavaDoc
newlines.afterCurlyLambda = preserve
docstrings.style = Asterisk
align.preset = more
docstrings.oneline = unfold
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeoTrellis Server

[![CircleCI](https://circleci.com/gh/geotrellis/geotrellis-server.svg?style=svg)](https://circleci.com/gh/geotrellis/geotrellis-server) [![Join the chat at https://gitter.im/geotrellis/geotrellis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/geotrellis/geotrellis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Maven Central](https://img.shields.io/maven-central/v/com.azavea.geotrellis/geotrellis-server-core_2.12)](http://search.maven.org/#search%7Cga%7C1%7com.azavea.geotrellis) [![Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.azavea.geotrellis/geotrellis-server-core_2.12.svg)](https://oss.sonatype.org/content/repositories/snapshots/com/azavea/geotrellis/geotrellis-server-core_2.12/)
[![CI](https://github.com/geotrellis/geotrellis-server/actions/workflows/ci.yml/badge.svg)](https://github.com/geotrellis/geotrellis-server/actions/workflows/ci.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.azavea.geotrellis/geotrellis-server-core_2.12)](http://search.maven.org/#search%7Cga%7C1%7com.azavea.geotrellis) [![Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/com.azavea.geotrellis/geotrellis-server-core_2.12.svg)](https://oss.sonatype.org/content/repositories/snapshots/com/azavea/geotrellis/geotrellis-server-core_2.12/)


GeoTrellis Server is a set of components designed to simplify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ import pureconfig.generic.auto._
case class AzureConfig(storageConnectionString: String)

object AzureConfig {
lazy val conf: AzureConfig = ConfigSource.default.at("geotrellis.azure").loadOrThrow[AzureConfig]
lazy val conf: AzureConfig = ConfigSource.default.at("geotrellis.azure").loadOrThrow[AzureConfig]
implicit def cassandraConfigToClass(obj: AzureConfig.type): AzureConfig = conf
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import java.net.URI

class AzureRangeReader(uri: AzureURI, blobServiceClient: BlobServiceClient) extends RangeReader {
@transient lazy val blobContainerClient: BlobContainerClient = blobServiceClient.getBlobContainerClient(uri.getContainer)
@transient lazy val blobClient: BlobClient = blobContainerClient.getBlobClient(uri.getPath)
@transient lazy val blobClient: BlobClient = blobContainerClient.getBlobClient(uri.getPath)

val totalLength: Long = blobClient.getProperties.getBlobSize

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import java.net.URI

case class AzureURI(uri: URI) {
def getContainer: String = uri.getUserInfo
def getAccount: String = uri.getAuthority.split("@").last.split("\\.").head
def getAccount: String = uri.getAuthority.split("@").last.split("\\.").head
def getPath: String = {
val path = uri.getPath
if (path.startsWith("/")) path.drop(1) else path
Expand All @@ -44,7 +44,7 @@ object AzureURI {
if (List("wasbs", "wasb") contains uri.getScheme) AzureURI(uri)
else {
// get URI path, remove the first slash
val path = uri.getPath
val path = uri.getPath
val npath = (if (path.startsWith("/")) path.tail else path).split("/")
// the first item in the path is the container
val container = npath.head
Expand All @@ -54,7 +54,7 @@ object AzureURI {
}
def fromString(uri: String): AzureURI = fromURI(new URI(uri))

implicit def uriToAzureUri(uri: URI): AzureURI = fromURI(uri)
implicit def uriToAzureUri(uri: URI): AzureURI = fromURI(uri)
implicit def stringToAzureUri(uri: String): AzureURI = fromString(uri)
implicit def azureUriToUri(uri: AzureURI): URI = uri.uri
implicit def azureUriToUri(uri: AzureURI): URI = uri.uri
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ import com.azavea.maml.ast._
import com.azavea.maml.error._
import com.azavea.maml.eval.ConcurrentInterpreter
import cats.effect._
import io.chrisdavenport.log4cats.slf4j.Slf4jLogger
import org.typelevel.log4cats.slf4j.Slf4jLogger

import org.openjdk.jmh.annotations._

import scala.concurrent.ExecutionContext
import java.net.URI

@BenchmarkMode(Array(Mode.AverageTime))
@State(Scope.Thread)
class TmsReificationBench {

implicit val logger = Slf4jLogger.getLogger[IO]
implicit var contextShift = IO.contextShift(ExecutionContext.global)
import cats.effect.unsafe.implicits.global

// NDVI
val ast: Expression =
Expand Down
40 changes: 5 additions & 35 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,11 @@ import Dependencies._

scalaVersion := scalaVer
ThisBuild / scalaVersion := scalaVer
ThisBuild / libraryDependencySchemes += "org.typelevel" %% "cats-parse" % VersionScheme.Always

val currentYear = java.time.Year.now.getValue.toString

lazy val commonSettings = Seq(
// We are overriding the default behavior of sbt-git which, by default,
// only appends the `-SNAPSHOT` suffix if there are uncommitted
// changes in the workspace.
version := {
if (git.gitHeadCommit.value.isEmpty) "0.0.1-SNAPSHOT"
else if (git.gitDescribedVersion.value.isEmpty)
git.gitHeadCommit.value.get.substring(0, 7) + "-SNAPSHOT"
else if (git.gitCurrentTags.value.isEmpty || git.gitUncommittedChanges.value)
git.gitDescribedVersion.value.get + "-SNAPSHOT"
else
git.gitDescribedVersion.value.get
},
scalaVersion := scalaVer,
crossScalaVersions := crossScalaVer,
scalacOptions := Seq(
Expand All @@ -40,13 +29,10 @@ lazy val commonSettings = Seq(
// "-Yrangepos", // required by SemanticDB compiler plugin
// "-Ywarn-unused-import", // required by `RemoveUnused` rule
),
resolvers ++= Seq(
Resolver
.bintrayRepo("bkirwi", "maven"), // Required for `decline` dependency
resolvers ++= Resolver.sonatypeOssRepos("releases") ++ Resolver.sonatypeOssRepos("snapshots") ++ Seq(
Resolver.bintrayRepo("bkirwi", "maven"), // Required for `decline` dependency
Resolver.bintrayRepo("azavea", "maven"),
Resolver.bintrayRepo("azavea", "geotrellis"),
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
"osgeo-snapshots" at "https://repo.osgeo.org/repository/snapshot/",
"osgeo-releases" at "https://repo.osgeo.org/repository/release/",
"eclipse-releases" at "https://repo.eclipse.org/content/groups/releases",
Expand Down Expand Up @@ -112,7 +98,7 @@ lazy val publishSettings = Seq(
organizationHomepage := Some(new URL("https://geotrellis.io/")),
description := "GeoTrellis Server is a set of components designed to simplify viewing, processing, and serving raster data from arbitrary sources with an emphasis on doing so in a functional style.",
Test / publishArtifact := false
) ++ sonatypeSettings ++ credentialSettings
) ++ sonatypeSettings

lazy val sonatypeSettings = Seq(
publishMavenStyle := true,
Expand Down Expand Up @@ -146,32 +132,16 @@ lazy val sonatypeSettings = Seq(
),
licenses := Seq(
"Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")
),
publishTo := sonatypePublishTo.value
)

lazy val credentialSettings = Seq(
credentials += Credentials(
"GnuPG Key ID",
"gpg",
System.getenv().get("GPG_KEY_ID"),
"ignored"
),
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
System.getenv().get("SONATYPE_USERNAME"),
System.getenv().get("SONATYPE_PASSWORD")
)
)

lazy val root = project
.in(file("."))
.aggregate(core, example, ogc, opengis, `ogc-example`, effects, stac, `stac-example`, azure)
.settings(name := "geotrellis-server")
.settings(commonSettings)
.settings(publishSettings)
.settings(noPublishSettings)
.aggregate(core, example, ogc, opengis, `ogc-example`, effects, stac, `stac-example`, azure)

lazy val core = project
.settings(moduleName := "geotrellis-server-core")
Expand Down
Loading

0 comments on commit abdc232

Please sign in to comment.