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
2 changes: 1 addition & 1 deletion .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
java-version: '23'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
java-version: '23'
distribution: 'temurin'

- name: Setup Gradle
Expand Down
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
# Netcdf CLI
# netcdf cli

[![Test](https://github.com/stellarsunset/netcdf-cli/actions/workflows/test.yaml/badge.svg)](https://github.com/stellarsunset/netcdf-cli/actions/workflows/test.yaml)

Minimal CLI tool for working with [netcdf](https://github.com/stellarsunset/netcdf) supported data files.
Minimal [CLI](https://picocli.info) tool for working with [netcdf](https://github.com/stellarsunset/netcdf) supported
data files.

### Build
## usage

- Activate GraalVM with [SDKMAN](https://sdkman.io/) `sdk use java 21.0.2-graalce` before building
- Run `just make` to build the `netcdf` binary and copy it into the `./bin` directory of the project
compile the cli yourself for whatever your target platform is via graal

```bash
$ sdk use java 23.0.2-graalce

# build the binary
$ just binary

# test out the binary locally
$ just cli help
Usage: <main class> [-v] [COMMAND]
-v, --version
Commands:
help Display help information about the specified command.
json Convert a Netcdf file to a stream of JSON records.
describe Describe the contents of a NetCDF file in terms of dimensions and
variables.

# show help docs for subcommands
$ just cli help describe
Usage: <main class> describe [-cds] <file>
Describe the contents of a NetCDF file in terms of dimensions and variables.
<file> the file to analyze
-c, --coordinate-variables
print information about all 'coordinate' variables
in a file, that is variables which vary along
greater than one dimension
-d, --dimension-variables
print information about all the 'dimension'
variables in the file, that is variables which
vary only along a single dimension
-s, --scalar-variables print information about all 'scalar' variables, that
is variables with only a single value in the file
these may contain coordinate system information,
file publication time, etc.
```

use the cli to generate json or explore the contents of various netcdf files
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ graalvmNative {
imageName = "netcdf"

javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(23)
}

resources.autodetect()
Expand Down
Loading
Loading