Skip to content

Commit 7c9cc5d

Browse files
authored
fix workflow, schema required fix #patch (#4)
1 parent 6a9ede3 commit 7c9cc5d

3 files changed

Lines changed: 35 additions & 6 deletions

File tree

.github/workflows/push-main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
jobs:
88
deploy:
9+
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v2
1112
- name: Bump version and push tag

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,37 @@ with:
4242
path: './some/path/to/file.yaml'
4343
```
4444
45+
## CLI usage
46+
47+
```
48+
usage: okv [-h] [-path [PATH]] [-s SCHEMA] [-n CPU_NUM] [-p PARSER] [--no-strict] [--no-error] [--ok OK]
49+
50+
Validate yaml files.
51+
52+
optional arguments:
53+
-h, --help show this help message and exit
54+
-path [PATH] folder to validate. Default is current directory.
55+
-s SCHEMA, --schema SCHEMA
56+
filename of schema. Default is schema.yaml.
57+
-n CPU_NUM, --cpu-num CPU_NUM
58+
number of CPUs to use. Default is 4.
59+
-p PARSER, --parser PARSER
60+
YAML library to load files. Choices are "ruamel" or "pyyaml" (default).
61+
--no-strict Disable strict mode, unexpected elements in the data will be accepted.
62+
--no-error Ignore error when violation of schema is identified.
63+
--ok OK This indicates which Open Know specification to use.
64+
```
65+
66+
## Docker
67+
68+
### Usage
69+
70+
The Docker image accepts all of the [CLI arguments as detailed above](#cli-usage).
71+
72+
```
73+
docker run --rm -v ${PWD}/:/tmp/ ok-validate --ok=okh -path=/tmp/path/to/okh-file.yaml
74+
```
75+
4576
## Automatic releasing
4677

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

okv/schemas/okh.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
# Manifest metadata
99

10-
# ps, we're keeping regex errors for emails + url whether they're required or not bc of web dev things ~ sea
11-
# this has both project link and doc home in it
1210
date-created: day()
1311
date-updated: day()
1412
manifest-author:
@@ -40,7 +38,7 @@ health-safety-notice: str(required=False) # paragraph
4038

4139
contact: include('contact-kit', required=False) # currently listed as required,
4240

43-
contributors: list(include('nonessential-contact'),required=False) # recommended
41+
contributors: list(include('nonessential-contact'), required=False) # recommended
4442

4543
image: regex('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+((.gif)|(.png)|(.jpg)|(.jpeg))$', name="valid image url", required=False)
4644
version: str(required=False) # text
@@ -105,7 +103,7 @@ standards-used:
105103
standard-title: str() # Required where used | Title of the standard used in developing the design or documentation
106104
publisher: str(required=False) # Publisher of the standard
107105
reference: str(required=False) # Reference indentifier of the standard (e.g. ISO 9001)
108-
certification: list(include('certification', required=False))
106+
certification: list(include('certification'), required=False)
109107

110108
list-item:
111109
path: include('url-type', required=False)
@@ -122,8 +120,7 @@ contact-kit:
122120
email: regex('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$', required=False)
123121
social: list(include('social-list-item'), required=False)
124122

125-
license-item: any(include('license-item-a'), include('license-item-b'),include('license-item-c'))
126-
# if there's a more optimized way to do that pls lmk ~ SEA
123+
license-item: any(include('license-item-a'), include('license-item-b'), include('license-item-c'))
127124
---
128125
# {license-list} is not a map comes from here
129126
license-item-a:

0 commit comments

Comments
 (0)