Skip to content

Commit 224120f

Browse files
authored
Merge pull request #249 from nickcanz/pip_installation_scripts
Add setup.py for package publishing
2 parents 0bc279d + c939c48 commit 224120f

File tree

5 files changed

+44
-7
lines changed

5 files changed

+44
-7
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ FROM python:3.7.7-slim-buster
22

33
COPY .streamlit ~/
44

5-
COPY ./requirements.txt /app/requirements.txt
5+
COPY ./README.md /app/README.md
6+
COPY ./setup.py /app/setup.py
7+
RUN mkdir /app/src
68

79
WORKDIR /app
810

9-
RUN pip install -q -r requirements.txt
11+
RUN pip install -q .
1012

1113
COPY . ./
1214

docs/contributing/app-dev.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ streamlit run src/app.py
5959
- `Pipfile.lock`
6060
- `environment.yml`
6161
- `requirements.txt`
62+
- `setup.py`
6263

6364
### Documentation
6465

requirements.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
streamlit
2-
pandas
3-
numpy
4-
pytest
5-
altair
1+
-e .

setup.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import io
2+
import setuptools
3+
4+
with io.open("README.md", encoding="utf-8") as fh:
5+
long_description = fh.read()
6+
7+
setuptools.setup(
8+
name="penn_chime",
9+
version="1.0.0",
10+
author="Predictive Healthcare @ Penn Medicine",
11+
description="COVID-19 Hospital Impact Model for Epidemics",
12+
long_description=long_description,
13+
long_description_content_type="text/markdown",
14+
url="https://github.com/CodeForPhilly/chime",
15+
project_urls={
16+
"Bug Reports": "https://github.com/CodeForPhilly/chime/issues",
17+
"Source": "https://github.com/CodeForPhilly/chime",
18+
"Documentation": "https://codeforphilly.github.io/chime/",
19+
},
20+
package_dir={'': 'src'},
21+
packages=setuptools.find_namespace_packages(where='src', exclude=('tests')),
22+
install_requires=[
23+
"streamlit",
24+
"pandas",
25+
"numpy",
26+
"altair",
27+
"pytest"
28+
],
29+
classifiers=[
30+
"Programming Language :: Python :: 3",
31+
"License :: OSI Approved :: MIT License",
32+
"Operating System :: OS Independent",
33+
],
34+
python_requires='>=3.6',
35+
entry_points = {
36+
'console_scripts': ['penn_chime=penn_chime.cli:main'],
37+
}
38+
)
File renamed without changes.

0 commit comments

Comments
 (0)