gov.nasa.pds:validate

Validates PDS4 product labels, data and PDS3 Volumes

https://github.com/nasa-pds/validate

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

nasa nasa-pds pds pds4 validation
Last synced: 6 months ago · JSON representation

Repository

Validates PDS4 product labels, data and PDS3 Volumes

Basic Info
Statistics
  • Stars: 18
  • Watchers: 11
  • Forks: 14
  • Open Issues: 78
  • Releases: 0
Topics
nasa nasa-pds pds pds4 validation
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Codeowners Security Zenodo

README.md

Validate Tool

DOI  Unstable integration & delivery  Stable integration & delivery

Project containing software for validating PDS4 products and PDS3 volumes. The software is packaged in a JAR file with a command-line wrapper script to execute validation.

Visit the project's website at: https://nasa-pds.github.io/validate/

Getting Started

Build the Software

The software can be compiled and built with the mvn compile or mvn package commands.

In order to create a complete distribution package with the site build, execute the following commands:

console mvn package site

Documentation

The documentation for the latest release of the Validate Tool, including release notes, installation and operation of the software are online. If you would like to get the latest documentation, including any updates since the last release, you can execute the mvn site:run command and view the documentation locally at http://localhost:8080.

Debugging Notes

Since Validate extends the slf4j logging mechanism for it's reporting. As of now, there is no easy way to see the debug log messages scattered throughout the code. To see them while debugging/testing your implementation, you will need to replace the SLF4J NOP dependency with the SimpleLogger dependency and enable the DEBUG level.

Here is how to do it via command-line. This may differ if you use Eclipse for debugging:

  1. Open pom.xml and comment this out: xml <!-- <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>1.7.28</version> </dependency> -->

  2. Uncomment this to enable the simplelogger: xml <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.28</version> </dependency>

  3. Add this to the validate CLI script anywhere before the "$@" OR add to JAVA_TOOL_OPTIONS environment variable: ``` -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG

export JAVATOOLOPTIONS=-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG ``` I think you can also add this to your JAVA_OPTS prior to execution.

  1. Build the software while disabling tests (they may fail with all the extra logging): mvn clean package -DskipTests
  2. Then untar and test the software.

Contributing

Within the NASA Planetary Data System, we value the health of our community as much as the code. Towards that end, we ask that you read and practice what's described in these documents:

  • Our contributor's guide delineates the kinds of contributions we accept.
  • Specifically for validate, see https://github.com/NASA-PDS/validate/blob/main/src/site/markdown/developer/contribute.md
  • Our code of conduct outlines the standards of behavior we practice and expect by everyone who participates with our software.

Join our mailing list! Send an email to pds-validate-users+subscribe@groups.io to subscribe.

Versioning

We use the SemVer philosophy for versioning this software. Or not! Update this as you see fit.

Development

To develop this project, use your favorite text editor, or an integrated development environment with Java support, such as Eclipse. You'll also need Apache Maven version 3. With these tools, you can typically run

mvn package

to produce a complete package. This runs all the phases necessary, including compilation, testing, and package assembly. Other common Maven phases include:

  • compile - just compile the source code
  • test - just run unit tests
  • install - install into your local repository
  • deploy - deploy to a remote repository note that the Roundup action does this automatically for releases

Pre-Commit Hooks and Detect Secrets

This package comes with a configuration for Pre-Commit, a system for automating and standardizing git hooks for code linting, security scanning, etc. Here in this Java template repository, we use Pre-Commit with Detect Secrets to prevent the accidental committing or commit messages containing secrets like API keys and passwords.

Pre-Commit and detect-secrets are language-neutral, but they themselves are written in Python. To take advantage of these features, you'll need a nearby Python installation. A recommended way to do this is with a virtual Python environment. Using the command line interface, run:

console $ python -m venv .venv $ source .venv/bin/activate # Use source .venv/bin/activate.csh if you're using a C-style shell $ pip install pre-commit git+https://github.com/NASA-AMMOS/slim-detect-secrets.git@exp

If you encounter a failed secrets check run, you can establish a secrets baseline in your Maven-based repository:

detect-secrets scan . \
    --all-files \
    --disable-plugin AbsolutePathDetectorExperimental \
    --exclude-files '\.secrets..*' \
    --exclude-files '\.git.*' \
    --exclude-files 'target' > .secrets.baseline

Review the secrets to determine which should be allowed and which are false positives:

detect-secrets audit .secrets.baseline

Please remove any secrets that should not be seen by the public. You can then add the baseline file to the commit:

git add .secrets.baseline

Finally, install the pre-commit hooks:

pre-commit install
pre-commit install -t pre-push
pre-commit install -t prepare-commit-msg
pre-commit install -t commit-msg

You can then work normally. Pre-commit will run automatically during git commit and git push so long as the Python virtual environment is active.

Note: For Detect Secrets to work, there is a one-time setup required to your personal global Git configuration. See the wiki entry on Detect Secrets to learn how to do this.

