Skip to content

Commit

Permalink
Merge branch 'main' into doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yibeichan authored Jun 20, 2024
2 parents 5a21683 + f0eb3b0 commit 3eefa2d
Show file tree
Hide file tree
Showing 22 changed files with 328 additions and 179 deletions.
4 changes: 0 additions & 4 deletions .codespellrc

This file was deleted.

4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length=79
exclude =
scripts/editProperties.py
24 changes: 22 additions & 2 deletions .github/workflows/validate_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,32 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install linkml astor pre-commit
pip install git+https://github.com/ReproNim/reproschema-py.git
- name: Generate pydantic using linml and fixing it with reproschema specific script
run: |
gen-pydantic --pydantic-version 2 linkml-schema/reproschema.yaml > reproschema_model.py
python scripts/fix_pydantic.py reproschema_model.py
pre-commit run --files reproschema_model.py || true
- name: Generate jsonld format using linkml
run: |
gen-jsonld --context https://raw.githubusercontent.com/ReproNim/reproschema/main/contexts/reproschema linkml-schema/reproschema.yaml > reproschema.jsonld
- name: Generate n-triples and turtle formats using reproschema
run: |
reproschema convert --format n-triples reproschema.jsonld > reproschema.nt
reproschema convert --format turtle reproschema.jsonld > reproschema.ttl
- name: Make a release
run: |
echo "Making a release ${{ inputs.version }}"
mkdir releases/${{ inputs.version }}
cp contexts/reproschema releases/${{ inputs.version }}/base
cp contexts/reproschema releases/${{ inputs.version }}/reproschema
mv reproschema_model.py releases/${{ inputs.version }}/reproschema_model.py
mv reproschema.jsonld releases/${{ inputs.version }}/reproschema.jsonld
mv reproschema.nt releases/${{ inputs.version }}/reproschema.nt
mv reproschema.ttl releases/${{ inputs.version }}/reproschema.ttl
# python scripts/makeRelease.py ${{ inputs.version }}

- name: Open pull requests to add files
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "library"]
path = library
url = https://github.com/ReproNim/reproschema-library.git
datalad-url = https://github.com/ReproNim/reproschema-library.git
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,29 @@ repos:
- id: check-ast
- id: check-added-large-files
- id: check-merge-conflict

# Sorts Python imports alphabetically and by section with `isort`.
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--settings-path, pyproject.toml]

- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: [--toml, pyproject.toml]
additional_dependencies: [tomli]

- repo: https://github.com/pyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
args: [--config, .flake8, --verbose]
additional_dependencies: [flake8-bugbear]
1 change: 0 additions & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ you can explore them on [schema.repronim.org/](https://schema.repronim.org/rl/).

The ReproSchema is also used to develop a checklist to [improve methods and results reporting in neuroimaging](https://github.com/ohbm/cobidas).


## Linked data and semantic web

## What is the semantic web?
Expand Down
14 changes: 14 additions & 0 deletions docs/library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
hide:
- toc
---
# Reproschema library

At the moment, all the assessments that support this standard are listed in [this folder](https://github.com/ReproNim/reproschema-library/tree/master/activities) of the [reproschema-library repository](https://github.com/ReproNim/reproschema-library).

For convenience we are listing them in the table below.

If you want to see those different tools in action using our user interface,
you can explore them on [schema.repronim.org/](https://schema.repronim.org/rl/).

{{ MACROS___library_table() }}
3 changes: 1 addition & 2 deletions docs/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ questionnaire for your next participant or patient. Also you can mix and match
items from this library, knowing that the information is tracked in your protocol.

All assessments are listed in [the `activity` folder](https://github.com/ReproNim/reproschema-library/tree/master/activities)
and are served [here](https://schema.repronim.org/rl/) if you want to visualize
them.
and are served [here](https://schema.repronim.org/rl/) if you want to visualize them.

- **Standard Alignment:** Each element in the library aligns with the ReproSchema framework, ensuring uniformity in terms and structure and upholding validation protocols for consistency across the ecosystem.
- **Research Protocol Integration:** Researchers can utilize these assessments in various combinations to align with specific protocol needs, customizing their application per study objectives. This process can be integrated using the reproschema-protocol-cookiecutter for constructing user interfaces.
Expand Down
148 changes: 0 additions & 148 deletions docs/tutorials/collecting-demographics-information.md

This file was deleted.

1 change: 1 addition & 0 deletions library
Submodule library added at 9be140
22 changes: 9 additions & 13 deletions linkml-schema/reproschema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ slots:
slot_uri: schema:associatedMedia
audio:
title: audio
description: TODO
description: An audio object.
slot_uri: schema:audio
any_of:
- range: uri
Expand Down Expand Up @@ -101,12 +101,8 @@ slots:
contentUrl:
slot_uri: schema:contentUrl
range: uriorcurie
creator:
slot_uri: schema:creator
range: Person
cronTable:
title: cronTable
description: TODO not described in reproschema
slot_uri: reproschema:cronTable
datumType:
title: datumType
Expand Down Expand Up @@ -264,7 +260,7 @@ slots:
range: OverrideProperty
preamble:
title: Preamble
description: The preamble for an assessment
description: The preamble for an assessment.
slot_uri: reproschema:preamble
multivalued: true
range: langString
Expand Down Expand Up @@ -326,7 +322,7 @@ slots:
range: datetime
slot_uri: prov:startedAtTime
subject_id:
slot_uri: nidm:subject_id #TODO check this @type:rdf:Property
slot_uri: nidm:subject_id
range: string
ui:
title: UI
Expand Down Expand Up @@ -502,7 +498,7 @@ classes:
class_uri: rdf:langString
MediaObject:
title: Media Object
description: Add description #TODO
description: A media object, such as an image, video, audio, or text object embedded in a web page or a downloadable dataset.
is_a: Thing
class_uri: schema:MediaObject
slots:
Expand Down Expand Up @@ -542,7 +538,7 @@ classes:
- id
- subject_id
class_uri: reproschema:Participant
Protocol: # TODO multiple types
Protocol:
title: Protocol
description: A representation of a study which comprises one or more assessments.
is_a: Thing
Expand All @@ -555,6 +551,7 @@ classes:
- description
- landingPage
- messages
- preamble
- prefLabel
- schemaVersion
- ui
Expand Down Expand Up @@ -596,7 +593,7 @@ classes:
- unitOptions
- valueType
class_uri: reproschema:ResponseOption
SoftwareAgent: # TODO multiple types
SoftwareAgent:
title: Software Agent
description:
Captures information about some action that took place. It also links to information
Expand All @@ -616,9 +613,8 @@ classes:
- category
class_uri: schema:Thing
UI:
title: todo
description:
- todo
title: UI properties
description: A group of properties related to UI.
slots:
- order
- addProperties
Expand Down
9 changes: 9 additions & 0 deletions macros/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from .macros import (
library_table,
)
from .main import define_env

__all__ = [
"define_env",
"library_table",
]
Loading

0 comments on commit 3eefa2d

Please sign in to comment.