Skip to content

Commit

Permalink
Remove setup.cfg in favor of pyproject.toml (#58)
Browse files Browse the repository at this point in the history
* Remove setup.cfg in favor of pyproject.toml

* Convert [tool.coverage.run]omit to a list

* Add [tool.setuptools_scm]

* Address reviewer comments

* Fix excluding folders

* Move data folder to root

* include-package-data = false
  • Loading branch information
AdamRJensen authored Dec 9, 2024
1 parent 8733a5e commit eee16f8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs/source/notebooks/validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
}
],
"source": [
"filename = '../../../twoaxistracking/data/barstow_1976_irradiance_data_quality_controlled.csv'\n",
"filename = '../../../data/barstow_1976_irradiance_data_quality_controlled.csv'\n",
"df = pd.read_csv(filename, index_col=0, parse_dates=[0])\n",
"\n",
"df.head() # print the first five rows of the dataframe"
Expand Down
64 changes: 62 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,66 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
"setuptools>61", # start of support for pyproject.toml/PEP 621. https://setuptools.pypa.io/en/stable/history.html#v61-0-0
"setuptools-scm",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm] # set version dynamically

[tool.setuptools]
include-package-data = false # necessary for exclude to work

[tool.setuptools.packages.find]
exclude = [
"twoaxistracking.tests*",
"docs*",
]

[project]
name = "twoaxistracking"
authors = [
{name = "Adam R. Jensen"},
{name = "Kevin S. Anderson"},
{email = "[email protected]"},
]
description = "twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading."
readme = "README.md"
requires-python = ">=3.9"
keywords = ["solar energy", "photovoltaics", "solar collector", "shading"]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
]
dependencies = [
"numpy",
"matplotlib",
"shapely",
"pandas",
]
dynamic = ["version"]

[project.optional-dependencies]
test = ["pytest", "pytest-cov", "packaging"]
doc = [
"sphinx==8.1.1",
"myst-nb==1.1.2",
"sphinx-book-theme==1.1.3",
"pvlib==0.11.1",
"pandas==2.2.3",
]

[project.urls]
Documentation = "https://twoaxistracking.readthedocs.io"
Issues = "https://github.com/pvlib/twoaxistracking/issues"
Repository = "https://github.com/pvlib/twoaxistracking.git"

[tool.pytest.ini_options]
addopts = "--cov=twoaxistracking --cov-fail-under=100 --cov-report=term-missing"

[tool.coverage.run]
# Do not count the test files themselves toward coverage
omit = ["twoaxistracking/tests/*"]
46 changes: 0 additions & 46 deletions setup.cfg

This file was deleted.

0 comments on commit eee16f8

Please sign in to comment.