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

feat: run jobs in parallel #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: run jobs in parallel #5

wants to merge 2 commits into from

Conversation

tpluscode
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 6ec325b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@zazuko/shacl-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ludovicm67
Copy link
Member

ludovicm67 commented Nov 4, 2024

@tpluscode could you provide a basic example on how to invoke and try it on some demo data?

So far, this is what I have:

npx . --shapes=https://cube.link/latest/shape/standalone-cube-constraint --concurrency=8 --debug

But nothing is displayed. I only get this:

🐞 Command: npx barnard59 shacl validate --shapes https://cube.link/latest/shape/standalone-cube-constraint
🐞 Concurrency: 8
🐞 Filter:
🐞 Approval flags:

@tpluscode
Copy link
Contributor Author

tpluscode commented Nov 6, 2024

Technically you don't need --valid-cases and --invalid-cases but you do need to link to some test data graphs :)

I expanded the script output in #6

success=$?
} < "$file"

if [ $success -ne 0 ] ; then
Copy link
Member

@ludovicm67 ludovicm67 Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run it using the following command:

npx . --shapes="../cube-link/validation/$1.ttl" \
 --valid-cases="../cube-link/test/$1/valid*.ttl" \
 --invalid-cases="../cube-link/test/$1/invalid*.ttl" \
 --command="npx b59 cube check-metadata --profile" \
 --prefixes=schema,cube=https://cube.link/ \
 --concurrency=8 --debug

(I cloned the cube-link repo next to the shacl-test repo).

And here are the errors I can see from my side (translated from French):

line 108: ../cube-link/test//valid*.ttl: No such file or directory
line 102 : [:  : integer expression expected

So am I doing something wrong while invocating the command?
Could you provide a working example, so that I can try it?

I took some inspiration from here: https://github.com/zazuko/cube-link/blob/7c2e6db06051b2234d85b82116dd6d16f00c62d5/test/check-metadata.sh

Also, is there any reason to keep this as a shell script instead of a NodeJS script?
That way this would be able to work on more systems, including ones that doesn't bring bash by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants