Skip to content

Commit 5ab8fd9

Browse files
authored
refactor: rename reference checker names (#244)
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
1 parent 01320ef commit 5ab8fd9

12 files changed

Lines changed: 82 additions & 58 deletions

File tree

docs/schema/requirement.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
## Reference (`REF`)
2929

30+
### Record Reference (A to B)
31+
3032
| ID | Name | Severity | Description |
3133
| -------- | ------------------------------------- | -------- | ------------------------------------------------------------------------- |
3234
| `REF001` | `scene-to-log` | `ERROR` | `Scene.log_token` refers to `Log` record. |
@@ -41,15 +43,25 @@
4143
| `REF010` | `instance-to-first-sample-annotation` | `ERROR` | `Instance.first_annotation_token` refers to `SampleAnnotation` record. |
4244
| `REF011` | `instance-to-last-sample-annotation` | `ERROR` | `Instance.last_annotation_token` refers to `SampleAnnotation` record. |
4345
| `REF012` | `lidarseg-to-sample-data` | `ERROR` | `LidarSeg.sample_data_token` refers to `SampleData` record. |
44-
| `REF013` | `sample-data-filename-presence` | `ERROR` | `SampleData.filename` exists. |
45-
| `REF014` | `sample-data-info-filename-presence` | `ERROR` | `SampleData.info_filename` exists if it is not `None`. |
46-
| `REF015` | `lidarseg-filename-presence` | `ERROR` | `LidarSeg.filename` exists if `lidarseg.json` exists. |
47-
| `REF016` | `sample-next-to-another` | `ERROR` | `Sample.next` refers to another one unless it is empty. |
48-
| `REF017` | `sample-prev-to-another` | `ERROR` | `Sample.prev` refers to another one unless it is empty. |
49-
| `REF018` | `sample-annotation-next-to-another` | `ERROR` | `SampleAnnotation.next` refers to another one unless it is empty. |
50-
| `REF019` | `sample-annotation-prev-to-another` | `ERROR` | `SampleAnnotation.prev` refers to another one unless it is empty. |
51-
| `REF020` | `sample-data-next-to-another` | `ERROR` | `SampleData.next` refers to another one unless it is empty. |
52-
| `REF021` | `sample-data-prev-to-another` | `ERROR` | `SampleData.prev` refers to another one unless it is empty. |
46+
47+
### Record Reference (A to A')
48+
49+
| ID | Name | Severity | Description |
50+
| -------- | ----------------------------------- | -------- | ----------------------------------------------------------------- |
51+
| `REF101` | `sample-next-to-another` | `ERROR` | `Sample.next` refers to another one unless it is empty. |
52+
| `REF102` | `sample-prev-to-another` | `ERROR` | `Sample.prev` refers to another one unless it is empty. |
53+
| `REF103` | `sample-annotation-next-to-another` | `ERROR` | `SampleAnnotation.next` refers to another one unless it is empty. |
54+
| `REF104` | `sample-annotation-prev-to-another` | `ERROR` | `SampleAnnotation.prev` refers to another one unless it is empty. |
55+
| `REF105` | `sample-data-next-to-another` | `ERROR` | `SampleData.next` refers to another one unless it is empty. |
56+
| `REF106` | `sample-data-prev-to-another` | `ERROR` | `SampleData.prev` refers to another one unless it is empty. |
57+
58+
### File Reference
59+
60+
| ID | Name | Severity | Description |
61+
| -------- | ------------------------------------ | -------- | ------------------------------------------------------ |
62+
| `REF201` | `sample-data-filename-presence` | `ERROR` | `SampleData.filename` exists. |
63+
| `REF202` | `sample-data-info-filename-presence` | `ERROR` | `SampleData.info_filename` exists if it is not `None`. |
64+
| `REF203` | `lidarseg-filename-presence` | `ERROR` | `LidarSeg.filename` exists if `lidarseg.json` exists. |
5365

5466
## Format (`FMT`)
5567

t4_devkit/sanity/reference/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
from .ref010 import * # noqa
1313
from .ref011 import * # noqa
1414
from .ref012 import * # noqa
15-
from .ref013 import * # noqa
16-
from .ref014 import * # noqa
17-
from .ref015 import * # noqa
18-
from .ref016 import * # noqa
19-
from .ref017 import * # noqa
20-
from .ref018 import * # noqa
21-
from .ref019 import * # noqa
22-
from .ref020 import * # noqa
23-
from .ref021 import * # noqa
15+
from .ref101 import * # noqa
16+
from .ref102 import * # noqa
17+
from .ref103 import * # noqa
18+
from .ref104 import * # noqa
19+
from .ref105 import * # noqa
20+
from .ref106 import * # noqa
21+
from .ref201 import * # noqa
22+
from .ref202 import * # noqa
23+
from .ref203 import * # noqa
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF101"]
10+
911

1012
@CHECKERS.register()
11-
class REF016(RecordReferenceChecker):
12-
"""A checker of REF016."""
13+
class REF101(RecordReferenceChecker):
14+
"""A checker of REF101."""
1315

14-
id = RuleID("REF016")
16+
id = RuleID("REF101")
1517
name = RuleName("sample-next-to-another")
1618
severity = Severity.ERROR
1719
description = "'Sample.next' refers to another one unless it is empty."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF102"]
10+
911

1012
@CHECKERS.register()
11-
class REF017(RecordReferenceChecker):
12-
"""A checker of REF017."""
13+
class REF102(RecordReferenceChecker):
14+
"""A checker of REF102."""
1315

14-
id = RuleID("REF017")
16+
id = RuleID("REF102")
1517
name = RuleName("sample-prev-to-another")
1618
severity = Severity.ERROR
1719
description = "'Sample.prev' refers to another one unless it is empty."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF103"]
10+
911

1012
@CHECKERS.register()
11-
class REF018(RecordReferenceChecker):
12-
"""A checker of REF018."""
13+
class REF103(RecordReferenceChecker):
14+
"""A checker of REF103."""
1315

14-
id = RuleID("REF018")
16+
id = RuleID("REF103")
1517
name = RuleName("sample-annotation-next-to-another")
1618
severity = Severity.ERROR
1719
description = "'SampleAnnotation.next' refers to another one unless it is empty."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF104"]
10+
911

1012
@CHECKERS.register()
11-
class REF019(RecordReferenceChecker):
12-
"""A checker of REF019."""
13+
class REF104(RecordReferenceChecker):
14+
"""A checker of REF104."""
1315

14-
id = RuleID("REF019")
16+
id = RuleID("REF104")
1517
name = RuleName("sample-annotation-prev-to-another")
1618
severity = Severity.ERROR
1719
description = "'SampleAnnotation.prev' refers to another one unless it is empty."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF105"]
10+
911

1012
@CHECKERS.register()
11-
class REF020(RecordReferenceChecker):
12-
"""A checker of REF020."""
13+
class REF105(RecordReferenceChecker):
14+
"""A checker of REF105."""
1315

14-
id = RuleID("REF020")
16+
id = RuleID("REF105")
1517
name = RuleName("sample-data-next-to-another")
1618
severity = Severity.ERROR
1719
description = "'SampleData.next' refers to another one unless it is empty."
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ..registry import CHECKERS
77
from .base import RecordReferenceChecker
88

9+
__all__ = ["REF106"]
10+
911

1012
@CHECKERS.register()
11-
class REF021(RecordReferenceChecker):
12-
"""A checker of REF021."""
13+
class REF106(RecordReferenceChecker):
14+
"""A checker of REF106."""
1315

14-
id = RuleID("REF021")
16+
id = RuleID("REF106")
1517
name = RuleName("sample-data-prev-to-another")
1618
severity = Severity.ERROR
1719
description = "'SampleData.prev' refers to another one unless it is empty."
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
from ..context import SanityContext
1515

1616

17-
__all__ = ["REF013"]
17+
__all__ = ["REF201"]
1818

1919

2020
@CHECKERS.register()
21-
class REF013(FileReferenceChecker):
22-
"""A checker of REF013."""
21+
class REF201(FileReferenceChecker):
22+
"""A checker of REF201."""
2323

24-
id = RuleID("REF013")
24+
id = RuleID("REF201")
2525
name = RuleName("sample-data-filename-presence")
2626
severity = Severity.ERROR
2727
description = "'SampleData.filename' exists."
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
from ..context import SanityContext
1515

1616

17-
__all__ = ["REF014"]
17+
__all__ = ["REF202"]
1818

1919

2020
@CHECKERS.register()
21-
class REF014(FileReferenceChecker):
22-
"""A checker of REF014."""
21+
class REF202(FileReferenceChecker):
22+
"""A checker of REF202."""
2323

24-
id = RuleID("REF014")
24+
id = RuleID("REF202")
2525
name = RuleName("sample-data-filename-presence")
2626
severity = Severity.ERROR
2727
description = "'SampleData.filename' exists."

0 commit comments

Comments
 (0)