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
6 changes: 6 additions & 0 deletions docs/schema/requirement.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
| `REF013` | `sample-data-filename-presence` | `ERROR` | `SampleData.filename` exists. |
| `REF014` | `sample-data-info-filename-presence` | `ERROR` | `SampleData.info_filename` exists if it is not `None`. |
| `REF015` | `lidarseg-filename-presence` | `ERROR` | `LidarSeg.filename` exists if `lidarseg.json` exists. |
| `REF016` | `sample-next-to-another` | `ERROR` | `Sample.next` refers to another one unless it is empty. |
| `REF017` | `sample-prev-to-another` | `ERROR` | `Sample.prev` refers to another one unless it is empty. |
| `REF018` | `sample-annotation-next-to-another` | `ERROR` | `SampleAnnotation.next` refers to another one unless it is empty. |
| `REF019` | `sample-annotation-prev-to-another` | `ERROR` | `SampleAnnotation.prev` refers to another one unless it is empty. |
| `REF020` | `sample-data-next-to-another` | `ERROR` | `SampleData.next` refers to another one unless it is empty. |
| `REF021` | `sample-data-prev-to-another` | `ERROR` | `SampleData.prev` refers to another one unless it is empty. |

## Format (`FMT`)

Expand Down
6 changes: 6 additions & 0 deletions t4_devkit/sanity/reference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@
from .ref013 import * # noqa
from .ref014 import * # noqa
from .ref015 import * # noqa
from .ref016 import * # noqa
from .ref017 import * # noqa
from .ref018 import * # noqa
from .ref019 import * # noqa
from .ref020 import * # noqa
from .ref021 import * # noqa
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref016.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF016(RecordReferenceChecker):
"""A checker of REF016."""

id = RuleID("REF016")
name = RuleName("sample-next-to-another")
severity = Severity.ERROR
description = "'Sample.next' refers to another one unless it is empty."
source = SchemaName.SAMPLE
target = SchemaName.SAMPLE
reference = "next"
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref017.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF017(RecordReferenceChecker):
"""A checker of REF017."""

id = RuleID("REF017")
name = RuleName("sample-prev-to-another")
severity = Severity.ERROR
description = "'Sample.prev' refers to another one unless it is empty."
source = SchemaName.SAMPLE
target = SchemaName.SAMPLE
reference = "prev"
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref018.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF018(RecordReferenceChecker):
"""A checker of REF018."""

id = RuleID("REF018")
name = RuleName("sample-annotation-next-to-another")
severity = Severity.ERROR
description = "'SampleAnnotation.next' refers to another one unless it is empty."
source = SchemaName.SAMPLE_ANNOTATION
target = SchemaName.SAMPLE_ANNOTATION
reference = "next"
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref019.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF019(RecordReferenceChecker):
"""A checker of REF019."""

id = RuleID("REF019")
name = RuleName("sample-annotation-prev-to-another")
severity = Severity.ERROR
description = "'SampleAnnotation.prev' refers to another one unless it is empty."
source = SchemaName.SAMPLE_ANNOTATION
target = SchemaName.SAMPLE_ANNOTATION
reference = "prev"
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref020.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF020(RecordReferenceChecker):
"""A checker of REF020."""

id = RuleID("REF020")
name = RuleName("sample-data-next-to-another")
severity = Severity.ERROR
description = "'SampleData.next' refers to another one unless it is empty."
source = SchemaName.SAMPLE_DATA
target = SchemaName.SAMPLE_DATA
reference = "next"
20 changes: 20 additions & 0 deletions t4_devkit/sanity/reference/ref021.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

from t4_devkit.schema import SchemaName

from ..checker import RuleID, RuleName, Severity
from ..registry import CHECKERS
from .base import RecordReferenceChecker


@CHECKERS.register()
class REF021(RecordReferenceChecker):
"""A checker of REF021."""

id = RuleID("REF021")
name = RuleName("sample-data-prev-to-another")
severity = Severity.ERROR
description = "'SampleData.prev' refers to another one unless it is empty."
source = SchemaName.SAMPLE_DATA
target = SchemaName.SAMPLE_DATA
reference = "prev"
Loading