forked from NLRWindSystems/WOMBAT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
126 lines (110 loc) · 3.43 KB
/
setup.py
File metadata and controls
126 lines (110 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
"""The package setup for installations."""
from __future__ import annotations
import codecs
from pathlib import Path
from setuptools import setup, find_packages
HERE = Path(__file__).parent
with open(HERE / "README.md", newline="") as readme:
long_description = readme.read()
long_description_content_type = "text/markdown"
def read(relative_path: Path | str) -> str:
"""Reads the `relative_path` file."""
with codecs.open(str(HERE / relative_path), "r") as fp:
return fp.read()
def get_version(relative_path: Path | str) -> str:
"""Retreives the version number."""
for line in read(relative_path).splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
description = "Windfarm operations and maintenance cost-benefit analysis tool"
version = get_version(HERE / "wombat" / "__init__.py")
# Requirements
REQUIRED = [
"attrs>=21",
"numpy>=1.21",
"scipy>=1.8",
"pandas>=2",
"polars>=0.17",
"pyarrow>=10",
"jupyterlab>=3",
"simpy>=4.0.1",
"pyyaml>=6",
"geopy>=2.3",
"networkx>=2.7",
"matplotlib>=3.3",
"nrel-pysam>=4",
# required for pre-commit CI
"types-attrs>=19",
"types-typed-ast>=1.5",
"types-PyYAML>=6",
"types-python-dateutil>=2.8",
]
DEVELOPER = [
"pre-commit>=2.20",
"pylint>=2.14",
"flake8>=5",
"flake8-docstrings>=1.6",
"flake8_sphinx_links==0.2.1",
"black>=22.1",
"isort>=5.10",
"pytest>=7",
"pytest-cov>=4",
"mypy==0.991",
"ruff==0.0.246",
]
DOCUMENTATION = [
"Sphinx",
"myst-nb>=0.16",
"myst-parser>=0.17",
"sphinx-book-theme<1",
"sphinxcontrib-spelling>=7",
"linkify-it-py>=2",
"sphinxcontrib-bibtex>=2.4",
]
extra_package_requirements = {
"dev": DEVELOPER,
"docs": DOCUMENTATION,
"all": DEVELOPER + DOCUMENTATION,
}
setup(
name="wombat",
author="Rob Hammond",
author_email="rob.hammond@nrel.gov",
version=version,
description=description,
long_description=long_description,
long_description_content_type=long_description_content_type,
project_urls={
"Source": "https://github.com/WISDEM/WOMBAT",
"Documentation": "https://wisdem.github.io/WOMBAT/",
},
classifiers=[
# Source: https://pypi.org/classifiers
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
],
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
include_package_data=True,
package_data={"": ["*.yaml", "*.csv"]},
install_requires=REQUIRED,
python_requires=">=3.9, <3.11",
extras_require=extra_package_requirements,
test_suite="pytest",
tests_require=["pytest", "pytest-cov"],
)