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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ or
```
PYTHONPATH=. uwsgi --http :8443 --virtualenv ./runtime --master --wsgi-file bin/api.wsgi
```


### Maintenance

#### Upgrading Python Packages

List outdated packages
```
pip list --local --outdated
```

Then review and decide what upgrades to make, if any.<br>
Changes to `requirements.txt` should always be a pull request.
2 changes: 1 addition & 1 deletion api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, request=None, response=None):
log.debug('looked up remote token in %dms' % ((datetime.datetime.utcnow() - request_start).total_seconds() * 1000.))

# Set user's auth provider avatar
# TODO: after api starts reading toml config, switch on auth.provider rather than manually comparing endpoint URL.
# TODO: switch on auth.provider rather than manually comparing endpoint URL.
if config.get_item('auth', 'id_endpoint') == 'https://www.googleapis.com/plus/v1/people/me/openIdConnect':
provider_avatar = identity.get('picture', '')
# Remove attached size param from URL.
Expand Down
9 changes: 6 additions & 3 deletions bin/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash

(
set -e

unset CDPATH
cd "$( dirname "${BASH_SOURCE[0]}" )/.."

pip install -r requirements.txt
)
pip install -r requirements_dev.txt
2 changes: 1 addition & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ echo "Activating Virtualenv"
source $SCITRAN_RUNTIME_PATH/bin/activate

echo "Installing Python requirements"
pip install -U -r requirements.txt
bin/install.sh


# Launch mongod
Expand Down
32 changes: 11 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
jsonschema
markdown
paste
pylint
pymongo
pyopenssl
python-dateutil
pytz
requests
tzlocal
webapp2
webob
rfc3987
nose
toml
PasteScript
pytest
pytest-cov
pytest-watch
coverage
coveralls
# Production packages
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed a number of packages that appeared to no longer be used. Would appreciate @gsfr or @rentzso double-checking my work.

Copy link
Member

Choose a reason for hiding this comment

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

tzlocal can go. rfc3987 is needed for some advanced jsonschema functionality.

jsonschema==2.5.1
Markdown==2.6.5
pymongo==3.2
pyOpenSSL==0.15.1
python-dateutil==2.4.2
pytz==2015.7
requests==2.9.1
rfc3987==1.3.4
webapp2==2.5.2
WebOb==1.5.1
9 changes: 9 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Development packages
coverage==4.0.3
coveralls==1.1
nose==1.3.7
PasteScript==2.0.2
pylint==1.5.3
pytest==2.8.5
pytest-cov==2.2.0
pytest-watch==3.8.0