Skip to content

Commit

Permalink
Pin dependencies to the latest version (#840)
Browse files Browse the repository at this point in the history
* Pin dependencies to the latest version

* Remove matplotlib-inline

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Drop testing for python 3.8

* Relax the numpy version

* Skip ipyvtklink

* Skip more dependencies

* Add keplergl

* Loosen ipywidgets version

* Fix gpd error

* Add gradio

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
giswqs and pre-commit-ci[bot] authored Jul 21, 2024
1 parent 30e52c5 commit e47a82b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ m

## Leafmap demo with ipyleaflet backend

![](data/leafmap_demo.gif)
![](https://assets.gishub.org/images/leafmap_demo.gif)
31 changes: 16 additions & 15 deletions leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import folium
import ipyleaflet
import ipywidgets as widgets
import numpy as np
import pandas as pd
import whitebox
from typing import Union, List, Dict, Optional, Tuple
from .stac import *
Expand All @@ -22,6 +24,11 @@
except ImportError:
pass

try:
import geopandas as gpd
except ImportError:
gpd = None


class WhiteboxTools(whitebox.WhiteboxTools):
"""This class inherits the whitebox WhiteboxTools class."""
Expand Down Expand Up @@ -3673,7 +3680,7 @@ def dict_to_json(data, file_path, indent=4):
raise TypeError("The provided data must be a dictionary.")


def image_to_geotiff(image, dst_path, dtype=None, to_cog=True, **kwargs):
def image_to_geotiff(image, dst_path, dtype=None, to_cog=True, **kwargs) -> None:
"""
Converts an image to a GeoTIFF file.
Expand Down Expand Up @@ -11226,7 +11233,7 @@ def close_btn_click(change):

def start_server(
directory: str = None, port: int = 8000, background: bool = True, quiet: bool = True
):
) -> None:
"""
Start a simple web server to serve files from the specified directory
with directory listing and CORS support. Optionally, run the server
Expand Down Expand Up @@ -11442,20 +11449,14 @@ def mbtiles_to_pmtiles(
Any exception raised by pmtiles.convert.mbtiles_to_pmtiles will be propagated up.
"""

try:
import pmtiles.convert as convert
except ImportError:
print(
"pmtiles is not installed. Please install it using `pip install pmtiles`."
)
return
import pmtiles.convert as convert

convert.mbtiles_to_pmtiles(input_file, output_file, maxzoom=max_zoom)


def vector_to_pmtiles(
source_path: str, target_path: str, max_zoom: int = 5, name: str = None, **kwargs
):
) -> None:
"""
Converts a vector file to PMTiles format.
Expand Down Expand Up @@ -12111,7 +12112,7 @@ def gdb_to_vector(
overwrite: bool = False,
quiet=False,
**kwargs,
):
) -> None:
"""Converts layers from a File Geodatabase (GDB) to a vector format.
Args:
Expand Down Expand Up @@ -12460,7 +12461,7 @@ def assign_continuous_colors(
to_rgb: bool = True,
return_type: str = "array",
return_legend: bool = False,
):
) -> Union[np.ndarray, Tuple[np.ndarray, dict]]:
"""Assigns continuous colors to a DataFrame column based on a specified scheme.
Args:
Expand Down Expand Up @@ -12508,7 +12509,7 @@ def gedi_search(
output: Optional[str] = None,
sort_filesize: bool = False,
**kwargs,
):
) -> Union[pd.DataFrame, None]:
"""
Searches for GEDI data using the Common Metadata Repository (CMR) API.
The source code for this function is adapted from https://github.com/ornldaac/gedi_tutorials.
Expand Down Expand Up @@ -13162,7 +13163,7 @@ def nasa_data_login(strategy: str = "all", persist: bool = False, **kwargs) -> N
Args:
strategy (str, optional): The authentication method.
"all": (default) try all methods until one works
"all": (default) try all methods until one works
"interactive": enter username and password.
"netrc": retrieve username and password from ~/.netrc.
"environment": retrieve username and password from $EARTHDATA_USERNAME and $EARTHDATA_PASSWORD.
Expand Down Expand Up @@ -13399,7 +13400,7 @@ def convert_coordinates(x, y, source_crs, target_crs="epsg:4326"):
return lon, lat


def extract_archive(archive, outdir=None, **kwargs):
def extract_archive(archive, outdir=None, **kwargs) -> None:
"""
Extracts a multipart archive.
Expand Down
42 changes: 21 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
bqplot
colour
duckdb
folium
gdown
geojson
ipyevents
ipyfilechooser
ipyleaflet
ipyvuetify
ipywidgets
matplotlib
numpy<3.0.0
pandas
plotly
pyshp
pystac-client
python-box
scooby
whiteboxgui
xyzservices
bqplot>=0.12.43
colour>=0.1.5
duckdb>=1.0.0
folium>=0.17.0
gdown>=5.2.0
geojson>=3.1.0
ipyevents>=2.0.2
ipyfilechooser>=0.6.0
ipyleaflet>=0.19.1
ipyvuetify>=1.9.4
ipywidgets>=7.6.0
matplotlib>=3.9.1
numpy>=1.26.4
pandas>=2.2.2
plotly>=5.22.0
pyshp>=2.3.1
pystac-client>=0.8.2
python-box>=7.2.0
scooby>=0.10.0
whiteboxgui>=2.3.0
xyzservices>=2024.6.0
9 changes: 4 additions & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ black[jupyter]
bokeh
boto3
cogeo-mosaic
# datapane
# earthaccess
ffmpeg-python
geopandas
gradio
h3
h5py
ipygany
ipysheet
ipyvtklink
jupyter_bokeh
# ipygany
# ipysheet
# ipyvtklink
# jupyter_bokeh
jupyterlab>=3.0.0
keplergl
laspy
Expand Down

0 comments on commit e47a82b

Please sign in to comment.