Skip to content

Commit

Permalink
Replace setup.py with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
chrwm committed Apr 23, 2024
1 parent 8f19b77 commit 7e8bed1
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
python -m pip install --upgrade pip
- name: create package
run: python setup.py sdist
run: python -m build --sdist
- name: import open-mastr
run: python -m pip install ./dist/open_mastr-0.14.2.tar.gz
- name: Create credentials file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- test-release # update setup.py version number with bump2version (implemented in #407)
- test-release # update pyproject.toml version number

jobs:
build-n-publish:
Expand Down
93 changes: 93 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[build-system]
requires = ["twine"]
build-backend = "twine.build"

[project]
name = "open_mastr"
version = "0.14.3"
dependencies = [
"pandas>=2.1", # pandas 2.1 is needed for dataframe.map()
"numpy",
"sqlalchemy>=2.0",
"psycopg2-binary",
"zeep",
"tqdm",
"requests",
"keyring",
"pyyaml",
"xmltodict",
]

requires-python = ">=3.9, <4"
authors = [
{name = "Hülk Ludwig"},
{name = "Pleßmann Guido"},
{name = "Muschner Christoph"},
{name = "Kotthoff Florian"},
{name = "Tepe Deniz"},
{name = "Open Energy Family"},
]

maintainers = [
{name = "Florian Kotthoff"}
{name = "Christoph Muschner", email = "[email protected]"}
{name = "Ludwig Hülk", email = "[email protected]"}
]
description = "A package that provides an interface for downloading and processing the data of the Marktstammdatenregister (MaStR)"
readme = "README.rst"
license = {file = "LICENSE.md"}
keywords = ["Markstammdatenregister", "Energy", "Dataset", "Solar", "Wind", "Energy-data", "OEP", "OpenEnergyFamily"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: GIS",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[project.optional-dependencies]
dev = [
"flake8",
"pylint",
"pytest",
"pytest-dependency",
"xmltodict",
"pre-commit",
"bump2version",
"mkdocstrings[python]",
"mkdocs-material",
"mkdocs-include-markdown-plugin",
"mike",
"black",
]

[project.urls]
Homepage = "https://github.com/OpenEnergyPlatform/open-MaStR"
Documentation = "https://open-mastr.readthedocs.io/"
Repository = "https://github.com/OpenEnergyPlatform/open-MaStR"
"Bug Tracker" = "https://github.com/OpenEnergyPlatform/open-MaStR/issues"
Changelog = "https://github.com/OpenEnergyPlatform/open-MaStR/blob/production/CHANGELOG.md"

[tool.setuptools.package-data]
open_mastr = [
"utils/config/*.yml",
"soap_api/metadata/LICENSE",
]

# from setup.py - not yet included in here
# download_url="https://github.com/OpenEnergyPlatform/open-MaStR/archive""/refs/tags/v0.14.2.tar.gz",
# setup(
# name="open_mastr",
# packages=[
# "open_mastr",
# "open_mastr.soap_api",
# "open_mastr.soap_api.metadata",
# "open_mastr.utils",
# "open_mastr.utils.config",
# "open_mastr.xml_download",
# ],
85 changes: 0 additions & 85 deletions setup.py

This file was deleted.

0 comments on commit 7e8bed1

Please sign in to comment.