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

[FIX] update CI validation #503

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading