-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathsetup.py
108 lines (98 loc) · 3.03 KB
/
setup.py
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
import pathlib
from setuptools import find_packages, setup
import versioneer
AUTHORS = [
("Chris Smith", "[email protected]"),
("Nicholas Leach", "[email protected]"),
("Stuart Jenkins", "[email protected]"),
("Richard Millar", "[email protected]"),
("Zeb Nicholls", "[email protected]"),
("Myles Allen", "[email protected]"),
]
here = pathlib.Path(__file__).parent.resolve()
# Get the long description from the README file
long_description = (here / "README.md").read_text(encoding="utf-8")
# using climate-assessment as a template here
REQUIREMENTS_INSTALL = [
"matplotlib", # not a requirement of fair, but needed for binder examples
"numpy",
"pandas",
"pooch",
"scipy",
"tqdm",
"xarray",
]
REQUIREMENTS_NOTEBOOKS = ["nbstripout", "jupyter", "ipywidgets", "ipython"]
REQUIREMENTS_TESTS = [
"codecov",
"nbmake",
"netCDF4",
"pytest-cov",
"pytest-console-scripts",
"pytest",
]
REQUIREMENTS_DOCS = ["ipython", "pandoc", "sphinx==6.2.1", "sphinx_rtd_theme==1.2.0"]
REQUIREMENTS_DEPLOY = [
"build",
"twine",
"setuptools",
"wheel",
] # plus conda
REQUIREMENTS_STYLE = [
"bandit",
"black",
"flake8",
"isort",
"pydocstyle",
]
requirements_dev = [
*REQUIREMENTS_DOCS,
*REQUIREMENTS_NOTEBOOKS,
*REQUIREMENTS_TESTS,
*REQUIREMENTS_DEPLOY,
*REQUIREMENTS_STYLE,
]
requirements_dev_nodocs = [
*REQUIREMENTS_NOTEBOOKS,
*REQUIREMENTS_TESTS,
*REQUIREMENTS_DEPLOY,
*REQUIREMENTS_STYLE,
]
requirements_extras = {
"docs": REQUIREMENTS_DOCS,
"tests": REQUIREMENTS_TESTS,
"deploy": REQUIREMENTS_DEPLOY,
"dev": requirements_dev,
"dev-nodocs": requirements_dev_nodocs,
}
setup(
name="fair",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Finite-amplitude Impulse Response (FaIR) simple climate model",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/OMS-NetZero/FAIR",
author=", ".join([author[0] for author in AUTHORS]),
author_email=", ".join([author[1] for author in AUTHORS]),
license="Apache 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
keywords="simple, climate, model, temperature, forcing, emissions, emulator",
package_dir={"": "src"},
packages=find_packages(where="src"),
package_data={"": ["*.csv"]},
python_requires=">=3.8, <4",
install_requires=REQUIREMENTS_INSTALL,
extras_require=requirements_extras,
)