Skip to content

Commit 95b7efb

Browse files
committed
DOC: Add module docstrings
1 parent c4c5603 commit 95b7efb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/bids_validator/context.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Validation context for schema-based BIDS validation."""
2+
13
from .context_generator import get_schema, load_schema_into_namespace
24

35
schema = get_schema()

src/bids_validator/context_generator.py

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""Utilities for generating validation context classes from a BIDS schema.
2+
3+
For default contexts based on the installed BIDS schema, use the `context` module.
4+
These functions allow generating classes from alternative schemas.
5+
6+
Basic usage:
7+
8+
.. python::
9+
10+
from bids_validator.context_generator import get_schema, load_schema_into_namespace
11+
12+
schema = get_schema('https://bids-specification.readthedocs.io/en/stable/schema.json')
13+
load_schema_into_namespace(schema['meta']['context']['context'], globals(), 'Context')
14+
"""
15+
116
from typing import Any, Dict, List
217

318
import attrs

0 commit comments

Comments
 (0)