Skip to content

Commit

Permalink
Support Python 3.9
Browse files Browse the repository at this point in the history
- Update pip-tools to 5.5.0
- Update SciPy to 1.5.4
- Run tests for Python 3.9 on Travis CI
- Add Python 3.9 badge to README
- Update README to say support for Python 3.9
- Rearrange badge order
  • Loading branch information
xofbd committed Mar 24, 2021
1 parent 298eb67 commit bacaf26
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 44 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
python:
- "3.7"
- "3.8"
- "3.9"
install:
- make dev
script:
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pip-tools==5.3.1
pip-tools==5.5.0
7 changes: 4 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 28 additions & 12 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion requirements/prod.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
74 changes: 55 additions & 19 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bacaf26

Please sign in to comment.