diff --git a/.travis.yml b/.travis.yml index 7257a25..92ca45e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python python: - "3.7" - "3.8" + - "3.9" install: - make dev script: diff --git a/README.md b/README.md index be0fdf9..c411fd4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ -![Python 3.7](https://badgen.net/badge/Python/3.7/purple) -![Python 3.8](https://badgen.net/badge/Python/3.8/purple) -[![Build Status](https://travis-ci.com/xofbd/unfair-coin-bayes.svg?branch=master)](https://travis-ci.com/xofbd/unfair-coin-bayes) -[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/xofbd/unfair-coin-bayes.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xofbd/unfair-coin-bayes/context:python) -[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/xofbd/unfair-coin-bayes.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xofbd/unfair-coin-bayes/context:python) +![Python](https://shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9-blue) [![GitHub release](https://img.shields.io/github/v/release/xofbd/unfair-coin-bayes.svg)](https://github.com/xofbd/unfair-coin-bayes/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) +[![Build Status](https://travis-ci.com/xofbd/unfair-coin-bayes.svg?branch=master)](https://travis-ci.com/xofbd/unfair-coin-bayes) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/xofbd/unfair-coin-bayes.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xofbd/unfair-coin-bayes/context:python) +[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/xofbd/unfair-coin-bayes.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xofbd/unfair-coin-bayes/context:javascript) # Unfair Coin Bayesian Simulation This repository creates a web app that simulates the evolving probability distribution of an unfair coin to come up heads using Bayes's theorem. The prior distribution is a Beta distribution with both shape parameters set to one, resulting in a uniform distribution. This repository is ready to deploy a web application using [Flask](https://flask.palletsprojects.com) and [Bokeh](https://bokeh.org) to Heroku. An example of the app can be seen at https://unfair-coin-bayes.herokuapp.com. ## Prerequisites -You will need either Python 3.7 or 3.8. All required Python packages can be found in the `requirements.txt` file. You will also need a Heroku account and have installed the Heroku CLI. For more information on the Heroku CLI, go to https://devcenter.heroku.com/articles/heroku-cli#download-and-install. +You will need either Python 3.7, 3.8, or 3.9. All required Python packages can be found in the `requirements.txt` file. You will also need a Heroku account and have installed the Heroku CLI. For more information on the Heroku CLI, go to https://devcenter.heroku.com/articles/heroku-cli#download-and-install. ## Running the app locally using Flask You may want to run the app using Flask locally before deploying it to Heroku, especially if you have made any changes to the code. To run locally: diff --git a/requirements.txt b/requirements.txt index 175f44d..5de8ac8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,11 +9,11 @@ MarkupSafe==1.1.1 numpy==1.19.4 packaging==20.8 Pillow==8.1.2 -pip-tools==5.3.1 +pip-tools==5.5.0 pyparsing==2.4.7 python-dateutil==2.8.1 PyYAML==5.3.1 -scipy==1.5.0 +scipy==1.5.4 six==1.15.0 tornado==6.1 Werkzeug==1.0.1 diff --git a/requirements/base.in b/requirements/base.in index eb8e0ce..b05688b 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1 +1 @@ -pip-tools==5.3.1 \ No newline at end of file +pip-tools==5.5.0 \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index 8c30777..5df255c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,9 +4,10 @@ # # pip-compile requirements/base.in # -click==7.1.2 # via pip-tools -pip-tools==5.3.1 # via -r requirements/base.in -six==1.15.0 # via pip-tools +click==7.1.2 + # via pip-tools +pip-tools==5.5.0 + # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/dev.txt b/requirements/dev.txt index c1e8037..f3c5761 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,15 +4,31 @@ # # pip-compile requirements/dev.in # -attrs==20.3.0 # via pytest -flake8==3.8.4 # via -r requirements/dev.in -iniconfig==1.1.1 # via pytest -mccabe==0.6.1 # via flake8 -packaging==20.8 # via -c requirements/prod.txt, pytest -pluggy==0.13.1 # via pytest -py==1.10.0 # via pytest -pycodestyle==2.6.0 # via flake8 -pyflakes==2.2.0 # via flake8 -pyparsing==2.4.7 # via -c requirements/prod.txt, packaging -pytest==6.1.0 # via -r requirements/dev.in -toml==0.10.2 # via pytest +attrs==20.3.0 + # via pytest +flake8==3.8.4 + # via -r requirements/dev.in +iniconfig==1.1.1 + # via pytest +mccabe==0.6.1 + # via flake8 +packaging==20.8 + # via + # -c requirements/prod.txt + # pytest +pluggy==0.13.1 + # via pytest +py==1.10.0 + # via pytest +pycodestyle==2.6.0 + # via flake8 +pyflakes==2.2.0 + # via flake8 +pyparsing==2.4.7 + # via + # -c requirements/prod.txt + # packaging +pytest==6.1.0 + # via -r requirements/dev.in +toml==0.10.2 + # via pytest diff --git a/requirements/prod.in b/requirements/prod.in index c800415..2a21c68 100644 --- a/requirements/prod.in +++ b/requirements/prod.in @@ -4,4 +4,4 @@ bokeh==1.0.4 Flask==1.0 Flask-WTF==0.14.3 gunicorn==20.0.4 -scipy==1.5.0 +scipy==1.5.4 diff --git a/requirements/prod.txt b/requirements/prod.txt index 0a3188b..255be09 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -4,25 +4,61 @@ # # pip-compile requirements/prod.in # -bokeh==1.0.4 # via -r requirements/prod.in -click==7.1.2 # via -c requirements/base.txt, flask -flask-wtf==0.14.3 # via -r requirements/prod.in -flask==1.0 # via -r requirements/prod.in, flask-wtf -gunicorn==20.0.4 # via -r requirements/prod.in -itsdangerous==1.1.0 # via flask, flask-wtf -jinja2==2.11.3 # via -c requirements/constraints.txt, bokeh, flask -markupsafe==1.1.1 # via jinja2, wtforms -numpy==1.19.4 # via bokeh, scipy -packaging==20.8 # via bokeh -pillow==8.1.2 # via -c requirements/constraints.txt, bokeh -pyparsing==2.4.7 # via packaging -python-dateutil==2.8.1 # via bokeh -pyyaml==5.3.1 # via bokeh -scipy==1.5.0 # via -r requirements/prod.in -six==1.15.0 # via -c requirements/base.txt, bokeh, python-dateutil -tornado==6.1 # via bokeh -werkzeug==1.0.1 # via flask -wtforms==2.3.3 # via flask-wtf +bokeh==1.0.4 + # via -r requirements/prod.in +click==7.1.2 + # via + # -c requirements/base.txt + # flask +flask-wtf==0.14.3 + # via -r requirements/prod.in +flask==1.0 + # via + # -r requirements/prod.in + # flask-wtf +gunicorn==20.0.4 + # via -r requirements/prod.in +itsdangerous==1.1.0 + # via + # flask + # flask-wtf +jinja2==2.11.3 + # via + # -c requirements/constraints.txt + # bokeh + # flask +markupsafe==1.1.1 + # via + # jinja2 + # wtforms +numpy==1.19.4 + # via + # bokeh + # scipy +packaging==20.8 + # via bokeh +pillow==8.1.2 + # via + # -c requirements/constraints.txt + # bokeh +pyparsing==2.4.7 + # via packaging +python-dateutil==2.8.1 + # via bokeh +pyyaml==5.3.1 + # via bokeh +scipy==1.5.4 + # via -r requirements/prod.in +six==1.15.0 + # via + # bokeh + # python-dateutil +tornado==6.1 + # via bokeh +werkzeug==1.0.1 + # via flask +wtforms==2.3.3 + # via flask-wtf # The following packages are considered to be unsafe in a requirements file: # setuptools