Skip to content

Commit

Permalink
Merge remote-tracking branch 'Unidata/main' into metno
Browse files Browse the repository at this point in the history
  • Loading branch information
cskarby committed Jan 1, 2025
2 parents 777a1a7 + 2c471cc commit 06cc19b
Show file tree
Hide file tree
Showing 205 changed files with 1,729 additions and 921 deletions.
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# users just like we do for commit author emails.
# docs/* [email protected]

* @haileyajohnson
* @lesserwhirls

#####################
# top level modules #
Expand All @@ -26,16 +26,16 @@
# classpath / not module specific matches #
###########################################

**/thredds/server/radarServer2/** @dopplershift
**/thredds/server/radarServer2/** @dopplershift @lesserwhirls

**/opendap/** @DennisHeimbigner
**/dap4/** @DennisHeimbigner
**/opendap/** @DennisHeimbigner @lesserwhirls
**/dap4/** @DennisHeimbigner @lesserwhirls

######################
# general file types #
######################

*.py @dopplershift
*.py @dopplershift @lesserwhirls

####################
# individual files #
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '17'
- name: Build with Gradle (refresh dependencies)
run: ./gradlew clean classes testClasses assemble --refresh-dependencies
21 changes: 12 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v2
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build docs using Gradle
run: './gradlew :docs:build'
- name: Upload a preview of the rendered html
if: success()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: documentation_${{ github.sha }}
path: docs/build/site
19 changes: 11 additions & 8 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Code Style Check with Gradle and Spotless
run: ./gradlew clean spotlessCheck
9 changes: 4 additions & 5 deletions .github/workflows/tds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 11 ]
java-vendor: [ 'zulu', 'temurin' ]
# test against tomcat 8.5.x and tomcat 9.x
servletcontainer: [ 'tomcat85', 'tomcat9' ]
java-version: [ 17 ]
java-vendor: [ 'temurin' ]
servletcontainer: [ 'tomcat10' ]
steps:
- uses: actions/checkout@v4
- name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }})
Expand All @@ -21,7 +20,7 @@ jobs:
test-command: '-Dtds.content.root.path=$CONTENT_DIR -Dtds.test.gretty.container=${{ matrix.servletcontainer }} --info --stacktrace testAll'
env:
CONTENT_DIR: ${{ github.workspace }}/tds/src/test/content
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: failure()
with:
name: tds_JUnit_Results_${{ github.sha }}_AdoptOpenJDK-HS-${{ matrix.java }}-${{ matrix.servletcontainer }}
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ respond to the confirmation email. Mailing list archives are available at:

* https://www.unidata.ucar.edu/mailing_lists/archives/thredds/

We appreciate feedback from users of this package. Please send comments,
suggestions, and bug reports to <[email protected]>.
We appreciate feedback from users of this package.
Open a GitHub issue or discussion if you have comments,
suggestions, or bug reports.
Please identify the version of the package.
For security or server set up issues that cannot be addressed on GitHub,
you may send your question with the relevant details to <[email protected]>.

## THREDDS Catalogs

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ allprojects {
// Matches Maven's "project.version". Used in MANIFEST.MF for "Implementation-Version".
// We try to follow semantic versioning, and thus we use <major>.<minor>.<patch>-<prerelease version>
// <prerelease version> may be SNAPSHOT, alphax, betax, etc.
version = '5.5'
version = '5.6-SNAPSHOT'
// Eventually, we'll stop appending "SNAPSHOT" to our versions and just use this.
status = 'release'
status = 'development'
}

// Matches Maven's "project.description".
Expand Down Expand Up @@ -101,7 +101,7 @@ ext {

tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '6.9.1'
gradleVersion = '7.6.4'
}

gradle.projectsEvaluated {
Expand Down
1 change: 1 addition & 0 deletions dap4/d4servlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies {
implementation 'edu.ucar:httpservices'
implementation 'edu.ucar:cdm-core'

implementation 'org.apache.commons:commons-lang3'
compileOnly 'jakarta.servlet:jakarta.servlet-api'
compileOnly 'org.slf4j:slf4j-api'
}
6 changes: 3 additions & 3 deletions dap4/d4servlet/src/main/java/dap4/servlet/DapController.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import dap4.core.dmr.*;
import dap4.core.util.*;
import dap4.dap4lib.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.MalformedURLException;
import java.nio.ByteOrder;
Expand Down
6 changes: 5 additions & 1 deletion dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
import dap4.dap4lib.DapProtocol;
import dap4.dap4lib.RequestMode;

import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.commons.lang3.StringEscapeUtils;

/**
* Generate the DSR for a dataset.
* Currently only generates a minimal DSR.
Expand Down Expand Up @@ -132,6 +134,8 @@ protected String getTemplate(ResponseFormat format) throws IOException {
}

protected void substitute(StringBuilder buf, String macro, String value) {
value = StringEscapeUtils.escapeHtml4(value);

int from = 0;
String tag = "${" + macro + "}";
int taglen = tag.length();
Expand Down
4 changes: 2 additions & 2 deletions dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import dap4.core.util.*;
import dap4.dap4lib.RequestMode;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URISyntaxException;
Expand Down
6 changes: 3 additions & 3 deletions dap4/d4ts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ dependencies {
implementation 'edu.ucar:dap4'
implementation project(":dap4:d4servlet")

providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}"
providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"

compileOnly 'org.slf4j:slf4j-api'

runtime 'org.apache.logging.log4j:log4j-slf4j-impl'
runtime 'org.apache.logging.log4j:log4j-web'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
runtimeOnly 'org.apache.logging.log4j:log4j-jakarta-web'

compileOnly 'org.slf4j:slf4j-api'
}
Expand Down
6 changes: 3 additions & 3 deletions dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import dap4.dap4lib.DapLog;
import dap4.servlet.*;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
Expand Down
4 changes: 2 additions & 2 deletions dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import dap4.dap4lib.DapLog;
import dap4.servlet.DapRequest;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletContext;
import jakarta.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
Expand Down
10 changes: 5 additions & 5 deletions dap4/d4ts/src/main/java/dap4/d4ts/HttpHeadFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
*/
package dap4.d4ts;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponseWrapper;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ See LICENSE file for more info.
-->
<head>
<meta http-equiv="Content-Type" content="text/html">
<meta> name="title" content="Dataset Services Response">
<meta name="title" content="Dataset Services Response">
<style>
table.t1, td.t1, th.t1 {border: 1px solid}
td.t1, th.t1 {padding:4px}
Expand Down
2 changes: 1 addition & 1 deletion docs/adminguide/src/site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
theme: unidata-jekyll-theme

