diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b76f7c9..97f8a22 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -59,4 +59,3 @@ jobs: - name: Publish distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags/v') uses: pypa/gh-action-pypi-publish@release/v1 - diff --git a/pyproject.toml b/pyproject.toml index 21220fa..78c60d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,67 @@ +# NOTE: you have to use single-quoted strings in TOML for regular expressions. +# It's the equivalent of r-strings in Python. Multiline strings are treated as +# verbose regular expressions by Black. Use [ ] to denote a significant space +# character. + +# Build system information and other project-specific configuration below. + +[build-system] +requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"] +build-backend = "hatchling.build" + +[project] +name = "edi_energy_scraper" +description = "a scraper to mirror edi-energy.de" +license = { text = "MIT" } +requires-python = ">=3.11" +authors = [ + { name = "Hochfrequenz Unternehmensberatung GmbH", email = "info+github@hochfrequenz.de" }, +] +keywords = ["automation", "ahb", "bdew", "edi@energy"] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "beautifulsoup4>=4.11.1", + "aiohttp>=3.8.4", + "aiohttp-requests>=0.2.2", + "pypdf>=3.4.1", +] +dynamic = ["readme", "version"] + +[project.urls] +Changelog = "https://github.com/Hochfrequenz/edi_energy_scraper/releases" +Homepage = "https://github.com/Hochfrequenz/edi_energy_scraper" + +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/markdown" +fragments = [{ path = "README.md" }] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "src/_edi_energy_scraper_version.py" +template = ''' +version = "{version}" +''' + +[tool.hatch.build.targets.sdist] +exclude = ["/unittests"] + +[tool.hatch.build.targets.wheel] +only-include = ["src"] +sources = ["src"] + + [tool.black] line-length = 120 @@ -13,9 +77,7 @@ max-line-length = 120 # even if they have no @pytest.mark.asyncio marker. # https://github.com/pytest-dev/pytest-asyncio#auto-mode asyncio_mode = "auto" -markers = [ - "datafiles" -] +markers = ["datafiles"] # the following lines are needed if you would like to build a python package # and you want to use semantic versioning diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9816989..0000000 --- a/setup.cfg +++ /dev/null @@ -1,45 +0,0 @@ -# The content of this file is only necessary for python packages -[metadata] -name = edi_energy_scraper -author = Hochfrequenz Unternehmensberatung GmbH -author_email = your@email.address -description = a scraper to mirror edi-energy.de -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -url = https://github.com/Hochfrequenz/edi_energy_scraper -project_urls = - Documentation = https://github.com/Hochfrequenz/edi_energy_scraper - Code = https://github.com/Hochfrequenz/edi_energy_scraper - Bug tracker = https://github.com/Hochfrequenz/edi_energy_scraper/issues -classifiers = - Development Status :: 4 - Beta - Intended Audience :: Developers - Programming Language :: Python - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Operating System :: OS Independent -license = mit -platforms = any - -[options] -# create a src package in the root directory and create there a folder with the name of your package -# into this folder you put your python files -package_dir = - = src -packages = find: -zip_safe = False -include_package_data = True -python_requires = >=3.8 -install_requires = - beautifulsoup4>=4.11.1 - aiohttp>=3.8.4 - aiohttp-requests>=0.2.2 - pypdf>=3.4.1 - -[options.packages.find] -where = src -exclude = - unittests - -[options.package_data] -* = py.typed diff --git a/setup.py b/setup.py deleted file mode 100644 index d5d43d7..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup(use_scm_version=True)