Skip to content

Commit

Permalink
refactor: move requests to main dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mprzymus committed Apr 27, 2023
1 parent a035321 commit d109810
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies = [
"tqdm",
"s2",
"typeguard",
"requests",
]
requires-python = ">=3.8"
readme = "README.md"
Expand Down Expand Up @@ -52,7 +53,7 @@ Changelog = "https://github.com/srai-lab/srai/blob/main/CHANGELOG.md"
# add tests

# pdm add -G osm <library>
osm = ["osmium", "osmnx", "overpass", "pillow", "requests"]
osm = ["osmium", "osmnx", "overpass", "pillow"]
# pdm add -G voronoi <library>
voronoi = ["pymap3d", "haversine", "spherical-geometry"]
# pdm add -G gtfs <library>
Expand Down
2 changes: 1 addition & 1 deletion srai/loaders/osm_loaders/osm_tile_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import geopandas as gpd
import pandas as pd
import requests

from srai.regionizers.slippy_map_regionizer import SlippyMapRegionizer
from srai.utils._optional import import_optional_dependencies
Expand Down Expand Up @@ -119,7 +120,6 @@ def get_tile_by_x_y(self, x: int, y: int, idx: Any = None) -> Any:
y(int): y tile coordinate
idx (Any): id of tile, if non created as x_y_self.zoom
"""
import requests
from PIL import Image

if idx is None:
Expand Down

0 comments on commit d109810

Please sign in to comment.