From 71e0799a58a8dde165cc3e18468da60c1224250c Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 17 Jun 2024 14:46:25 +0200 Subject: [PATCH 1/3] update validation --- .github/workflows/pythonpackage.yml | 6 +++--- examples/activities/items/item2.jsonld | 1 - scripts/jsonParser.py | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 676a7d44c0..32f5bad0b7 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -21,11 +21,11 @@ jobs: with: python-version: 3.12 - name: Install dependencies - # TODO update to install from the latest version on reproschema - # once https://github.com/ReproNim/reproschema-py/pull/40 has been merged and a new release has been made. + # TODO This installs reproschema from source and not from pypi + # This may not be the optimal way of doing it. run: | python -m pip install --upgrade pip setuptools - pip install git+https://github.com/Remi-Gau/reproschema-py.git@skip + pip install git+https://github.com/ReproNim/reproschema-py.git - name: Test with pyshacl run: | python scripts/jsonParser.py diff --git a/examples/activities/items/item2.jsonld b/examples/activities/items/item2.jsonld index d37c68c408..e149e1418e 100644 --- a/examples/activities/items/item2.jsonld +++ b/examples/activities/items/item2.jsonld @@ -14,7 +14,6 @@ "@type": "VideoObject", "contentUrl": "http://media.freesound.org/data/0/previews/719__elmomo__12oclock_girona_preview.mp4" }, - "imageUrl": "http://example.com/sample-image.jpg", "ui": { "inputType": "float" }, diff --git a/scripts/jsonParser.py b/scripts/jsonParser.py index b275f565d5..d3ef9c78cd 100644 --- a/scripts/jsonParser.py +++ b/scripts/jsonParser.py @@ -7,6 +7,7 @@ if os.path.basename(root) in schema_dirs: for name in files: with open(os.path.join(root, name)) as fp: + print(f" trying parsing {root}/{name} as json") try: tested += 1 json.load(fp) From ec81c1fe4fa0516de209254cd7153877e7e517b2 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 17 Jun 2024 14:49:45 +0200 Subject: [PATCH 2/3] rm link --- docs/project-structure.md | 2 +- scripts/makeRelease.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/project-structure.md b/docs/project-structure.md index dba9f337cf..8de0367ac4 100644 --- a/docs/project-structure.md +++ b/docs/project-structure.md @@ -31,7 +31,7 @@ The ReproSchema is like a blueprint for research projects, ensuring everyone col - **Activity Level:** At this stage, an entire survey or tool, made up of many items, is grouped together as an "Activity." It gives a complete overview of what the survey involves. - **Protocols Level:** The highest level, a "Protocol," bundles together all the activities a participant will do in a study, providing a comprehensive plan. -- **[Validation](https://github.com/ReproNim/reproschema/tree/main/validation):** The schema uses special standards (like SHACL files) to make sure the data and forms are up to standard and consistent. +- **Validation:** The schema uses special standards (like SHACL files) to make sure the data and forms are up to standard and consistent. - **Context Files:** These files ([`contexts`](https://github.com/ReproNim/reproschema/tree/master/contexts)and [`terms`](https://github.com/ReproNim/reproschema/tree/master/terms)) specify user-interface details and enhance schema flexibility. They define elements like input types, visibility conditions, and response options, supporting a tailored user experience. Additionally, they enable internationalization and multiple language support for broad applicability. diff --git a/scripts/makeRelease.py b/scripts/makeRelease.py index 301d9d8a01..5a81ca88ef 100644 --- a/scripts/makeRelease.py +++ b/scripts/makeRelease.py @@ -10,7 +10,7 @@ def create_release(version): # read all the terms terms = [] - for root, dirs, files in os.walk("terms"): + for root, _, files in os.walk("terms"): for name in files: terms.extend(json.loads(to_newformat(os.path.join(root, name), "jsonld"))) From 7c8a43f2e7147c90381cda0908cf4bd633f121b2 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 17 Jun 2024 15:01:35 +0200 Subject: [PATCH 3/3] comment failing part of CI for now --- .github/workflows/pythonpackage.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 32f5bad0b7..337730f6bd 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -30,8 +30,10 @@ jobs: run: | python scripts/jsonParser.py reproschema validate examples - - name: Make a release - run: | - python scripts/makeRelease.py ci-release - pip install pytablewriter - python scripts/editProperties.py ci-release + # TODO adapt make release + # TODO use mkdocs macro to update doc content + # - name: Make a release + # run: | + # python scripts/makeRelease.py ci-release + # pip install pytablewriter + # python scripts/editProperties.py ci-release