diff --git a/.github/workflows/python2-app.yml b/.github/workflows/python2-app.yml index f428488..5f7fbc3 100644 --- a/.github/workflows/python2-app.yml +++ b/.github/workflows/python2-app.yml @@ -23,11 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - pip install -r requirements.txt - pip install -r requirements-dev.txt - pip install coveralls - pip install -e . + pip install -e .[dev] - name: Test with mamba run: | mamba --enable-coverage \ No newline at end of file diff --git a/.github/workflows/python3-app.yml b/.github/workflows/python3-app.yml index fa7bc61..6646005 100644 --- a/.github/workflows/python3-app.yml +++ b/.github/workflows/python3-app.yml @@ -23,11 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - pip install -r requirements.txt - pip install -r requirements-dev.txt - pip install coveralls - pip install -e . + pip install -e .[dev] - name: Test with mamba run: | mamba --enable-coverage \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 59ec499..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include requirements.txt -include requirements-dev.txt -include profiles/data/*.csv -include profiles/data/*.xlsx diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5a7dd04 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,66 @@ +[build-system] +requires = ["hatchling>=1.8.0"] +build-backend = "hatchling.build" + +[project] +name = "enerdata" +dynamic = ["version"] +description = "A set of energy models" +readme = "README.rst" +license = "MIT" +requires-python = ">=2.7" +authors = [ + { name = "GISCE-TI, S.L.", email = "devel@gisce.net" }, +] +keywords = [ + "Energy", + "Model", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Information Technology", + "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", +] +dependencies = [ + "pytz", + "workalendar<8.0.0", + "pandas==0.23.4", + "requests", + "six", + "xlrd==1.2.0", +] + +[project.optional-dependencies] +dev = [ + "mamba<0.11.0", + "expects", + "vcrpy", + "coveralls", + "build", +] + +[project.urls] +homepage = "http://code.gisce.net" + +[tool.hatch.version] +path = "enerdata/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/enerdata", +] + +[tool.hatch.build.targets.wheel] +packages = [ + "/enerdata", +] \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 6bceed3..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ -mamba<0.11.0 -expects -vcrpy diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1c8f95a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -pytz -workalendar<8.0.0 -pandas==0.23.4 -requests -six -xlrd==1.2.0 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5aef279..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.rst diff --git a/setup.py b/setup.py deleted file mode 100644 index c12e39e..0000000 --- a/setup.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -from setuptools import setup, find_packages -from enerdata import __version__ - -with open('requirements.txt', 'r') as f: - requirements = f.readlines() - -PACKAGES_DATA = {'enerdata': ['profiles/data/*.csv', 'profiles/data/*.xlsx']} - -setup( - name='enerdata', - version=__version__, - description='A set of energy models', - provides=['enerdata'], - packages=find_packages(), - package_data=PACKAGES_DATA, - install_requires=requirements, - license='MIT', - author='GISCE-TI, S.L.', - author_email='devel@gisce.net', - url='http://code.gisce.net', -)