This repository contains the Open Water Foundation TSTool plugin for the Synoptic web services. This plugin can be installed to enable commands that integrate TSTool with Synoptic data services.
TSTool is part of Colorado's Decision Support Systems (CDSS). See the following online resources:
- Synoptic API documentation - requires a Synoptic account and API token
- MesoWest web services portal - uses the Synoptic API
- TSTool Synoptic Plugin download page
- TSTool Synoptic Plugin Documentation
- TSTool User Documentation
- TSTool Developer Documentation
See the following sections in this page:
- Repository Folder Structure
- Repository Dependencies
- Adding to TSTool Eclipse Workspace
- Building the Plugin Jar File
- Building an Installer
- First Time Eclipse Project Setup
- Contributing
- License
- Contact
The following are the main folders and files in this repository, listed alphabetically.
C:\Users\user\ User's files on windows.
/c/Users/user/ User's files in Git bash.
cdss-dev/ Recommended folder for CDSS product development.
TSTool/ Recommended folder for TSTool development.
git-repos/ Recommended folder for TSTool product repositories.
owf-tstool-synoptic-plugin/ Repository working files.
.gitattributes Git configuration file for repository.
.gitignore Git configuration file for repository.
build-util/ Utilities used in the build process.
dist/ Folder containing software installers.
doc-init/ Notes for initialing the project the first time
(for the first developer).
doc-user-mkdocs-project/ MkDocs project for user documentation.
owf-tstool-synoptic-plugin/ Maven project source code and supporting files.
.classpath Eclipse configuration file.
.project Eclipse configuration file.
.settings/ Eclipse settings for developer.
src/ Plugin source code.
target/ Compiled code.
README.md This file.
test/ End-to-end tests for commands similar to TSTool commands.
This project is configured using Maven, which manages third-party dependencies.
Additionally, the following table lists Eclipse project dependencies that are not managed by Maven.
Repository | Description |
---|---|
cdss-lib-common-java |
Library of core utility code used by multiple TSTool repositories (projects). |
cdss-lib-processor-ts-java |
Library containing processor code for TSTool commands. |
This section explains how to add the TSTool Synoptic plugin to the TSTool core development environment.
- If not already installed, install the
Maven command line tools,
which are used by scripts outside of Eclipse's built-in Maven tools.
Copy the unzipped file to
C:\Program Files\Maven\apache-maven-3.8.6
(or similar). - Start by setting up TSTool according to the TSTool documentation for developers.
- Clone this repository similar to other TSTool repositories.
- In Eclipse, use the File / Import... menu to display the Import dialog.
- Select the *Maven / Existing Maven Projects choice and then Next.
- Browse to the
cdss-dev/TSTool/git-repos/owf-tstool-synoptic-plugin/owf-tstool-synoptic-plugin
folder and Select Folder. The folders are redundant because one is for the repository and one is the Maven project. - The Maven Projects dialog will be shown with the
pom.xml
file selected for this repository. Press Finish. - The project will be shown in the Package Explorer and Project Explorer views, with errors indicated because dependencies have not been configured.
- Right click on
owf-tstool-synoptic-plugin
in Package Explorer or Project Explorer and select Build Path / Configure Build Path. The Jar file and Maven libraries will already be selected from the project configuration file. In the Projects tab, the project dependencies should also be configured. - The project may have compile errors, for example because Eclipse is trying to use an older version of Java compliance by default, which is incompatible with current code.. Right click on the project and select Properties. The select Java Compiler. If necessary, uncheck the Enable project specific settings and press Apply and Close. This will cause the project to use the workspace configuration consistent with the core software.
- Remember to run the
build-util/0-create-plugin-jar.bash
script after the initial compile and other code changes, which will build and copy the plugin Jar file to the user's TSTool files. Then when TSTool is run from Eclipse, the plugin will be found in the normal location and will be loaded for testing.
Plugin Eclipse projects are not part of the "built in" TSTool code. During development, plugins are handled as follows:
- Eclipse project:
- The
owf-tstool-synoptic-plugin
repository is added as a Maven project. - The project's build path is configured to use appropriate Maven dependencies,
such as the Java Maven libraries (currently none) and other TSTool projects,
such as
cdss-lib-common-java
.
- The
- Plugin jar file:
- The plugin is recognized by TSTool via the plugin design, not the Eclipse build path. In other words, plugins are handled as per the production code.
- Therefore, run the
build-util/0-create-plugin-jar.bash
script to create the pluginjar
file in the user's.tstool/NN/plugins
folder in order to test the plugin. - The above script relies on the
owf-tstool-synoptic-plugin/src/main/resources/META-INF/MANIFEST.MF
file to provide information about the plugin to TSTool, including the list of plugin commands and third-partyjar
files that are used by the plugin.
The plugin is currently distributed on Windows using a zip file, using the following procedure:
- Update the version:
- Update the
src/main/java/owf-tstool-synoptic-plugin/org/openwaterfoundation/tstool/plugin/synoptic/PluginMeta.java
source file. - The version is extracted by scripts below to use in the documentation location and zip file name, which results in versioned installers being listed in the product landing page.
- Update the
- Update the documentation:
- Update the documentation to be current and include release notes consistent with the version.
- Update the
index.md
file to be consistent with the version. - Upload to S3 by running
doc-user-mkdocs-project/build-util/copy-to-owf-amazon-s3.bash
.
- Create the installer:
- Run the
build-util/0-create-plugin-jar.bash
script to create the plugin jar file. Confirm that there is only one jar file version in the plugins folder (the script will warn if more than one java file exists). - Run the
build-util/1-create-installer.bash
script to create the installer. - Run the
build-util/2-copy-to-owf-amazon-s3.bash
script. This will upload the local zip file to OWF's S3 bucket. The script prompts as to whether to update the product landing pageindex.html
. - If not run from the above script,
run the
build-util/3-create-s3-index.bash
script to create the plugin landing page.
- Run the
Contributions to this project can be submitted using the following options:
- TSTool software developers with commit privileges can write to this repository.
- Post an issue on GitHub with suggested change.
- Fork the repository, make changes, and do a pull request. Contents of the current master branch should be merged with the fork to minimize code review before committing the pull request.
See also the OpenCDSS / TSTool protocols.
Copyright Open Water Foundation.
The software is licensed under GPL v3+. See the LICENSE.md file.
Steve Malers, @smalers, steve.malers@openwaterfoundation.org.