Skip to content

Commit

Permalink
Fix c2cciutils-checks
Browse files Browse the repository at this point in the history
From the artifact of the previous workflow run
  • Loading branch information
geo-ghci-int[bot] authored and renovate[bot] committed Jul 10, 2024
1 parent c93d071 commit 8aa67e1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
8 changes: 5 additions & 3 deletions tilecloud_chain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ def add_common_options(
parser.add_argument(
"-c",
"--config",
default=os.environ.get("TILEGENERATION_CONFIGFILE", "tilegeneration/config.yaml")
if default_config_file
else None,
default=(
os.environ.get("TILEGENERATION_CONFIGFILE", "tilegeneration/config.yaml")
if default_config_file
else None
),
help="path to the configuration file",
metavar="FILE",
)
Expand Down
1 change: 0 additions & 1 deletion tilecloud_chain/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Automatically generated file from a JSON schema.
"""


from typing import Any, Dict, List, Literal, Tuple, TypedDict, Union

ADMIN_PATH_DEFAULT = "admin"
Expand Down
8 changes: 5 additions & 3 deletions tilecloud_chain/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,11 @@ def _generate_tiles(self) -> None:
)
)
self._gene.init(
self._queue_tilestore
if "error_file" in self._gene.get_main_config().config["generation"]
else None,
(
self._queue_tilestore
if "error_file" in self._gene.get_main_config().config["generation"]
else None
),
self._options.daemon,
)
else:
Expand Down
16 changes: 10 additions & 6 deletions tilecloud_chain/tests/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def test_copy(self) -> None:
cmd=f".build/venv/bin/generate_copy {d} -c tilegeneration/test-copy.yaml src dst",
main_func=copy_.main,
regex=True,
expected="""The tile copy of layer 'point_hash' is finish
expected=(
"""The tile copy of layer 'point_hash' is finish
Nb copy tiles: 1
Nb errored tiles: 0
Nb dropped tiles: 0
Expand All @@ -43,8 +44,9 @@ def test_copy(self) -> None:
Size per tile: 10(.0)? o
"""
if d != "-q"
else "",
if d != "-q"
else ""
),
empty_err=True,
)
with open("/tmp/tiles/dst/1.0.0/point_hash/default/21781/0/0/0.png") as f:
Expand All @@ -70,7 +72,8 @@ def test_process(self) -> None:
"tilegeneration/test-copy.yaml --cache src optipng".format(d),
main_func=copy_.process,
regex=True,
expected="""The tile process of layer 'point_hash' is finish
expected=(
"""The tile process of layer 'point_hash' is finish
Nb process tiles: 1
Nb errored tiles: 0
Nb dropped tiles: 0
Expand All @@ -80,8 +83,9 @@ def test_process(self) -> None:
Size per tile: 103(.0)? o
"""
if d != "-q"
else "",
if d != "-q"
else ""
),
empty_err=True,
)
statinfo = os.stat(
Expand Down
8 changes: 5 additions & 3 deletions tilecloud_chain/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ def admin_test(self) -> Dict[str, Any]:
"zoom": config.config["openlayers"]["zoom"],
"http_url": urljoin(
self.request.current_route_url(),
"/" + main_config.config["server"].get("wmts_path", "wmts") + "/"
if "server" in config.config
else "/",
(
"/" + main_config.config["server"].get("wmts_path", "wmts") + "/"
if "server" in config.config
else "/"
),
),
}

Expand Down

0 comments on commit 8aa67e1

Please sign in to comment.