Skip to content

Update db-xrefs.yaml for #2374 #1451

Update db-xrefs.yaml for #2374

Update db-xrefs.yaml for #2374 #1451

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
validate_yaml_and_metadata:
runs-on: ubuntu-latest
container: geneontology/dev-base:latest
steps:
- uses: actions/checkout@v2
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
# - name: Set up Ruby
# uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
# with:
# ruby-version: 2.2.10
- name: Install packages
run: apt-get update -qq && apt-get install -y kwalify python3 python3-pip mmv -qq
- name: Install python stuff
run: pip3 install pyyaml typing graphstore/rule-runner linkml==1.7.4
## Users.
- name: Test users schema.
run: |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test users metadata.
run: |
kwalify -E -f metadata/users.schema.yaml metadata/users.yaml 2>&1
kwalify -E -f metadata/users.schema.yaml metadata/users.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
## Groups.
- name: Test groups schema.
run: |
kwalify -E -m metadata/groups.schema.yaml 2>&1
kwalify -E -m metadata/groups.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test groups metadata.
run: |
kwalify -E -f metadata/groups.schema.yaml metadata/groups.yaml 2>&1
kwalify -E -f metadata/groups.schema.yaml metadata/groups.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
## DB Xrefs.
- name: Test dbxrefs schema.
run: |
kwalify -E -m metadata/db-xrefs.schema.yaml 2>&1
kwalify -E -m metadata/db-xrefs.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test dbxrefs metadata.
run: |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
## Datasets.
- name: Test datasets schema.
run: |
kwalify -E -m metadata/datasets.schema.yaml 2>&1
kwalify -E -m metadata/datasets.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test datasets metadata.
run: |
kwalify -E -f metadata/datasets.schema.yaml metadata/datasets/*.yaml 2>&1
kwalify -E -f metadata/datasets.schema.yaml metadata/datasets/*.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
## Extension constraints.
- name: Test extension constraints schema.
run: |
kwalify -E -m metadata/extensions-constraints.schema.yaml 2>&1
kwalify -E -m metadata/extensions-constraints.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test extension constraints metadata.
run: |
kwalify -E -f metadata/extensions-constraints.schema.yaml metadata/extensions-constraints.yaml 2>&1
kwalify -E -f metadata/extensions-constraints.schema.yaml metadata/extensions-constraints.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
## GO reference species set.
- name: Test reference species set schema.
run: |
kwalify -E -m metadata/go-reference-species.schema.yaml 2>&1
kwalify -E -m metadata/go-reference-species.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test reference species set metadata.
run: |
kwalify -E -f metadata/go-reference-species.schema.yaml metadata/go-reference-species.yaml 2>&1
kwalify -E -f metadata/go-reference-species.schema.yaml metadata/go-reference-species.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true
test $(stat -c %s invalid.log) -eq 0
- name: Test GO_REF metadata
run: |
linkml-validate -s metadata/gorefs.schema.yaml metadata/gorefs.yaml
## Cross-test metadata
- name: Cross-test users and groups.
run: python3 ./scripts/sanity-check-users-and-groups.py --verbose --users metadata/users.yaml --groups metadata/groups.yaml
- name: Info
run: which sparta
## SPARTA
- name: SPARTA.
run: sparta valid --rules metadata/rules/ --schema metadata/rules.schema.yaml
## Run GO Rule examples
- name: GO Rule example validation
run: pip3 install -r pipeline/requirements.txt && ./scripts/rule-example-validation.sh