forked from nansencenter/DAPPER
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·143 lines (120 loc) · 4.02 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/usr/bin/env python3
import setuptools, os, re
# with open("README.md", "r") as fh:
# long_description = fh.read()
long_description = """DAPPER is a set of templates for benchmarking the performance of data assimilation (DA).
See full description at github.com/nansencenter/DAPPER.
"""
def filter_dirs(x):
val = x!='__pycache__'
val &= x!='.DS_Store'
val &= x!='pyks'
val &= not x.endswith('.py')
return val
def find_version(*file_paths):
"""Get version by regex'ing a file."""
# Source: packaging.python.org/guides/single-sourcing-package-version
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *parts), 'r') as fp:
return fp.read()
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setuptools.setup(
# Basic meta
name="DA-DAPPER",
version=find_version("dapper", "__init__.py"),
author="Patrick N. Raanes",
author_email="[email protected]",
description="Data Assimilation with Python: a Package for Experimental Research.",
# Dependencies. Use pipdeptree and pipreqs tools to list.
# We pin smaller libraries (coz stackoverflow.com/a/28510546),
# but allow ranges for bigger ones (coz stackoverflow.com/a/43421973).
python_requires='~=3.6', # (need >=3.6 for mpl 3.1)
install_requires=[
'scipy>=1.1',
'ipython>=5.1',
'matplotlib~=3.1', # >=3.1 to avoid Mac's framework-build issues
'tqdm~=4.31',
'colorama~=0.4.1',
'tabulate~=0.8.3',
],
# Optional
extras_require={
'MP': [
'threadpoolctl==1.0.0',
'multiprocessing-on-dill==3.5.0a4',
'psutil',
],
'Qt': ['PyQt5','qtpy'],
},
# Other packages used, but not explicitly required
#
# Already implicitly required:
# ----------------------------
# numpy # comes with scipy, etc
# cycler # comes with mpl
# pkg_resources # comes with setuptools
#
# Stdlib
# ----------------------------
# contextlib
# subprocess
# socket
# textwrap
# copy
# itertools
# os.path
# warnings
# re
# traceback
# inspect
# signal
# functools
# glob
# collections
# termios
# getpass
#
# Built-ins:
# ----------------------------
# builtins
# time
# sys
# msvcrt
# File inclusion
# Note: find_packages() only works on __init__ dirs.
packages=setuptools.find_packages()+\
['dapper.da_methods','dapper.tools','dapper.mods']+\
['dapper.mods.'+x for x in os.listdir('dapper/mods') if filter_dirs(x)]+\
['dapper.mods.QG.f90'],
package_data={
'': ['dpr_config.ini','*.mplstyle','*.txt','*.md','*.png'],
'dapper.mods.QG.f90': ['*.txt','*.md','*.png','Makefile','*.f90'],
},
py_modules=["example_1","example_2","example_3"],
# Detailed meta
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics',
'Programming Language :: Python :: 3',
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/nansencenter/DAPPER",
keywords='data-assimilation enkf kalman-filtering state-estimation particle-filter kalman bayesian-methods bayesian-filter chaos',
# project_urls={
# 'Documentation': 'https://packaging.python.org/tutorials/distributing-packages/',
# 'Funding': 'https://donate.pypi.org',
# 'Say Thanks!': 'http:https://saythanks.io/to/example',
# 'Source': 'https://github.com/pypa/sampleproject/',
# 'Tracker': 'https://github.com/pypa/sampleproject/issues',
# },
)