Skip to content

Commit 1acc1d0

Browse files
g-filomenaclaude
andcommitted
Release 2.1.1: fix PyPI logo URL, apply ruff format
Use an absolute raw-GitHub URL for the README logo so it renders on the PyPI project page, and apply ruff format to visibility2d/visibility3d. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 96b02a1 commit 1acc1d0

5 files changed

Lines changed: 7 additions & 13 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Documentation Status](https://readthedocs.org/projects/cityimage/badge/?version=latest)](https://cityimage.readthedocs.io/en/latest/?badge=latest)
44
[![codecov](https://codecov.io/gh/g-filomena/cityImage/branch/master/graph/badge.svg)](https://codecov.io/gh/g-filomena/cityImage)
55

6-
<img src="docs/_static/logo.png" alt="cityImage logo" width="33%">
6+
<img src="https://raw.githubusercontent.com/g-filomena/cityImage/master/docs/_static/logo.png" alt="cityImage logo" width="33%">
77

88
# cityImage
99

cityImage/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from importlib import import_module
1313
from typing import Any
1414

15-
__version__ = "2.1.0"
15+
__version__ = "2.1.1"
1616

1717
_PUBLIC_SYMBOLS: dict[str, str] = {
1818
"AMENITY_GROUPS": "landuse",

cityImage/visibility2d.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ def _clip_to_nearest_obstruction(ray, obstruction_union):
104104

105105
if len(obstacles) > 0:
106106
obstruction_union = unary_union(obstacles.geometry)
107-
clipped_lines = [
108-
_clip_to_nearest_obstruction(line, obstruction_union) for line in lines
109-
]
107+
clipped_lines = [_clip_to_nearest_obstruction(line, obstruction_union) for line in lines]
110108
else:
111109
clipped_lines = lines
112110

cityImage/visibility3d.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def compute_3d_sight_lines(
229229
target_xy_all = _points_xy(targets["target_geo"])
230230
span_x = float(np.ptp(target_xy_all[:, 0])) or 1.0
231231
span_y = float(np.ptp(target_xy_all[:, 1])) or 1.0
232-
cap_fraction = min(1.0, np.pi * max_observer_target_distance ** 2 / (span_x * span_y))
232+
cap_fraction = min(1.0, np.pi * max_observer_target_distance**2 / (span_x * span_y))
233233
est_pairs_per_observer = max(1, int(num_targets * cap_fraction))
234234
projected_nr_sight_lines = num_observers * est_pairs_per_observer
235235
obstructions_sindex = obstructions_gdf.sindex # GeoPandas SpatialIndex wrapper
@@ -306,9 +306,7 @@ def compute_3d_sight_lines(
306306
errors="ignore",
307307
)
308308
chunk_sight_lines = pd.concat(visibles, ignore_index=True)
309-
chunk_sight_lines = _finalize_sight_lines(
310-
chunk_sight_lines, nodes_gdf, consolidate
311-
)
309+
chunk_sight_lines = _finalize_sight_lines(chunk_sight_lines, nodes_gdf, consolidate)
312310
n_records = len(chunk_sight_lines)
313311
chunk_file = chunk_dir / f"{city_name}_{out_prefix}_{n}.gpkg"
314312
chunk_sight_lines.to_file(chunk_file)
@@ -723,9 +721,7 @@ def _define_batches(
723721
yield potential_sight_lines.iloc[start : start + rows_per_batch]
724722

725723

726-
def _obstruction_candidates_slice(
727-
endpoint_xyz, obstructions_sindex, bounds, tops, poly_ids
728-
):
724+
def _obstruction_candidates_slice(endpoint_xyz, obstructions_sindex, bounds, tops, poly_ids):
729725
"""Candidate obstruction building IDs per sight line, for one slice of lines.
730726
731727
A fully vectorised bounding-box broad phase: for each line we keep the buildings whose

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cityImage"
7-
version = "2.1.0"
7+
version = "2.1.1"
88
description = "A package for studying urban form and obtaining the computational Image of the City"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)