Skip to content

Switch from setup.py to pyproject.toml #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
4 changes: 0 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
prune .github
exclude .gitignore
exclude .readthedocs.yml
exclude .travis.yml

graft pvanalytics/data
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ It supports:

Additionally, PVAnalytics relies on several other packages in the open
source scientific python ecosystem. For details on dependencies and versions,
see our `setup.py <https://github.com/pvlib/pvanalytics/blob/main/setup.py>`_.
see our `pyproject.toml <https://github.com/pvlib/pvanalytics/blob/main/pyproject.toml>`_.


.. toctree::
Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["setuptools>=70.1", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"


[project]
name = "pvanalytics"
description = "PVAnalytics is a python library for the analysis of photovoltaic system-level data."
authors = [
{ name = "pvanalytics Contributors", email = "pvlib-admin@googlegroups.com" },
]
requires-python = ">=3.8"
dependencies = [
'numpy >= 1.20.0',
'pandas >= 1.3.0',
'pvlib >= 0.9.4',
'scipy >= 1.6.0',
'statsmodels >= 0.13.0',
'scikit-image >= 0.18.0',
]
license = "MIT"
classifiers = [
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering',
]
readme.text = """
PVAnalytics is a collection of functions for working with data
from photovoltaic power systems. The library includes functions for
general data quality tests such as outlier detection, validation that
data is physically plausible, filtering data for specific conditions,
and labeling specific features in the data.

Documentation: https://pvanalytics.readthedocs.io

Source code: https://github.com/pvlib/pvanalytics
"""
readme.content-type = "text/x-rst"
dynamic = ["version"]


[project.optional-dependencies]
optional = [
'ruptures',
]
doc = [
'sphinx == 4.5.0',
'pydata-sphinx-theme == 0.8.1',
'sphinx-gallery',
'matplotlib',
'pyarrow',
# the following are needed for sphinx < 5. TODO upgrade to sphinx>5, and
# get rid of these pins.
# https://github.com/sphinx-doc/sphinx/issues/11890
# https://stackoverflow.com/questions/77848565/sphinxcontrib-applehelp-breaking-sphinx-builds-with-sphinx-version-less-than-5-0
'sphinxcontrib-applehelp==1.0.4',
'sphinxcontrib-devhelp==1.0.2',
'sphinxcontrib-htmlhelp==2.0.1',
'sphinxcontrib-qthelp==1.0.3',
'sphinxcontrib-serializinghtml==1.1.5',
]
test = [
'pytest',
'pytest-cov',
'packaging',
]
all = ["pvlib[test,optional,doc]"]

[project.urls]
"Bug Tracker" = "https://github.com/pvlib/pvanalytics/issues"
Documentation = "https://pvanalytics.readthedocs.io/"
"Source Code" = "https://github.com/pvlib/pvanalytics"


[tool.setuptools.packages.find]
include = ["pvanalytics*"]


[tool.setuptools.package-data]
pvanalytics = ["pvanalytics/data/*"]

[tool.setuptools_scm]
90 changes: 0 additions & 90 deletions setup.py

This file was deleted.