Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: remove pint dependency #591

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/envs/39-latest-conda-forge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies:
- geopandas>=0.12.0
- scikit-learn
- networkx
- pint
- pip
- geoalchemy2
- osmnx
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ ti.print_version()
* Numpy
* GeoPandas
* Matplotlib
* Pint
* NetworkX
* GeoAlchemy2
* scikit-learn
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"shapely.ops",
"sklearn",
"sklearn.neighbors",
"pint",
"networkx",
"networkx.exception",
"osmnx",
Expand Down
1 change: 0 additions & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies:
- pandas
- scikit-learn
- networkx
- pint
- geoalchemy2
- osmnx
- psycopg2
Expand Down
1 change: 0 additions & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- geopandas>=0.12.0
- scikit-learn
- networkx
- pint
- pip
- geoalchemy2
- osmnx
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- geopandas>=0.12.0
- scikit-learn
- networkx
- pint
- pip
- geoalchemy2
- osmnx
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ matplotlib
geopandas>=0.12.0
scikit-learn
networkx
pint
geoalchemy2
osmnx
psycopg2
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ matplotlib
geopandas>=0.12.0
scikit-learn
networkx
pint
geoalchemy2
osmnx
psycopg2
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"geopandas>=0.12.0",
"matplotlib",
"numpy",
"pint",
"shapely",
"networkx",
"geoalchemy2",
Expand All @@ -39,7 +38,6 @@
"pandas",
"matplotlib",
"numpy",
"pint",
"shapely",
"networkx",
"geoalchemy2",
Expand Down
9 changes: 2 additions & 7 deletions trackintel/visualization/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from matplotlib.collections import LineCollection
from networkx.exception import NetworkXPointlessConcept
from pandas.api.types import is_datetime64_any_dtype
from pint import UnitRegistry

from trackintel.geogr import check_gdf_planar, meters_to_decimal_degrees

Expand Down Expand Up @@ -55,14 +54,10 @@ def a4_figsize(fig_height_mm=None, columns=2):
logging.warning(f"fig_height too large: {fig_height_mm}, so will reduce to {max_figh_height_mm}.")
fig_height_mm = max_figh_height_mm

ureg = UnitRegistry()
fig_height_mm *= ureg.millimeter
fig_width_mm *= ureg.millimeter
fig_width = fig_width_mm.to(ureg.inch).magnitude
fig_height = fig_height_mm.to(ureg.inch).magnitude
inch = 1 / 25.4 # millimeter in inches

logging.info(f"Creating figure of {fig_width_mm}x{fig_height_mm}.")
return fig_width, fig_height
return fig_width_mm * inch, fig_height_mm * inch


def regular_figure():
Expand Down
Loading