Skip to content

Commit

Permalink
Change setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 20, 2024
1 parent 8bef3d3 commit 7010936
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
rev: 24.8.0
hooks:
- id: black-jupyter
language_version: python3.11
language_version: python3.12

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
Expand Down
6 changes: 3 additions & 3 deletions leafmap/colormaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def create_colormap(
axis_off: Optional[bool] = False,
show_name: Optional[bool] = False,
font_size: Optional[int] = 12,
**kwargs
**kwargs,
) -> None:
"""Plot a matplotlib colormap.
Expand Down Expand Up @@ -207,7 +207,7 @@ def plot_colormap(
axis_off: Optional[bool] = False,
show_name: Optional[bool] = False,
font_size: Optional[int] = 12,
**kwargs
**kwargs,
) -> None:
"""Plot a matplotlib colormap.
Expand Down Expand Up @@ -267,7 +267,7 @@ def plot_colormaps(
width: Optional[float] = 8.0,
height: Optional[float] = 0.4,
return_fig: Optional[bool] = False,
**kwargs
**kwargs,
) -> None:
"""Plot all available colormaps.
Expand Down
10 changes: 5 additions & 5 deletions leafmap/deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def add_gdf(
layer_type="GeoJsonLayer",
layer_name: Optional[str] = None,
random_color_column: Optional[str] = None,
**kwargs
**kwargs,
):
"""Adds a GeoPandas GeoDataFrame to the map.
Expand Down Expand Up @@ -196,7 +196,7 @@ def add_vector(
layer_type: str = "GeoJsonLayer",
layer_name: Optional[str] = None,
random_color_column: Optional[str] = None,
**kwargs
**kwargs,
):
"""Adds a vector file to the map.
Expand Down Expand Up @@ -238,7 +238,7 @@ def add_geojson(
filename: str,
layer_name: Optional[str] = None,
random_color_column: Optional[str] = None,
**kwargs
**kwargs,
):
"""Adds a GeoJSON file to the map.
Expand All @@ -257,7 +257,7 @@ def add_shp(
filename: str,
layer_name: Optional[str] = None,
random_color_column: Optional[str] = None,
**kwargs
**kwargs,
):
"""Adds a shapefile to the map.
Expand All @@ -276,7 +276,7 @@ def add_kml(
filename: str,
layer_name: Optional[str] = None,
random_color_column: Optional[str] = None,
**kwargs
**kwargs,
):
"""Adds a KML file to the map.
Expand Down
80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "leafmap"
version = "0.37.3"
dynamic = [
"dependencies",
]
description = "A Python package for geospatial analysis and interactive mapping in a Jupyter environment."
readme = "README.md"
readme-content-type = "text/markdown"
requires-python = ">=3.8"
license = {text = "MIT license"}
keywords = ["leafmap"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
authors = [{name = "Qiusheng Wu", email = "[email protected]"}]
homepage = "https://github.com/opengeos/leafmap"
requires = ["setuptools>=42"]

[project.optional-dependencies]
backends = ["bokeh", "keplergl", "maplibre", "pydeck", "plotly"]
lidar = ["ipygany", "ipyvtklink", "laspy", "panel", "pyntcloud[LAS]", "pyvista"]
raster = ["localtileserver>=0.10.0", "jupyter-server-proxy", "rio-cogeo", "rioxarray", "netcdf4", "pynhd", "py3dep"]
sql = ["psycopg2", "sqlalchemy"]
apps = ["streamlit-folium", "voila", "solara"]
vector = ["geopandas", "osmnx", "pmtiles", "flask", "flask-cors", "lonboard", "mapclassify"]
pmtiles = ["pmtiles", "flask", "flask-cors"]
ai = ["geopandas", "osmnx", "localtileserver>=0.10.0", "rastervision", "pytorch-lightning"]
maplibre = ["geopandas", "h3", "ipyvuetify", "localtileserver", "mapclassify", "maplibre", "pmtiles", "rioxarray", "xarray"]

[tool]
[tool.setuptools.packages.find]
include = ["leafmap*"]
exclude = ["docs*"]


[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.distutils.bdist_wheel]
universal = true

[tool.bumpversion]
current_version = "0.37.3"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "leafmap/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

[tool.flake8]
exclude = [
"docs",
]
max-line-length = 88

[tool.setuptools_scm]

[project.urls]
Homepage = "https://github.com/opengeos/leafmap"
20 changes: 0 additions & 20 deletions setup.cfg

This file was deleted.

115 changes: 0 additions & 115 deletions setup.py

This file was deleted.

0 comments on commit 7010936

Please sign in to comment.