A mini-Python/Flask project with continuous integration testing and deployment. Try it out here - upload an image to view in browser.
- See requirements.txt
Complete the following tasks from the command line:
In shell, from project root:
-
python setup.py install
-
start
-
Open browser to http://localhost:5000
-
After changes to source code, restart server:
- ctrl-c
start
- refresh browser window
In shell, from project root:
pytest
(assumes knowledge of git commands)
- Fork repo from github.com/nzey/image_viewer
git clone [your_fork_url]
git remote add upstream https://github.com/nzey/image_viewer
- Make your changes locally
- Pull from upstream (in case changes have been made since you cloned) and merge with your local changes
- Test locally (
pytest
) - Git add, commit, and push to your own fork (
git push origin master
) - Submit pull request (will trigger Travis CI build and deploy to Heroku if build succeeds)
(already done for this repo)
- Go to travis-ci.org (travis-ci.com for private repos)
- Click on 'Sign in with GitHub' in the top right
- When account is done syncing, go to https://travis-ci.org/profile/YOUR_GITHUB_HANDLE (if not taken there automatically)
- To activate Travis for a repository, click on the X next to the repo you want to connect
- Add .travis.yml file to your repository
- see this project's yml for a simple example
- see Travis python specific documentation for more complex examples and additional information
- Git add, commit, and push with new yml file to your Github repo. Check back on your Travis profile page to see build status.