Skip to content
Merged
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
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: python
python:
- "2.7"

before_install:
- sudo rm -f /etc/boto.cfg
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install python-dev libxml2-dev libxmlsec1-dev

install:
- pip install tox

env:
- TOXENV=pep8
- TOXENV=py27-django111
ARGS="-- paver run_pep8"

script:
- tox $ARGS
6 changes: 3 additions & 3 deletions pavelib/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def update_local_bokchoy_db_from_s3(options):
fingerprints_match = does_fingerprint_on_disk_match(fingerprint)

if fingerprints_match:
print ("DB cache files match the current migrations.")
print("DB cache files match the current migrations.")
reset_test_db(BOKCHOY_DB_FILES, update_cache_files=False)

elif is_fingerprint_in_bucket(fingerprint, CACHE_BUCKET_NAME):
print ("Found updated bokchoy db files at S3.")
print("Found updated bokchoy db files at S3.")
refresh_bokchoy_db_cache_from_s3(fingerprint, CACHE_BUCKET_NAME, BOKCHOY_DB_FILES)
reset_test_db(BOKCHOY_DB_FILES, update_cache_files=False)

Expand All @@ -106,7 +106,7 @@ def update_local_bokchoy_db_from_s3(options):
"Loading the bokchoy db files from disk",
"and running migrations."
)
print (msg)
print(msg)
reset_test_db(BOKCHOY_DB_FILES, update_cache_files=True)
# Check one last time to see if the fingerprint is present in
# the s3 bucket. This could occur because the bokchoy job is
Expand Down
1 change: 1 addition & 0 deletions pavelib/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def i18n_release_pull():
resources = find_release_resources()
sh("i18n_tool transifex pull " + " ".join(resources))


@task
@needs(
"pavelib.i18n.i18n_clean",
Expand Down
4 changes: 2 additions & 2 deletions pavelib/utils/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_file_from_s3(bucket_name, zipfile_name, path):
"""
Get the file from s3 and save it to disk.
"""
print ("Retrieving {} from bucket {}.".format(zipfile_name, bucket_name))
print("Retrieving {} from bucket {}.".format(zipfile_name, bucket_name))
conn = boto.connect_s3(anon=True)
bucket = conn.get_bucket(bucket_name)
key = boto.s3.key.Key(bucket=bucket, name=zipfile_name)
Expand Down Expand Up @@ -191,7 +191,7 @@ def refresh_bokchoy_db_cache_from_s3(fingerprint, bucket_name, bokchoy_db_files)
zipfile_name = '{}.tar.gz'.format(fingerprint)
get_file_from_s3(bucket_name, zipfile_name, path)
zipfile_path = os.path.join(path, zipfile_name)
print ("Extracting db cache files.")
print("Extracting db cache files.")
extract_files_from_zip(bokchoy_db_files, zipfile_path, path)
os.remove(zipfile_path)

Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/appsembler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requests==2.9.1
django-anymail==5.0
django-tiers==0.0.19
dj-database-url==0.4.2
psycopg2==2.6.2
psycopg2==2.8.3
django-compat==1.0.14
django-hijack==2.1.4
django-hijack-admin==2.1.4
2 changes: 1 addition & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git+https://github.com/mitodl/edx-sga.git@6b2f7aa2a18206023c8407e2c46f86d4b4c3ac
git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.1.17#egg=ora2==2.1.18
git+https://github.com/edx/edx-ora2.git@2.1.18#egg=ora2==2.1.18
-e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest
-e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip
-e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git+https://github.com/edx/lettuce.git@7a04591c78ac56dac3eb3e91ca94b15cce844133#
git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.1.17#egg=ora2==2.1.18
git+https://github.com/edx/edx-ora2.git@2.1.18#egg=ora2==2.1.18
-e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest
-e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip
-e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/github.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
# Our libraries:
-e git+https://github.com/edx/codejail.git@a320d43ce6b9c93b17636b2491f724d9e433be47#egg=codejail
-e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock
-e git+https://github.com/edx/edx-ora2.git@2.1.17#egg=ora2==2.1.18
-e git+https://github.com/edx/edx-ora2.git@2.1.18#egg=ora2==2.1.18
-e git+https://github.com/edx/RecommenderXBlock.git@1.3.3#egg=recommender-xblock==1.3.3
-e git+https://github.com/solashirai/crowdsourcehinter.git@518605f0a95190949fe77bd39158450639e2e1dc#egg=crowdsourcehinter-xblock==0.1
-e git+https://github.com/edx/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ git+https://github.com/edx/lettuce.git@7a04591c78ac56dac3eb3e91ca94b15cce844133#
git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.1.17#egg=ora2==2.1.18
git+https://github.com/edx/edx-ora2.git@2.1.18#egg=ora2==2.1.18
-e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest
-e git+https://github.com/appliedsec/pygeoip.git@95e69341cebf5a6a9fbf7c4f5439d458898bdc3b#egg=pygeoip
-e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
Expand Down
2 changes: 1 addition & 1 deletion scripts/xblock/xblock_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def _get_course_block_counts(auth_token, block_url):

response = requests.get(block_url, headers=headers)
if response.status_code != 200:
print ("url {} returned status code {}".format(block_url, response.status_code))
print("url {} returned status code {}".format(block_url, response.status_code))
return {}
response_json = response.json()

Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ commands =
bash scripts/upgrade_pysqlite.sh
# Now perform testing.
{posargs}

[testenv:pep8]
deps =
pycodestyle==2.3.1
commands =
pycodestyle .