diff --git a/CHANGELOG.md b/CHANGELOG.md index b395a7b..4ce5d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Bumped minimal geopandas version + ## [0.2.2] - 2024-10-23 ## [0.2.1] - 2024-10-23 diff --git a/README.md b/README.md index e293e87..0694efc 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ $ pixel-map --example london_buildings --no-bg -r ascii-bw - `rich (>=12.0.0)`: For showing progress and generating terminal output -- `geopandas (>=0.6)`: For reading Geo files and plotting +- `geopandas (>=0.8)`: For reading Geo files and plotting - `pyarrow (>=16.0.0)`: For geoparquet files support diff --git a/pdm.lock b/pdm.lock index a6d0361..2811eed 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "license", "lint", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:8105c234d57ea95ef2e382ccf4d812aa76ae357c34cec716fc4f74628d51b2a9" +content_hash = "sha256:c1efdc3f30a3bf1112248e46d7b673b17ad9cc466caa86dd5efab2d45715f43f" [[metadata.targets]] requires_python = ">=3.9" diff --git a/pixel_map/plotter.py b/pixel_map/plotter.py index 0beeb32..9aa8e0a 100644 --- a/pixel_map/plotter.py +++ b/pixel_map/plotter.py @@ -5,6 +5,7 @@ unicode characters. """ +import os from pathlib import Path from typing import Any, Optional, Union @@ -72,7 +73,11 @@ def plot_geo_data( plotting_dpi (int, optional): Quality of matplotlib figure. It's used to multiply terminal size by some value to get better quality plot. Defaults to 10. """ - console = get_console() + force_terminal = os.getenv("FORCE_TERMINAL_MODE", "false").lower() == "true" + if force_terminal: + console = Console(force_interactive=False, force_jupyter=False, force_terminal=True) + else: + console = get_console() if console_width: console.width = console_width diff --git a/pyproject.toml b/pyproject.toml index 80d6461..be389e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "typer[all]>=0.9.0", "img2unicode[n2]>=0.1a11; sys_platform != 'win32' and sys_platform != 'darwin'", "img2unicode>=0.1a11; sys_platform == 'win32' or sys_platform == 'darwin'", - "geopandas>=0.6", + "geopandas>=0.8", "numpy>=1.26.0", "contextily>=1", "matplotlib>=3.2.0",