# this will appear in an HTML meta tag, sidebar, and perhaps elsewhere
docset_version: 5.5
docset_version: 5.6

# this appears on the top navigation bar next to the home button
topnav_title: THREDDS Data Server (TDS)
Expand Down
2 changes: 1 addition & 1 deletion docs/adminguide/src/site/_data/sidebars/admin_sidebar.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
entries:
- title: Sidebar
product: Administrator's Guide
version: 5.5
version: 5.6
folders:
- title:
output: pdf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export JAVA_HOME="/usr/local/jdk"
# THIS IS CRITICAL and there is NO DEFAULT -
# the TDS will not start without this.
#
CONTENT_ROOT=-Dtds.content.root.path=/data/content
CONTENT_ROOT=/data/content
CONTENT_ROOT_OPT=-Dtds.content.root.path=$CONTENT_ROOT

# Set java prefs related variables (used by the wms service)
JAVA_PREFS_ROOTS="-Djava.util.prefs.systemRoot=$CONTENT_ROOT/thredds/javaUtilPrefs \
Expand All @@ -57,7 +58,7 @@ HEADLESS="-Djava.awt.headless=true"
#
# Standard setup.
#
JAVA_OPTS="$CONTENT_ROOT $NORMAL $HEAP_DUMP $HEADLESS $JAVA_PREFS_ROOTS"
JAVA_OPTS="$CONTENT_ROOT_OPT $NORMAL $HEAP_DUMP $HEADLESS $JAVA_PREFS_ROOTS"

export JAVA_OPTS
~~~
Expand Down
5 changes: 4 additions & 1 deletion docs/adminguide/src/site/pages/overview/TDSVetted.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ When identified, any security-related issues are addressed immediately and fixed
### Providing Feedback

We appreciate feedback from users of the TDS!
Send comments, suggestions, and bug reports to <{{site.feedback_email}}>.
Open a GitHub issue or discussion [here](https://github.com/Unidata/tds) if you have comments,
suggestions, or bug reports.
Please identify the version of the package.
For server set up issues that cannot be addressed on GitHub,
you may send your question with the relevant details to <[email protected]>.

To report a potential security-related issue or bug, contact: <[email protected]>
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,28 @@ Details on other configuration options for NCSS are available in the [`threddsCo

## Serving Datasets With NCSS

In your configuration catalogs, you must define the service like this:
In your configuration catalogs, you must define the service based on the type of data being served.
For Feature Type `GRID`, use:

~~~xml
<service name="subsetServer" serviceType="NetcdfSubset" base="/thredds/ncss/" />
<service name="ncssGrid" serviceType="NetcdfSubset" base="/thredds/ncss/grid/" />
~~~

For Feature Types `POINT` or `STATION`, use:

~~~xml
<service name="ncssPoint" serviceType="NetcdfSubset" base="/thredds/ncss/point/" />
~~~

Then as usual, add the service to any datasets that you want served, e.g.:

~~~xml
<dataset name="datasetName" ID="datasetID" urlPath="/my/urlPath">
<serviceName>subsetServer</serviceName>
<serviceName>ncssGrid</serviceName>
</dataset>
~~~

Note that the name of the service (`subsetServer` in this example) is arbitrary, but the `serviceType` and base must be _exactly_ as shown.
Note that the name of the service (`ncssGrid` in this example) is arbitrary, but the `serviceType` and base must be _exactly_ as shown.

## Restrictions On What Files Can Be Served

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ Therefore, it is required that service base URLs must [exactly match the values

* NetCDF Subset Service (Grid Data)
~~~xml
<service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/grid/" />
<service name="ncssGrid" serviceType="NetcdfSubset" base="/thredds/ncss/grid/" />
~~~

* NetCDF Subset Service (Point Data)

~~~xml
<service name="ncss" serviceType="NetcdfSubset" base="/thredds/ncss/point/" />
<service name="ncssPoint" serviceType="NetcdfSubset" base="/thredds/ncss/point/" />
~~~

* WCS
Expand Down
Loading

0 comments on commit 06cc19b

Please sign in to comment.