diff --git a/ding0/tools/tests.py b/ding0/tools/tests.py index cba91f07..3d311272 100644 --- a/ding0/tools/tests.py +++ b/ding0/tools/tests.py @@ -1,4 +1,4 @@ -import unittest2 as unittest +import unittest from egoio.tools import db from ding0.core import NetworkDing0 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..668fbd51 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,70 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "ding0" +version = "v0.2.1" +dependencies = [ + "networkx >= 2.5.1", + "geopy >= 2.1.0", + "pandas >= 1.2.4", + "pyproj >= 3.0.1", + "sqlalchemy >= 1.3.24", + "geoalchemy2 >= 0.6.3", + "matplotlib >= 3.4.2", + "egoio >= 0.4.8", + "shapely >= 1.8, < 2.0.0", + "pypsa >= 0.17.1", + "seaborn >= 0.11.1", + "oedialect >= 0.0.10", + "geopandas >= 0.9.0", + "osmnx>=1.1.1", + "ding0>=0.2.1", + "numpy>=1.21.2", + "pyyaml>=6.0", + "saio>=0.2.1", + "scipy>=1.7.1", + "contextily>=1.2.0", + "argparse>=1.4.0", + "scikit-learn>=0.24.2", + "pymetis", + "pyshp", +] + +requires-python = ">=3.10" +authors = [ + {name = "nesnoj", email = "jonathan.amme@rl-institut.de"}, + {name = "gplssm"}, +] +maintainers = [ + {name = "nesnoj", email = "jonathan.amme@rl-institut.de"}, +] +description = "DIstribution Network GeneratOr" +readme = "README.md" +license = {text= "AGPL-3.0"} +keywords = ["grid"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Topic :: Scientific/Engineering", +] + +[tool.setuptools.package-data] +ding0 = [ + "config/*.cfg", + "data/*.csv", + "grid/mv_grid/tests/testcases/*.vrp", + "grid/mv_grid/tests/testcases/Augerat/*.vrp", + "grid/mv_grid/tests/testcases/Augerat-tcc/*.vrp", + "grid/mv_grid/tests/testcases/Takes-tcc/*.vrp", + "grid/mv_grid/tests/testcases/Vigo/*.vrp", +] + +[project.urls] +Homepage = "https://github.com/openego/ding0" +Repository = "https://github.com/openego/ding0.git" +Documentation = "https://dingo.readthedocs.io" +"Bug Tracker" = "https://github.com/openego/ding0/issues" \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 195ce247..00000000 --- a/setup.py +++ /dev/null @@ -1,92 +0,0 @@ -"""This file is part of DING0, the DIstribution Network GeneratOr. -DING0 is a tool to generate synthetic medium and low voltage power -distribution grids based on open data. - -It is developed in the project open_eGo: https://openegoproject.wordpress.com - -DING0 lives at github: https://github.com/openego/ding0/ -The documentation is available on RTD: http://ding0.readthedocs.io""" - -__copyright__ = "Reiner Lemoine Institut gGmbH" -__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" -__url__ = "https://github.com/openego/ding0/blob/master/LICENSE" -__author__ = "nesnoj, gplssm" - - -from setuptools import find_packages, setup -import os - - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() - - -with open('requirements.txt') as f: - requirements = f.read().splitlines() -with open('dev_requirements.txt') as f: - dev_requirements = f.read().splitlines() - -with open('README.md', encoding='utf-8') as f: - long_description = f.read() - -setup(name='ding0', - version='v0.2.1', - author='Reiner Lemoine Institut', - author_email='jonathan.amme@rl-institut.de', - description='DIstribution Network GeneratOr', - long_description=long_description, - long_description_content_type='text/markdown', - url='https://github.com/openego/ding0', - license='GNU AGPLv3', - packages=find_packages(), - install_requires=requirements, - package_data={ - 'ding0': [ - os.path.join('config', - '*.cfg'), - os.path.join('data', - '*.csv'), - os.path.join('grid', - 'mv_grid', - 'tests', - 'testcases', - '*.vrp'), - os.path.join('grid', - 'mv_grid', - 'tests', - 'testcases', - 'Augerat', - '*.vrp'), - os.path.join('grid', - 'mv_grid', - 'tests', - 'testcases', - 'Augerat-tcc', - '*.vrp'), - os.path.join('grid', - 'mv_grid', - 'tests', - 'testcases', - 'Takes-tcc', - '*.vrp'), - os.path.join('grid', - 'mv_grid', - 'tests', - 'testcases', - 'Vigo', - '*.vrp'), - - ]}, - extras_require={ - 'dev': dev_requirements}, - classifiers=[ - "Development Status :: 3 - Alpha", - "Environment :: Console", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Affero General Public License v3", - "Natural Language :: English", - "Operating System :: POSIX :: Linux", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: 3.8", - "Topic :: Scientific/Engineering"], - )