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

Add check for location property to test id 86 #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tom-tan
Copy link
Member

@tom-tan tom-tan commented Aug 7, 2018

The specification says:

Directory objects in CommandLineTool output must provide either a location URI or a path property...

However, the corresponding test id 86 that uses dir3.cwl and dir3-job.yml only checks a listing property but does not check location and path properties.

This request fixes this issue by checking the existence of location property.

@mr-c
Copy link
Member

mr-c commented Aug 7, 2018

Would this fail an implementations that only provided path?

@tom-tan
Copy link
Member Author

tom-tan commented Aug 8, 2018

Would this fail an implementations that only provided path?

Yes.
The better solution is to make cwltest checkable either location or path.

Copy link
Member

@stain stain left a comment

Choose a reason for hiding this comment

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

It is not clear from the spec if it would be legal to output a Directory with only path and neither listing nor location, as other parts of the spec relates to location. So I don't think we should test for path here.

It should however be OK to output a directory that only have location - but this test does not verify that as it looks like it would insist on listing to also be there.

It should also be OK for an implementation to accept/output a Directory that have only listing and no location, for instance in CWLProv's rewritten output JSON we use this because the files have independent locations that are not in a common directory related to the listing.

    "dir1": {
        "basename": "dir1",
        "nameroot": "dir1",
        "nameext": "",
        "class": "Directory",
        "@id": "urn:uuid:3a774b2b-30bb-4c1a-9a12-65afcf4ca336",
        "listing": [
            {
                "class": "File",
                "location": "../data/86/86f7e437faa5a7fce15d1ddcb9eaeaea377667b8",
                "basename": "a.txt",
                "checksum": "sha1$86f7e437faa5a7fce15d1ddcb9eaeaea377667b8",
                "@id": "urn:uuid:ec98127e-c59e-4211-89d2-a3f3247be260"
            },
            {
                "class": "Directory",
                "basename": "a",
                "listing": [
                    {
                        "class": "File",
                        "location": "../data/e9/e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98",
                        "basename": "b.txt",
                        "checksum": "sha1$e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98",
                        "@id": "urn:uuid:d430551c-b518-4f92-b29b-014c1272ef64"
                    },
                    {
                        "class": "Directory",
                        "basename": "b",
                        "listing": [
                            {
                                "class": "File",
                                "location": "../data/84/84a516841ba77a5b4648de2cd0dfcb30ea46dbb4",
                                "basename": "c.txt",
                                "checksum": "sha1$84a516841ba77a5b4648de2cd0dfcb30ea46dbb4",
                                "@id": "urn:uuid:cab69d11-2a0b-4f44-833f-964e8384d8a0"
                            }
                        ],
# ...

Perhaps @mr-c can fill me in just in case I misunderstood - several of the other tests already talk about Directory with both listing and location: Any

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.

None yet

3 participants