Skip to content
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
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,3 @@ This project is SuperAnnotate annotations JSON schema generator.
```
$ pip install superannotate_schemas
```

## Example
```
$ superannotate_schema validate <annotation_path>
$ superannotate_schema validate <annotation_path>, <annotation_path>
```
- To print validation report set --verbose True
- To store reports in the file set --report-path
14 changes: 4 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
dnspython==2.1.0
fire==0.4.0
idna==3.3
pydantic==1.8.2
six==1.16.0
termcolor==1.1.0
typing-extensions==3.10.0.2
typingx==0.5.3
pydantic[email]
email-validator>=1.0.3
attrs~=23.1.0
pyrsistent~=0.20.0
six~=1.16.0
twisted~=23.10.0
42 changes: 32 additions & 10 deletions src/superannotate_schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
import os
import sys
"""
An implementation of JSON Schema for Python

WORKING_DIR = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(WORKING_DIR)
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.

from superannotate_schemas.validators import AnnotationValidators
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""

__version__ = '1.0.45dev5'
from superannotate_schemas.exceptions import (
ErrorTree, FormatError, RefResolutionError, SchemaError, ValidationError
)
from superannotate_schemas._format import (
FormatChecker,
draft3_format_checker,
draft4_format_checker,
draft6_format_checker,
draft7_format_checker,
)
from superannotate_schemas._types import TypeChecker
from superannotate_schemas.validators import (
Draft3Validator,
Draft4Validator,
Draft6Validator,
Draft7Validator,
RefResolver,
validate,
)

__all__ = [
"__version__",
"AnnotationValidators"
]
try:
from importlib import metadata
except ImportError: # for Python<3.8
import importlib_metadata as metadata

__version__ = '1.0.46b1'
2 changes: 2 additions & 0 deletions src/superannotate_schemas/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from superannotate_schemas.cli import main
main()
Loading