Skip to content

Commit

Permalink
[FIX] update CI validation (#503)
Browse files Browse the repository at this point in the history
* update validation

* rm link

* comment failing part of CI for now
  • Loading branch information
Remi-Gau authored Jun 17, 2024
1 parent 125993b commit c6d6dcc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ 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
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
2 changes: 1 addition & 1 deletion docs/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion examples/activities/items/item2.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
1 change: 1 addition & 0 deletions scripts/jsonParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/makeRelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")))

Expand Down

0 comments on commit c6d6dcc

Please sign in to comment.