Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASE Utils 0.16 #21

Merged
merged 5 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/annotate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [ pull_request ]

jobs:
annotate:
if: github.event.pull_request.head.user == 'kchason'
if: github.event.pull_request.head.user.login == 'kchason'
runs-on: ubuntu-latest
steps:

Expand All @@ -16,7 +16,7 @@ jobs:
uses: ./
with:
case-path: "./tests/data/"
case-version: "case-1.2.0"
case-version: "case-1.3.0"
report-in-pr: "true"
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ jobs:
uses: ./
with:
case-path: "./tests/data/simple-case.jsonld"
case-version: "case-1.2.0"
case-version: "case-1.3.0"

- name: Run Action - Directory Filter
uses: ./
with:
case-path: "./tests/data/"
case-version: "case-1.2.0"
case-version: "case-1.3.0"
extension-filter: "jsonld"

- name: Run Action - Directory No Filter
uses: ./
with:
case-path: "./tests/data/"
case-version: "case-1.2.0"
case-version: "case-1.3.0"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM python:3.11-slim-bullseye
WORKDIR /opt/workspace

# Install dependencies
RUN python -m pip install case-utils==0.15.0 PyGithub
RUN python -m pip install case-utils==0.16.0 PyGithub

# Delete source files now that package has been installed
WORKDIR /opt/workspace
Expand All @@ -14,7 +14,7 @@ COPY entrypoint.py /opt/workspace/entrypoint.py

# Define the base path for the validation path
ENV CASE_PATH "/opt/json/"
ENV CASE_VERSION "case-1.2.0"
ENV CASE_VERSION "case-1.3.0"
ENV CASE_EXTENSION_FILTER ""
ENV CASE_VALIDATE_ABORT "false"

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Include the validation action in your GitHub action workflow and specify the fil
```yaml
# Run the CASE validation job to confirm the output is valid
- name: CASE Export Validation
uses: kchason/case-validation-action@v2.8.0
uses: kchason/case-validation-action@v2.9.0
with:
case-path: ./output/
case-version: "case-1.2.0"
case-version: "case-1.3.0"
extension-filter: "jsonld"
report-in-pr: "true"
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -51,7 +51,7 @@ modified to fit custom use cases.
# To run the latest image and remove the container after execution.
docker run --rm \
-e CASE_PATH="/opt/case/" \
-e CASE_VERSION="case-1.2.0" \
-e CASE_VERSION="case-1.3.0" \
-e CASE_EXTENSION_FILTER="jsonld" \
-v "/path/to/local:/opt/case" \
kchason/case-validator:latest
Expand All @@ -70,7 +70,7 @@ at [https://gitlab.com/keith.chason/case-validation-example](https://gitlab.com/
| Action Variable | Environment Variable | Description | Options | Default |
|------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|--------------|
| case-path | CASE_PATH | The path to the file or directory to be validated. | Any | /opt/json |
| case-version | CASE_VERSION | The version of the ontology against which the graph should be validatated. | "none", "case-0.5.0", "case-0.6.0" , "case-0.7.0", "case-0.7.1", "case-1.0.0", "case-1.1.0", "case-1.2.0" | "case-1.2.0" |
| case-version | CASE_VERSION | The version of the ontology against which the graph should be validatated. | "none", "case-0.5.0", "case-0.6.0" , "case-0.7.0", "case-0.7.1", "case-1.0.0", "case-1.1.0", "case-1.2.0", "case-1.3.0" | "case-1.3.0" |
| extension-filter | CASE_EXTENSION_FILTER | The extension of only the files against which the validator should be run. Eg. `"json"`, `"jsonld"`, `"case"`. Defaults to `""` to run against all files defined in `case-path`. | Any | "" |
| abort | CASE_VALIDATE_ABORT | Whether to abort the validator on the first failure | "true", "false" | "false" |
| report-in-pr | REPORT_IN_PR | Whether or not to report the validation results in the pull request. Only reports if the action is triggered by a pull request. | "true", "false" | "false" |
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ inputs:
required: false
default: '/opt/json/'
case-version:
description: 'The version of the ontology against which the graph should be validated. Options: "none", "case-0.5.0", "case-0.6.0", "case-0.7.0", "case-0.7.1", "case-1.0.0", "case-1.1.0", "case-1.2.0"'
description: 'The version of the ontology against which the graph should be validated. Options: "none", "case-0.5.0", "case-0.6.0", "case-0.7.0", "case-0.7.1", "case-1.0.0", "case-1.1.0", "case-1.2.0", "case-1.3.0"'
required: false
default: 'case-1.2.0'
default: 'case-1.3.0'
extension-filter:
description: 'The extension of only the files against which the validator should be run. Eg. "json", "jsonld", "case". Defaults to "" to run against all files defined in `case-path`.'
required: false
Expand All @@ -39,7 +39,7 @@ inputs:
default: ''
runs:
using: 'docker'
image: 'docker://kchason/case-validator:1.4.0'
image: 'docker://kchason/case-validator:1.5.0'
env:
CASE_PATH: ${{ inputs.case-path }}
CASE_VERSION: ${{ inputs.case-version }}
Expand Down
Loading