diff --git a/network_wrangler/transit/selection.py b/network_wrangler/transit/selection.py index e37d0a2f..7055edc1 100644 --- a/network_wrangler/transit/selection.py +++ b/network_wrangler/transit/selection.py @@ -25,6 +25,7 @@ Note: The selection dictionary should conform to the SelectTransitTrips model defined in the models.projects.transit_selection module. """ + from __future__ import annotations import copy diff --git a/pyproject.toml b/pyproject.toml index 492974bf..f14b6fbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" [project] name = "network-wrangler" @@ -13,7 +14,6 @@ authors = [ { name = "Lisa Zorn", email = "lzorn@bayareametro.gov"}, { name = "Ashish Kulshrestha", email = "Ashish.Kulshrestha@wsp.com"} ] - classifiers = [ "Development Status :: 1 - Planning", "License :: OSI Approved :: Apache Software License", @@ -22,6 +22,50 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", ] +dependencies = [ + "geographiclib", + "geojson", + "geopandas >= 0.8.0", + "osmnx >= 0.12", + "pandas >= 1.6", + "pandera[geopandas]", + "projectcard @ git+ssh://git@github.com/network-wrangler/projectcard.git", + "pyarrow", + "pydantic >= 2", + "pyogrio", + "pyyaml", +] + + +[project.optional-dependencies] +viz = [ + "folium", + "jupyter", + "notebook", +] +docs = [ + "fontawesome_markdown", + "jupyter", + "markdown == 3.3.1", + "mike", + "mkdocs", + "mkdocs-autorefs", + "mkdocs-awesome-pages-plugin", + "mkdocs-jupyter", + "mkdocs-macros-plugin", + "mkdocs-material", + "mkdocstrings", + "mkdocstrings-python", +] +tests = [ + "coverage", + "mypy", + "pytest", + "pytest-benchmark", + "pytest-cov", + "ruff", + "vulture", +] [tool.ruff] line-length = 99 diff --git a/requirements.tests.txt b/requirements.tests.txt index 668b7834..20716910 100644 --- a/requirements.tests.txt +++ b/requirements.tests.txt @@ -1,7 +1,4 @@ -"black[jupyter]" -black coverage -flake8 mypy pytest pytest-benchmark diff --git a/setup.py b/setup.py deleted file mode 100644 index 6622f8bf..00000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -"""Setup script for network_wrangler.""" - -from setuptools import setup - -classifiers = [ - "Development Status :: 1 - Planning", - "License :: OSI Approved :: Apache Software License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", -] - -with open("README.md") as f: - long_description = f.read() - -with open("requirements.txt") as f: - install_requires = [r.strip() for r in f.readlines()] - -EXTRAS = ["tests", "viz", "docs"] -extras_require = {} -for e in EXTRAS: - with open(f"requirements.{e}.txt", encoding="utf-8") as f: - extras_require[e] = [r.strip() for r in f if r.strip() and not r.startswith("#")] - -setup( - name="network_wrangler", - version="0.2.0", - description="", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/wsp-sag/network_wrangler", - license="Apache 2", - platforms="any", - packages=["network_wrangler"], - include_package_data=True, - install_requires=install_requires, - extras_require=extras_require, -) diff --git a/tests/test_setup.py b/tests/test_setup.py index 5d024da7..1f9c9bb4 100644 --- a/tests/test_setup.py +++ b/tests/test_setup.py @@ -6,9 +6,11 @@ def test_setup(): import subprocess import shutil - subprocess.run(["python", "-m", "venv", "wranglertest"]) - subprocess.run(["wranglertest/bin/pip", "install", "."]) + subprocess.run(["python", "-m", "venv", "wranglertest"], check=True) + subprocess.run(["wranglertest/bin/pip", "install", "network_wrangler"], check=True) # Test that network wrangler can be imported import network_wrangler + # Test that dependencies were installed + import osmnx - shutil.rmtree('wranglertest') + shutil.rmtree("wranglertest")