Imported from HydrologicEngineeringCenter/Vortex (
AGENTS.md). Install upstream withnpx skills add HydrologicEngineeringCenter/Vortex. Copyright stays with the author.
AGENTS.md
Project-specific notes for working in this repository.
Environment
- Platform: Windows. Primary shell is PowerShell. Build with
./gradlew(gradlew.baton Windows).
Building and testing
- Run
./gradlew getNativesbefore running tests. It extracts the GDAL, netCDF, and HDF native libraries intobin/. Without it, every NetCDF-backed test fails withjava.lang.UnsatisfiedLinkError(e.g. GDALosrJNI) because the native libraries are not on the path. BUILD SUCCESSFULdoes not mean tests passed. Thevortex-apitest task setsignoreFailures = true, so Gradle reports success even when tests fail. Confirm results invortex-api/build/test-results/test/*.xml(or the HTML report undervortex-api/build/reports/tests/).- Tests run with
-Djava.io.tmpdir=C:/Tempon Windows. VortexGrid.equals/hashCodecompare the resolved data type,dataType(), not the raw field. The getter infers a type for grids built asUNDEFINED(non-zero interval + a known variable name), and the NetCDF writer persists that inferred value ascell_methods, so a grid written asUNDEFINEDreads back with a concrete type. Comparing the raw field made those two unequal and brokeNetcdfDataWriterTest.IntervalTimeCircleTest. Note that thetoStringof two equal grids can still differ infileNameseparators and time-zone rendering — neither is compared, so don't read a diff of them as the cause.
TeamCity configuration
-
The pipeline lives in
.teamcity/settings.kts(portable Kotlin DSL). The server compiles it by running Maven against.teamcity/pom.xml, so that pom must declare the DSL dependencies — it is not just IDE scaffolding. -
Validate locally before pushing. The server only reports compile errors after a commit, so verifying on the server means committing a patch per error. Instead run:
mvn -f .teamcity/pom.xml teamcity-configs:generateSuccess writes the generated XML under
.teamcity/target/generated-configs(git-ignored). This is exactly what the server does, so a clean run here means a clean import there. -
The pom depends on
configs-dsl-kotlin-latest, notconfigs-dsl-kotlin. The latter ships the versioned...configs.kotlin.v2019_2API;settings.ktsuses the modern unversionedjetbrains.buildServer.configs.kotlinpackage, and mixing them fails with "unresolved supertypes" on every DSL class. -
settings.ktsis a script, not a regular Kotlin file. Two consequences: top-levelconst valis rejected outright, and a plain top-levelvalreferenced from anobject ... : BuildType({ ... })fails with "captures the script class instance". Put shared literals asconst valinside a named object (seeConfig), which inlines them at each use site.
Git
- Root-level files are git-ignored by default.
.gitignorestarts with/*, then re-allows specific paths with!entries. Any new file at the repository root (e.g. a doc) needs its own!<filename>allowlist entry in.gitignore, or git will silently ignore it.