Skip to content

Commit 80f8551

Browse files
Merge pull request #329 from CodeForPhilly/update_setup
Update setup
2 parents d21be95 + b48d1c3 commit 80f8551

File tree

8 files changed

+81
-22
lines changed

8 files changed

+81
-22
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM python:3.7.7-slim-buster
22
RUN mkdir /app
33
WORKDIR /app
44
COPY README.md .
5+
COPY setup.cfg .
56
COPY setup.py .
67
COPY requirements.txt .
78
# Creating an empty src dir is a (hopefully) temporary hack to improve layer caching and speed up image builds

setup.cfg

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[metadata]
2+
long_description = file: README.md
3+
long_description_content_type = text/markdown
4+
5+
[options]
6+
# tests_require is a list of dependencies that are *absolutely required*
7+
# to run the tests. tests_require is used when running tests from your
8+
# *current* Python environment (that is, not using tox).
9+
# tests_require is ignored by tox.
10+
#
11+
# As such, you can usually get away with neglecting tests_require ---
12+
# it's not a big deal if some of the dependencies get left out.
13+
#
14+
# If you're running tests from your current environment, it's because
15+
# you're actively developing, in which case you usually have an
16+
# environment you built for development. But if you have to change
17+
# environments mid-development for any reason, tests_require can save you
18+
# from getting tripped up.
19+
#
20+
# tests_require is used when running tests and debugging through an IDE like
21+
# PyCharm, to ensure the environment the IDE is using has the requirements.
22+
#
23+
# Unless you're in one of those situations, you can simply ignore this.
24+
tests_require = pytest
25+
26+
[aliases]
27+
# Alias `setup.py test` to `setup.py pytest`
28+
test = pytest
29+
30+
[flake8]
31+
max-complexity = 10
32+
33+
[mypy]
34+
follow_imports = normal
35+
ignore_missing_imports = True
36+
37+
[tool:pytest]
38+
# If a pytest section is found in one of the possible config files
39+
# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others,
40+
# so if you add a pytest config section elsewhere,
41+
# you will need to delete this section from setup.cfg.
42+
log_cli=true
43+
log_level=NOSET
44+
norecursedirs =
45+
.git
46+
.tox
47+
.env
48+
dist
49+
build
50+
python_files =
51+
test_*.py
52+
*_test.py
53+
tests.py
54+
addopts =
55+
-ra
56+
--cov=penn_chime
57+
--cov-report=term-missing
58+
--strict
59+
--ignore=ci
60+
--ignore=.eggs
61+
--doctest-modules
62+
--doctest-glob=\*.rst
63+
--tb=short
64+
testpaths =
65+
test

setup.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
"""Setup file for chime
22
"""
3-
__version__ = "0.1.0"
3+
__version__ = "0.2.0"
44
__author__ = "Predictive Healthcare @ Penn Medicine"
55

6-
import io
76
from os import path
87
from setuptools import setup, find_packages, find_namespace_packages
98

10-
with io.open("README.md", "r") as inp:
11-
LONG_DESCRIPTION = inp.read()
12-
9+
1310
setup(
1411
name="penn_chime",
1512
version=__version__,
1613
author=__author__,
1714
author_email="",
1815
description="COVID-19 Hospital Impact Model for Epidemics",
19-
long_description=LONG_DESCRIPTION,
20-
long_description_content_type="text/markdown",
2116
url="https://github.com/CodeForPhilly/chime",
2217
project_urls={
2318
"Bug Reports": "https://github.com/CodeForPhilly/chime/issues",
@@ -32,17 +27,17 @@
3227
"numpy",
3328
"altair",
3429
"pytest",
35-
"dash",
36-
"dash_bootstrap_components",
37-
"pyyaml",
30+
"dash",
31+
"dash_bootstrap_components",
32+
"pyyaml",
3833
"gunicorn"
3934
],
4035
classifiers=[
4136
"Programming Language :: Python :: 3",
4237
"License :: OSI Approved :: MIT License",
4338
"Operating System :: OS Independent",
4439
],
45-
python_requires='>=3.6',
40+
python_requires='>=3.7',
4641
entry_points = {
4742
'console_scripts': ['penn_chime=penn_chime.cli:main'],
4843
},

src/penn_chime/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
x = 1
1+
"""Penn Chime."""

src/penn_chime/charts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from math import ceil
33
import datetime
44

5-
from altair import Chart # type: ignore
6-
import pandas as pd # type: ignore
5+
from altair import Chart
6+
import pandas as pd
77
import numpy as np
88

99
from .parameters import Parameters

src/penn_chime/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
from typing import Dict, Generator, Tuple
1111

12-
import numpy as np # type: ignore
13-
import pandas as pd # type: ignore
12+
import numpy as np
13+
import pandas as pd
1414

1515
from .parameters import Parameters
1616

src/penn_chime/presentation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""effectful functions for streamlit io"""
22

3-
import numpy as np # type: ignore
4-
import pandas as pd # type: ignore
3+
import numpy as np
4+
import pandas as pd
55

66
from .defaults import Constants, RateLos
77
from .utils import add_date_column, dataframe_to_base64

src/penn_chime/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
from typing import Optional
66
from base64 import b64encode
77

8-
import numpy as np # type: ignore
9-
import pandas as pd # type: ignore
10-
11-
# from .parameters import Parameters
8+
import numpy as np
9+
import pandas as pd
1210

1311

1412
# (0.02, 7) is 2%, 7 days

0 commit comments

Comments
 (0)