diff --git a/backend/app/services/cadastre/grid_geometry.py b/backend/app/services/cadastre/grid_geometry.py index 75a6960c..1c1d8728 100644 --- a/backend/app/services/cadastre/grid_geometry.py +++ b/backend/app/services/cadastre/grid_geometry.py @@ -57,8 +57,7 @@ def quarter_bbox_3857(db: Session, quarter: str) -> tuple[float, float, float, f def generate_grid_click_points( bbox: tuple[float, float, float, float], grid_size: int = 15, - tile_width: int = 512, - tile_height: int = 512, + tile_size: int = 512, ) -> list[tuple[tuple[float, float, float, float], tuple[int, int]]]: """Генерировать grid_size × grid_size ячеек для bbox квартала. @@ -69,8 +68,7 @@ def generate_grid_click_points( Args: bbox: (xmin, ymin, xmax, ymax) в EPSG:3857. grid_size: количество ячеек по каждой оси (15 → 225 запросов). - tile_width: ширина виртуального WMS тайла в пикселях. - tile_height: высота виртуального WMS тайла в пикселях. + tile_size: размер виртуального WMS тайла в пикселях (квадратный). Returns: Список (sub_bbox, click_xy) — sub_bbox в EPSG:3857, click_xy в пикселях. @@ -88,8 +86,8 @@ def generate_grid_click_points( cell_xmax = cell_xmin + x_step cell_ymax = cell_ymin + y_step # Клик в центр ячейки - click_x = tile_width // 2 - click_y = tile_height // 2 + click_x = tile_size // 2 + click_y = tile_size // 2 result.append( ( (cell_xmin, cell_ymin, cell_xmax, cell_ymax), diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 8df3fa61..89525714 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -79,3 +79,6 @@ strict = true [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" +markers = [ + "slow: marks tests as slow (need real network, deselect with -m 'not slow')", +]