-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathsetup.py
69 lines (61 loc) · 2.33 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
from setuptools import setup, find_packages
import codecs
import os.path
with open("README.md", "r") as fh:
long_description = fh.read()
def parse_requirements_file(filename):
with open(filename, encoding="utf-8") as fid:
requires = [l.strip() for l in fid.readlines() if l]
return requires
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
# Optional Packages
# See https://godatadriven.com/blog/a-practical-guide-to-using-setup-py/
EXTRAS = {
"dev": ["black", "isort", "pylint", "flake8", "pyprojroot"],
"tests": [
"pytest",
],
"docs": [
"furo==2020.12.30b24",
"nbsphinx==0.8.1",
"nb-black==1.0.7",
"matplotlib==3.3.3",
"sphinx-copybutton==0.3.1",
],
}
setup(name="ml4floods",
version=get_version("ml4floods/__init__.py"),
author="SpaceML-org",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(".", exclude=["tests"]),
package_data={
"ml4floods" : ["models/configurations/*.json",
"data/configuration/train_test_split_extra_dataset.json",
"data/configuration/train_test_split_original_dataset.json"] # Add json files from configuration dirs.
},
url="https://github.com/spaceml-org/ml4floods",
classifiers=[
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: GIS",
"Development Status :: 5 - Production/Stable",
],
description="Machine learning models for end-to-end flood extent segmentation.",
install_requires=parse_requirements_file("requirements.txt"),
extras_require=EXTRAS,
keywords=["floods pytorch machine-learning earth"],
)