Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
sudo: false
dist: "trusty" # otherwise 'python3-pip' won't be available
dist: trusty
language: python
addons:
apt:
packages:
- "python3"
- "python3-pip"
python:
- "3.6"
- python3
- python3-pip
python:
- '3.6'
before_install:
- "pip3 install -r requirements.txt"
- pip3 install -r requirements.txt
- npm install
notifications:
slack: surprisetech:j8bAuVBQphzqvvpkfZ2FDSXs
slack: surprisetech:j8bAuVBQphzqvvpkfZ2FDSXs
before_script:

# Gives a simulated display for matplotlib
# src: https://stackoverflow.com/questions/35403127/testing-matplotlib-based-plots-in-travis-ci
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

- touch config.py
- FLASK_APP=app.py flask run &
script:
- pytest
- pytest
env:
global:
- secure: cPumVgehHxyCXyhlSk5mWC/vcZMz9EPP71Lzey7iEv09528WSb1jhMvIeGJolkQsgYpjEbyy1wTkZ3KW7K7FXS17VSzRt2uHGWHMT1KW/ST99ZcFGUnLwGqzUIrXzwVkaBbAnyNp73MGa+gBTsHkcTmG1e2Sxvjf9lo4sOifj5yyRON5T/35+4Dgt8Lyx0YVMNxMt+onXCbMqOjDXOCzfrYE6T3jphYPMq+k48whZGQbSkLRtQDlvVmiMsZGKwDKovBQz3kYNJB2rCETVkUf/U0D8F7aXfJHcE+n3NZ8ZVmh6km+FVxsu+B64s5D2+3XKxklLYruuLS4cyUH3+q2iTMhOsplFZwPEwxtF6t1kDfBgwlGSyeERNxs/dz457aYYx4n7lYt1am5+5qjOor/lI2pIAVuwT/TMfA18fMgs40bHguibtiQKkY563t6KYTQ5a6slDSeUqCMSFUZyVL8t1D83a2TLmWFzhYu2bgQx95ZwMVxaTrpoIvSg9EN3aSy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Bf3MsX4GDmaQRW+Ol7TRbPLAW5dZkkLemlvoV2n657GWU/BYSDRtibt846clj2si0EnAEZvo6Zjhp5W7G38U2Ry5UDV1943EMtZQw006towZSEVic8BNzRT1gMJBuoCH+mWDq5Z716A3TpqVkyMSQceu4BZ70iyB8eJgdprc1Q14cfopj5dbF5Cfl0HfOgM54nRkJhmulBTkux2ciUK7KVrggytQlaHeOIpFx91Qkik1wllvCJqYgNOZVuMp2g+KZFvLxW0N7cqyr/PjBrTiedkSYctErWsGEOSjEzqGJm+kIYg2Jagoy6oBTfCc0NpdThaI/CTUTQvaX9KLwdaRT2vkwXlSujdTVXa11hs05ETpV7Pr4N7/x5UoUHZy8NC6hfVFWHrihAko6QV92ziHi6CJpd1VHf3Bb9Fn2sVBiL11eCZJcOJ+nImKVvjgYrPdxq3OSOzVHTRGAQFcBMtuyv6caRL9o=
15 changes: 5 additions & 10 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from flask import Flask, send_file, json, render_template
import praw
from wordOps import countWords, punctRm, excludeWordsList
from config import RedditConfig
import os
import config

# Send "public/any.name" when route "<site>.com/{any.name}" is hit
app = Flask(__name__, static_url_path="", static_folder="static", template_folder='templates')
Expand All @@ -13,15 +14,9 @@
# Initialize PRAW (reddit wrapper) from config.py
# DO NOT push config.py to github, we do not want to
# make the API keys public.
# The format of config.py is:
#
# class RedditConfig:
# id = '<client_id>'
# secret = '<client_secret>'
# userAgent = '<user_agent>'
reddit = praw.Reddit(client_id=RedditConfig.id,
client_secret=RedditConfig.secret,
user_agent=RedditConfig.userAgent)
reddit = praw.Reddit(client_id=os.environ["praw_id"],
client_secret=os.environ["praw_secret"],
user_agent=os.environ["praw_agent"])

# Remap '/' to index. Other files can be served statically.
@app.route('/')
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/subreddit_time_modifiers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function timeSearch(time) {
cy.visit('surprisetech.pythonanywhere.com')
cy.visit('localhost:5000')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to use localhost instead of pythonanywhere?


cy.get('#r').click()
cy.get('#q').type('tifu')
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/user_time_modifiers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function timeSearch(time) {
cy.visit('surprisetech.pythonanywhere.com')
cy.visit('localhost:5000')

cy.get('#u').click()
cy.get('#q').type('spez')
Expand Down
Loading