Continuous Integration & Deployment

Thanks to GitHub Actions and the Roundup Action, this software undergoes continuous integration and deployment. Every time a change is merged into the main branch, an "unstable" (known in Java software development circles as a "SNAPSHOT") is created and delivered to the releases page and to the OSSRH.

You can make an official delivery by pushing a release/X.Y.Z branch to GitHub, replacing X with the major version number, Y with the minor version number, and Z with the micro version number. This results in a stable (non-SNAPSHOT) release generated and cryptographically signed (but by an automated process so alter trust expectations accordingly) and made available on the releases page and OSSRH; the website published; changelogs and requirements updated; and a new version number in the main branch prepared for future development.

The following sections detail how to do this manually should the automated steps fail.

Manual Publication

Update Version Numbers

Update pom.xml for the release version or use the Maven Versions Plugin, e.g.:

```console

Skip this step if this is a RELEASE CANDIDATE, we will deploy as SNAPSHOT version for testing

VERSION=1.15.0 mvn versions:set -DnewVersion=$VERSION git add pom.xml git add */pom.xml ```

Update Changelog

Update Changelog using Github Changelog Generator. Note: Make sure you set $CHANGELOG_GITHUB_TOKEN in your .bash_profile or use the --token flag. ```console

For RELEASE CANDIDATE, set VERSION to future release version.

GITHUBORG=NASA-PDS GITHUBREPO=validate githubchangeloggenerator --future-release v$VERSION --user $GITHUBORG --project $GITHUBREPO --configure-sections '{"improvements":{"prefix":"Improvements:","labels":["Epic"]},"defects":{"prefix":"Defects:","labels":["bug"]},"deprecations":{"prefix":"Deprecations:","labels":["deprecation"]}}' --no-pull-requests --token $GITHUB_TOKEN

git add CHANGELOG.md ```

Commit Changes

Commit changes using following template commit message: ```console

For operational release

git commit -m "[RELEASE] Validate v$VERSION"

Push changes to main

git push -u origin main ```

Build and Deploy Software to Sonatype Maven Repo.

```console

For operational release

mvn clean site site:stage package deploy -P release

For release candidate

mvn clean site site:stage package deploy ```

Note: If you have issues with GPG, be sure to make sure you've created your GPG key, sent to server, and have the following in your ~/.m2/settings.xml: ```xml true gpg KEYNAME KEYPASSPHRASE

```

Push Tagged Release

```console

For Release Candidate, you may need to delete old SNAPSHOT tag

git push origin :v$VERSION

Now tag and push

REPO=validate git tag v${VERSION} -m "[RELEASE] $REPO v$VERSION" -m "See CHANGELOG for more details." git push --tags ```

Deploy Site to Github Pages

From cloned repo: ```console git checkout gh-pages

Copy the over to version-specific and default sites

rsync -av target/staging/ .

git add .

For operational release

git commit -m "Deploy v$VERSION docs"

For release candidate

git commit -m "Deploy v${VERSION}-rc${CANDIDATE_NUM} docs"

git push origin gh-pages ```

Update Versions For Development

Update pom.xml with the next SNAPSHOT version either manually or using Github Versions Plugin.

For RELEASE CANDIDATE, ignore this step.

```console git checkout main

For release candidates, skip to push changes to main

VERSION=1.16.0-SNAPSHOT mvn versions:set -DnewVersion=$VERSION git add pom.xml git commit -m "Update version for $VERSION development"

Push changes to main

git push -u origin main ```

Complete Release in Github

Currently the process to create more formal release notes and attach Assets is done manually through the Github UI but should eventually be automated via script.

NOTE: Be sure to add the tar.gz and zip from the target/ directory to the release assets, and use the CHANGELOG generated above to create the RELEASE NOTES.

Snapshot Release

Deploy software to Sonatype SNAPSHOTS Maven repo:

```console

Operational release

