Skip to content

Commit

Permalink
📦 Move to pyproject.toml setup for python package (#107)
Browse files Browse the repository at this point in the history
* 🎨 Clean up yaml file

* 💚 Move from setup.py to pyproject.toml package setup

* Update pyproject.toml

---------

Co-authored-by: konstantin <konstantin.klein@hochfrequenz.de>
  • Loading branch information
hf-krechan and hf-kklein authored Jan 21, 2024
1 parent e20f174 commit fd45049
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 52 deletions.
1 change: 0 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

68 changes: 65 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
45 changes: 0 additions & 45 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit fd45049

Please sign in to comment.