This repository exists to coordinate the running of OpenDCS and district custom algorithms within our cloud environments. Everyone is welcome to use it if it meets their needs but the focus is on USACE WaterManagement functions.
If something appears to be very beneficial to the general usage of OpenDCS it should be merged into the main OpenDCS project at https://github.com/opendcs/opendcs.
This is a temporary program that will be used to handle multiple offices and compproc instances until such time as the main OpenDCS can handle that correctly.
There will be a location here to either:
- Compile the provided code (prefered)
- Reference an artifact somewhere, such as github packages from your own repo
- Just include the jar(s) (frown upon and we'll likely just decompile it and go back to 1.)
The repository includes a development container for GitHub Codespaces or a local Dev Containers installation. It provides the Java, Gradle, Go, and Docker tooling used by the algorithm, appstarter, and image builds.
In VS Code, open the repository and run Dev Containers: Reopen in Container. On GitHub, create a Codespace for the repository; the same configuration is used automatically.
Run the primary checks from the container terminal:
cd algorithms
./gradlew test
cd ../appstarter
go test ./...
cd ..
docker build --target apps -t opendcs-wm-apps:dev .-
Create a Gradle subproject under
algorithms/<district>/<project>and apply thealgorithms.deps-conventionsandalgorithms.java-conventionsplugins. -
Add the subproject to
algorithms/settings.gradle. -
Add its project dependency to the appropriate configuration in
algorithms/distribution/build.gradleso its JAR is included in thedistrict-algorithmsdistribution. -
Put implementation code under
src/main/javaand JUnit tests undersrc/test/java. -
Run a focused test while iterating:
cd algorithms ./gradlew :<district>:<project>:test
Before opening a change, run ./gradlew test from algorithms, go test ./...
from appstarter, and the Docker build shown above.