Skip to content

Commit

Permalink
Merge pull request #46 from workflowhub-eu/multiple-context-urls
Browse files Browse the repository at this point in the history
Test multiple context urls
  • Loading branch information
alexhambley authored Aug 21, 2024
2 parents 351ae98 + 0ea48ed commit f24b16c
Show file tree
Hide file tree
Showing 4 changed files with 503 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/lint-and-test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

# TODO: settle on style standards and enforce them
name: Lint and Test

on: [push]
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]


jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
REGISTRY: ghcr.io
ACTOR: OliverWoolland
IMAGE_NAME: ghcr.io/uomresearchit/workflowhub-graph
IMAGE_NAME: uomresearchit/workflowhub-graph

jobs:
build:
Expand Down
6 changes: 5 additions & 1 deletion tests/test_absolutize.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ def get_test_data_file(filename=""):

class TestAbsolutizePaths: # (unittest.TestCase):
# NOTE: ids can not be found, like 634, or forbidden, like 678
@pytest.mark.parametrize("workflow_id", [41, 31, 552, 883])
@pytest.mark.parametrize("workflow_id", [41, 31, 552, 883, 1046])
def test_make_paths_absolute(self, workflow_id):
with patch_rdflib_urlopen(get_test_data_file(), write_cache=False):
with open(
get_test_data_file(f"{workflow_id}_ro-crate-metadata.json"), "r"
) as f:
json_data = json.load(f)

if workflow_id == 1046:
# this is a special case where ther are two contexts
assert len(json_data["@context"]) == 2

assert not is_all_absolute(
rdflib.Graph().parse(data=json.dumps(json_data), format="json-ld")
Expand Down
Loading

0 comments on commit f24b16c

Please sign in to comment.