Skip to content

Commit 3666873

Browse files
authored
refactor: rename Tier4 to T4Devkit (#275)
* refactor: add T4Devkit and make Tier4 deprecated Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * refactor: replace Tier4 by T4Devkit Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> --------- Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
1 parent 0ecca7d commit 3666873

14 files changed

Lines changed: 58 additions & 50 deletions

File tree

docs/cli/t4viz.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ t4viz --install-completion
3030

3131
### Scene
3232

33-
This command performs the same behavior with [`Tier4.render_scene(...)`](../tutorials/render.md#rendering-scene).
33+
This command performs the same behavior with [`T4Devkit.render_scene(...)`](../tutorials/render.md#rendering-scene).
3434

3535
For options, run `t4viz scene -h`.
3636

@@ -40,7 +40,7 @@ t4viz scene <DATA_ROOT> [OPTIONS]
4040

4141
### Specific Instance(s)
4242

43-
This command performs the same behavior with [`Tier4.render_instance(...)`](../tutorials/render.md#rendering-instances).
43+
This command performs the same behavior with [`T4Devkit.render_instance(...)`](../tutorials/render.md#rendering-instances).
4444

4545
For options, run `t4viz instance -h`.
4646

@@ -56,7 +56,7 @@ t4viz instance <DATA_ROOT> <INSTANCE_TOKEN1> <INSTANCE_TOKEN2> ... [OPTIONS]
5656

5757
### PointCloud
5858

59-
This command performs the same behavior with [`Tier4.render_pointcloud(...)`](../tutorials/render.md#rendering-pointcloud).
59+
This command performs the same behavior with [`T4Devkit.render_pointcloud(...)`](../tutorials/render.md#rendering-pointcloud).
6060

6161
If a pointcloud `sample_data` record has `info_filename`, `t4viz pointcloud` loads the metainfo JSON automatically and uses `num_pts_feats` to parse extended point layouts. Without that file, it falls back to the standard 5-feature layout.
6262

docs/schema/requirement.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
| `FMT017` | `keypoint-field` | `ERROR` | `N/A` | All types of `Keypoint` fields are valid. |
9494
| `FMT018` | `vehicle-state-field` | `ERROR` | `N/A` | All types of `VehicleState` fields are valid. |
9595

96-
## Tier4 Instance (`TIV`)
96+
## TIER IV Instance (`TIV`)
9797

98-
| ID | Name | Severity | Fixable | Description |
99-
| -------- | ------------ | -------- | ------- | ----------------------------------------------- |
100-
| `TIV001` | `load-tier4` | `ERROR` | `N/A` | Ensure `Tier4` instance is loaded successfully. |
98+
| ID | Name | Severity | Fixable | Description |
99+
| -------- | ------------ | -------- | ------- | -------------------------------------------------- |
100+
| `TIV001` | `load-tier4` | `ERROR` | `N/A` | Ensure `T4Devkit` instance is loaded successfully. |

docs/schema/table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ visibility {
333333

334334
## Optional Tables
335335

336-
The following tables are optional, and skipped loading by `Tier4` class if not exists.
336+
The following tables are optional, and skipped loading by `T4Devkit` class if not exists.
337337

338338
### LidarSeg
339339

docs/tutorials/customize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class CustomAttribute(SchemaBase):
7777
description: str | None = field(default=None)
7878
```
7979

80-
Note that `CustomAttribute` should be imported before instantiating `Tier4` class.
80+
Note that `CustomAttribute` should be imported before instantiating `T4Devkit` class.
8181
Then modify `__init__.py` in order to import it automatically:
8282

8383
```python title="__init__.py"

docs/tutorials/initialize.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Initialize `Tier4` class
1+
## Initialize `T4Devkit` class
22

33
---
44

5-
`Tier4` class expects both following dataset directly structure with or without `<VERSION>` directory:
5+
`T4Devkit` class expects both following dataset directly structure with or without `<VERSION>` directory:
66

77
- With `<VERSION>` directory:
88

@@ -39,13 +39,13 @@
3939
...
4040
```
4141

42-
You can initialize a `Tier4` instance as follows:
42+
You can initialize a `T4Devkit` instance as follows:
4343

4444
```python
4545

46-
>>> from t4_devkit import Tier4
46+
>>> from t4_devkit import T4Devkit
4747

48-
>>> t4 = Tier4("data/tier4/", verbose=True)
48+
>>> t4 = T4Devkit("data/tier4/", verbose=True)
4949
======
5050
Loading T4 tables in `annotation`...
5151
Reverse indexing...
@@ -75,7 +75,7 @@ Note that if you doesn't specify `revision` parameter in construction, it search
7575
By specifying `revision=<VERSION>`, you can load the specific version of the dataset.
7676

7777
```python
78-
>>> t4 = Tier4("data/tier4/", revision="2", verbose=True)
78+
>>> t4 = T4Devkit("data/tier4/", revision="2", verbose=True)
7979
```
8080

8181
## Access to Schema Fields

docs/tutorials/render.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Rendering with `Tier4`
1+
## Rendering with `T4Devkit`
22

3-
If you want to visualize annotation results, `Tier4` supports some rendering methods as below.
3+
If you want to visualize annotation results, `T4Devkit` supports some rendering methods as below.
44

55
### Scene
66

@@ -36,7 +36,7 @@ If you want to visualize annotation results, `Tier4` supports some rendering met
3636
>>> t4.render_pointcloud()
3737
```
3838

39-
If `SampleData.info_filename` points to a pointcloud metainfo JSON file, `Tier4.render_pointcloud()` loads it automatically. This allows rendering pointclouds with extended per-point features such as `return_type` or `timestamp`. When no metainfo file is available, the standard 5-feature layout is assumed.
39+
If `SampleData.info_filename` points to a pointcloud metainfo JSON file, `T4Devkit.render_pointcloud()` loads it automatically. This allows rendering pointclouds with extended per-point features such as `return_type` or `timestamp`. When no metainfo file is available, the standard 5-feature layout is assumed.
4040

4141
![Render PointCloud GIF](../assets/render_pointcloud.gif)
4242

t4_devkit/cli/visualize.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import typer
77

8-
from t4_devkit import Tier4
8+
from t4_devkit import T4Devkit
99

1010
from .version import version_callback
1111

@@ -47,7 +47,7 @@ def scene(
4747
) -> None:
4848
_create_dir(output)
4949

50-
t4 = Tier4(data_root, revision=revision, verbose=False)
50+
t4 = T4Devkit(data_root, revision=revision, verbose=False)
5151
t4.render_scene(future_seconds=future, save_dir=output)
5252

5353

@@ -82,7 +82,7 @@ def instance(
8282
) -> None:
8383
_create_dir(output)
8484

85-
t4 = Tier4(data_root, revision=revision, verbose=False)
85+
t4 = T4Devkit(data_root, revision=revision, verbose=False)
8686
t4.render_instance(instance_token=instance, future_seconds=future, save_dir=output)
8787

8888

@@ -107,7 +107,7 @@ def pointcloud(
107107
) -> None:
108108
_create_dir(output)
109109

110-
t4 = Tier4(data_root, revision=revision, verbose=False)
110+
t4 = T4Devkit(data_root, revision=revision, verbose=False)
111111
t4.render_pointcloud(save_dir=output)
112112

113113

t4_devkit/helper/rendering.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424

2525
if TYPE_CHECKING:
26-
from t4_devkit import Tier4
26+
from t4_devkit import T4Devkit
2727
from t4_devkit.schema import (
2828
CalibratedSensor,
2929
EgoPose,
@@ -49,13 +49,13 @@ class RenderingMode(Enum):
4949

5050

5151
class RenderingHelper:
52-
"""Help `Tier4` class with rendering tasks."""
52+
"""Help `T4Devkit` class with rendering tasks."""
5353

54-
def __init__(self, t4: Tier4) -> None:
54+
def __init__(self, t4: T4Devkit) -> None:
5555
"""Construct a new object.
5656
5757
Args:
58-
t4 (Tier4): `Tier4` instance.
58+
t4 (T4Devkit): `T4Devkit` instance.
5959
"""
6060
self._t4 = t4
6161
self._label2id: dict[str, int] = {

t4_devkit/helper/timeseries.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
from t4_devkit.common.timestamp import microseconds2seconds
66

77
if TYPE_CHECKING:
8-
from t4_devkit import Tier4
8+
from t4_devkit import T4Devkit
99
from t4_devkit.schema import ObjectAnn, Sample, SampleAnnotation, SampleData
1010

1111

1212
__all__ = ["TimeseriesHelper"]
1313

1414

1515
class TimeseriesHelper:
16-
"""Help `Tier4` class with timeseries relevant operations."""
16+
"""Help `T4Devkit` class with timeseries relevant operations."""
1717

18-
def __init__(self, t4: Tier4) -> None:
18+
def __init__(self, t4: T4Devkit) -> None:
1919
"""Construct a new object.
2020
2121
Args:
22-
t4 (Tier4): `Tier4` instance.
22+
t4 (T4Devkit): `T4Devkit` instance.
2323
"""
2424
self._t4 = t4
2525

t4_devkit/sanity/safety.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from returns.result import Result, safe
66

7-
from t4_devkit import DBMetadata, Tier4, load_metadata
7+
from t4_devkit import DBMetadata, T4Devkit, load_metadata
88
from t4_devkit.common.io import load_json
99

1010
if TYPE_CHECKING:
@@ -35,9 +35,9 @@ def load_metadata_safe(
3535

3636

3737
@safe
38-
def load_tier4_safe(context: SanityContext) -> Result[Tier4, Exception]:
39-
"""Load Tier4 instance safely."""
38+
def load_tier4_safe(context: SanityContext) -> Result[T4Devkit, Exception]:
39+
"""Load T4Devkit instance safely."""
4040
data_root = context.data_root.unwrap()
4141
revision = context.version.value_or(None)
4242
data_root = data_root.as_posix() if revision is None else data_root.parent.as_posix()
43-
return Tier4(data_root, revision=revision, verbose=False)
43+
return T4Devkit(data_root, revision=revision, verbose=False)

0 commit comments

Comments
 (0)