diff --git a/tilecloud_chain/__init__.py b/tilecloud_chain/__init__.py index cc9950671..974c67a93 100644 --- a/tilecloud_chain/__init__.py +++ b/tilecloud_chain/__init__.py @@ -1475,6 +1475,12 @@ def __call__(self, tile: Tile | None = None) -> Tile | None: self.nb += 1 return tile + def __str__(self) -> str: + return f"Count: {self.nb}" + + def __repr__(self) -> str: + return f"Count: {self.nb}" + class CountSize: """Count the number of generated tile and measure the total generated size.""" @@ -1492,6 +1498,12 @@ def __call__(self, tile: Tile | None = None) -> Tile | None: self.size += len(tile.data) return tile + def __str__(self) -> str: + return f"CountSize: {self.nb} {self.size}" + + def __repr__(self) -> str: + return f"CountSize: {self.nb} {self.size}" + class HashDropper: """ diff --git a/tilecloud_chain/generate.py b/tilecloud_chain/generate.py index 649026d86..050fcab9f 100644 --- a/tilecloud_chain/generate.py +++ b/tilecloud_chain/generate.py @@ -77,6 +77,12 @@ def __call__(self, tile: Tile) -> Tile: return tile + def __str__(self) -> str: + return self.__class__.__name__ + + def __repr__(self) -> str: + return self.__str__() + class Generate: """Generate the tiles, generate the queue, ..."""