mvn clean site deploy ```

Maven JAR Dependency Reference

Operational Releases

https://search.maven.org/search?q=g:gov.nasa.pds%20AND%20a:validate&core=gav

Snapshots

https://oss.sonatype.org/content/repositories/snapshots/gov/nasa/pds/validate/

If you want to access snapshots, add the following to your ~/.m2/settings.xml: xml <profiles> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> </profile> </profiles>

Owner

  • Name: NASA Planetary Data System Software
  • Login: NASA-PDS
  • Kind: organization
  • Email: pds-operator@jpl.nasa.gov

GitHub Events

Total
  • Create event: 271
  • Release event: 84
  • Issues event: 101
  • Watch event: 2
  • Delete event: 266
  • Issue comment event: 773
  • Push event: 423
  • Pull request review comment event: 24
  • Pull request review event: 82
  • Pull request event: 380
  • Fork event: 3
Last Year
  • Create event: 271
  • Release event: 84
  • Issues event: 101
  • Watch event: 2
  • Delete event: 266
  • Issue comment event: 773
  • Push event: 423
  • Pull request review comment event: 24
  • Pull request review event: 82
  • Pull request event: 380
  • Fork event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 202
  • Total pull requests: 336
  • Average time to close issues: 6 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 39
  • Total pull request authors: 7
  • Average comments per issue: 4.76
  • Average comments per pull request: 1.42
  • Merged pull requests: 195
  • Bot issues: 1
  • Bot pull requests: 236
Past Year
  • Issues: 61
  • Pull requests: 261
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Issue authors: 21
  • Pull request authors: 7
  • Average comments per issue: 3.89
  • Average comments per pull request: 1.34
  • Merged pull requests: 134
  • Bot issues: 1
  • Bot pull requests: 205
Top Authors
Issue Authors
  • jordanpadams (117)
  • rgdeen (14)
  • rchenatjpl (12)
  • jstone-psi (11)
  • tbarnes4 (10)
  • msbentley (9)
  • dependabot[bot] (6)
  • mace-space (6)
  • jennifergward (5)
  • cgobat (4)
  • al-niessner (4)
  • jmafi (3)
  • smclaughlin7 (3)
  • radiosci (3)
  • jpl-jengelke (3)
Pull Request Authors
  • dependabot[bot] (368)
  • al-niessner (104)
  • jordanpadams (27)
  • nutjob4life (8)
  • rchenatjpl (4)
  • tloubrieu-jpl (2)
  • tbarnes4 (1)
  • MichaelRigali (1)
  • cgobat (1)
  • rgdeen (1)
  • mace-space (1)
Top Labels
Issue Labels
bug (142) sprint-backlog (90) s.medium (57) needs:triage (52) requirement (49) i&t.skip (40) icebox (37) proj.validate (35) B13.1 (34) p.must-have (31) B14.0 (29) B15.1 (28) B15.0 (27) i&t.done (26) B14.1 (26) s.low (25) open.3.6.3 (23) s.high (20) open.3.7.0 (20) open.3.7.1 (20) p.should-have (20) enhancement (19) task (18) Epic (14) theme (13) B13.0 (12) invalid (11) p.could-have (10) B16 (10) wontfix (9)
Pull Request Labels
java (277) needs:dependency (237) dependencies (129) terraform (81) sprint-backlog (8) github_actions (7) WIP (3) bug (3) B15.0 (2) s.medium (2) needs:triage (1) invalid (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 62
repo1.maven.org: gov.nasa.pds:validate

The Validate Tool project contains software for validating PDS4 product labels and product data according to the PDS4 Standards.

  • Versions: 62
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 25.5%
Stargazers count: 29.9%
Dependent repos count: 32.0%
Average: 34.1%
Dependent packages count: 48.9%
Last synced: 6 months ago

Dependencies

.github/workflows/branch-cicd.yaml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/stable-cicd.yaml actions
  • NASA-PDS/roundup-action stable composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/unstable-cicd.yaml actions
  • NASA-PDS/roundup-action stable composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/update-context-validation.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
  • ad-m/github-push-action master composite
docker/Dockerfile docker
  • openjdk 15-slim build
pom.xml maven
  • commons-cli:commons-cli 1.4 compile
  • commons-collections:commons-collections 3.2.2 compile
  • commons-configuration:commons-configuration 1.10 compile
  • commons-digester:commons-digester 2.1 compile
  • commons-lang:commons-lang 2.6 compile
  • commons-logging:commons-logging 1.2 compile
  • gov.nasa.pds:pds3-product-tools 4.0.1 compile
  • gov.nasa.pds:pds4-jparser 2.3.0-SNAPSHOT compile
  • com.google.code.gson:gson 2.8.9
  • com.google.guava:guava 30.1.1-jre
  • com.jamesmurty.utils:java-xmlbuilder 1.2
  • com.sun.activation:javax.activation 1.2.0
  • com.sun.xml.bind:jaxb-impl 2.3.4
  • com.sun.xml.bind:jaxb-xjc 2.3.4
  • commons-chain:commons-chain 1.2
  • commons-io:commons-io 2.7
  • net.sf.saxon:Saxon-HE 9.9.1-7
  • org.apache.commons:commons-compress 1.21
  • org.apache.commons:commons-lang3 3.9
  • org.apache.logging.log4j:log4j-core 2.17.1
  • org.apache.solr:solr-solrj 7.7.2
  • org.jsoup:jsoup 1.14.2
  • org.slf4j:slf4j-nop 1.7.28
  • org.verapdf:pdfbox-validation-model 1.20.1
  • xerces:xercesImpl 2.12.2
  • xml-resolver:xml-resolver 1.2
  • io.cucumber:cucumber-java 6.9.1 test
  • io.cucumber:cucumber-junit 6.9.1 test
  • org.junit.jupiter:junit-jupiter 5.7.0 test
  • org.junit.vintage:junit-vintage-engine 5.7.0 test