GithubHelp home page GithubHelp logo

rakshathammaiah / ok-validate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from helpfulengineering/ok-validate

0.0 0.0 0.0 89 KB

Validation of Open Know How specification and related schemas (https://openknowhow.org)

License: Apache License 2.0

Dockerfile 8.19% Python 80.52% Shell 11.29%

ok-validate's Introduction

ok-validate

Validation of Open Know How specification and related schemas (https://openknowhow.org)

GitHub Action

This action uses an Open Knowledge Framework schema to validate your manifest such as for OKH

Inputs

cpu-num

Optional How many cores to use. Default "4".

file-restrictions

Optional For a given path or directory, only process these (space separated) files. Useful for pull requests. Default "".

ok

Optional Which Open Knowledge Framework schema to use for validation. Default "okh".

parser

Optional YAML library to load file. Default "pyyaml" (can be one of "pyyaml" or "ruamel").

path

Required The path to your manifest or manifests relative to your workspace. Default "./".

schema

Optional The full path to an Open Knowledge Framework schema or custom schema to use for validation. Default "".

strict

Optional Whether to run in strict mode. Default "false" (can be one of "true" or "false").

Example usage

uses: helpfulengineering/[email protected]
uses: helpfulengineering/[email protected]
with:
  path: './some/path/to/file.yaml'

CLI usage

usage: okv [-h] [-path [PATH]] [-s SCHEMA] [-n CPU_NUM] [-p PARSER] [--no-strict] [--no-error] [--ok OK]

Validate yaml files.

optional arguments:
  -h, --help            show this help message and exit
  -path [PATH]          folder to validate. Default is current directory.
  -s SCHEMA, --schema SCHEMA
                        filename of schema. Default is schema.yaml.
  -n CPU_NUM, --cpu-num CPU_NUM
                        number of CPUs to use. Default is 4.
  -p PARSER, --parser PARSER
                        YAML library to load files. Choices are "ruamel" or "pyyaml" (default).
  --no-strict           Disable strict mode, unexpected elements in the data will be accepted.
  --no-error            Ignore error when violation of schema is identified.
  --ok OK               This indicates which Open Know specification to use.

Docker

Usage

The Docker image accepts all of the CLI arguments as detailed above.

docker run --rm -v ${PWD}/:/tmp/ ok-validate --ok=okh -path=/tmp/path/to/okh-file.yaml

Automatic releasing

https://github.com/anothrNick/github-tag-action#bumping

Manual Bumping: Any commit message that includes #major, #minor, #patch, or #none will trigger the respective version bump. If two or more are present, the highest-ranking one will take precedence. If #none is contained in the commit message, it will skip bumping regardless DEFAUT_BUMP.

ok-validate's People

Contributors

psprings avatar lepidopterane-atsmith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.