Skip to content

Commit

Permalink
convert setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Aug 2, 2024
1 parent 91a171e commit 60ed08e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 54 deletions.
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ dependencies:
- pyarrow
- pykml
- pyproj
- pytest
- pytest-cov # codecov reports
- scipy
- shapely
- pre-commit # pre-commit hooks
- pytest # dev: testing
- pytest-cov # dev: codecov reports
- pre-commit # dev: pre-commit hooks
- pip
- pip:
- matplotlib # avoid warning "QApplication: invalid style override passed, ignoring it."
72 changes: 72 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[project]
name = "centerline-width"
version = "1.6.0"
authors = [
{ name="Cora Schneck", email="[email protected]" },
{ name="Una Schneck", email="[email protected]" }
]

description = "A Python package to find the centerline and width of rivers based on the latitude and longitude of the right and left bank"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.9"

dependencies = [
"geopy",
"haversine",
"networkx",
"numpy",
"pandas",
"pykml",
"pyproj",
"scipy",
"shapely",
"matplotlib",
]

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"pre-commit"
]

classifiers = [
"Development Status :: 4 - Beta", "Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Hydrology",
"Topic :: Scientific/Engineering :: Visualization"
]

keywords = [
"geophysics", "python", "voronoi", "networkx", "centerline",
"centerline-extraction", "centerline-detection", "rivers",
"river-bank-length", "river-bank", "limnology", "hydrology", "fluvial",
"geomorphology"
]

[project.urls]
Repository = "https://github.com/cyschneck/centerline-width"
Issues = "https://github.com/cyschneck/centerline-width/issues"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["."]
include = ["centerline_width"]
exclude = ["centerline_width/pytests*"]
54 changes: 3 additions & 51 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,5 @@
# -*- coding: utf-8 -*-
# Python Legacy, transitioned to pyproject.toml

# Python Package Setup
from setuptools import setup, find_namespace_packages
from setuptools import setup

VERSION = "1.6.0"
DESCRIPTION = "A Python package to find the centerline and width of rivers based on the latitude and longitude of the right and left bank"

with open("README.md", "r") as f:
long_description_readme = f.read()

setup(
name="centerline-width",
version=VERSION,
description=DESCRIPTION,
long_description=long_description_readme,
long_description_content_type='text/markdown',
url="https://github.com/cyschneck/centerline-width",
download_url=
f"https://github.com/cyschneck/centerline-width/archive/refs/tags/v{VERSION}.tar.gz",
author="Una Schneck (unaschneck), Cora Schneck (cyschneck)",
keywords=[
"geophysics", "python", "voronoi", "networkx", "centerline",
"centerline-extraction", "centerline-detection", "rivers",
"river-bank-length", "river-bank", "limnology", "hydrology", "fluvial",
"geomorphology"
],
license="MIT",
classifiers=[
"Development Status :: 4 - Beta", "Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Hydrology",
"Topic :: Scientific/Engineering :: Visualization"
],
packages=find_namespace_packages(
include=['centerline_width', 'centerline_width.*'],
exclude=['centerline_width.pytests']),
include_package_data=True,
install_requires=[
"geopy", "haversine", "matplotlib", "networkx", "numpy", "pandas",
"pykml", "pyproj", "pytest", "scipy", "shapely"
],
python_requires='>=3.9')
setup()

0 comments on commit 60ed08e

Please sign in to comment.