Skip to content

Commit

Permalink
Remove numpy as a dependency. (oppia#4808)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlip authored and anmolshkl committed Mar 15, 2018
1 parent bd43256 commit 7a4d28e
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[settings]
force_single_line=true
force_sort_within_sections=true
known_third_party=browsermobproxy,cloudstorage,google.appengine,jinja2,mapreduce,mutagen,numpy,pipeline,pylint,requests,selenium,skulpt,webapp2,webapp2_extras,webtest,yaml
known_third_party=browsermobproxy,cloudstorage,google.appengine,jinja2,mapreduce,mutagen,pipeline,pylint,requests,selenium,skulpt,webapp2,webapp2_extras,webtest,yaml
line_length=80
sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ before_install:
- source /opt/jdk_switcher/jdk_switcher.sh
- jdk_switcher use oraclejdk8
- pip install codecov
- pip install numpy==1.6.1
- pip install pyyaml
- export CHROME_BIN=/usr/bin/google-chrome-stable
- export DISPLAY=:99.0
Expand Down
2 changes: 0 additions & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ handlers:
libraries:
- name: jinja2
version: '2.6'
- name: numpy
version: '1.6.1'
# This is needed for sending requests to a mailgun HTTPS URL.
- name: ssl
version: '2.7.11'
Expand Down
9 changes: 0 additions & 9 deletions appengine_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,6 @@ def save(self):
os.path.join(ROOT_PATH, 'third_party', 'mutagen-1.38'),
]

# In the GAE production environment, numpy is automatically provided, and
# trying to access a path outside the oppia/ directory will lead to an error.
# So, we only add numpy to the system path in development mode.
# Or, if we pass the flag to emulate production mode while in development mode.
if feconf.DEV_MODE:
THIRD_PARTY_LIBS.append(
os.path.abspath(os.path.join(
ROOT_PATH, '..', 'oppia_tools', 'numpy-1.6.1')))

for lib_path in THIRD_PARTY_LIBS:
if not os.path.isdir(lib_path):
raise Exception('Invalid path for third_party library: %s' % lib_path)
Expand Down
1 change: 0 additions & 1 deletion core/tests/gae_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
DIRS_TO_ADD_TO_SYS_PATH = [
os.path.join(
OPPIA_TOOLS_DIR, 'google_appengine_1.9.67', 'google_appengine'),
os.path.join(OPPIA_TOOLS_DIR, 'numpy-1.6.1'),
os.path.join(OPPIA_TOOLS_DIR, 'webtest-1.4.2'),
os.path.join(
OPPIA_TOOLS_DIR, 'google_appengine_1.9.67', 'google_appengine',
Expand Down
8 changes: 0 additions & 8 deletions scripts/install_third_party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ if ! type pip > /dev/null 2>&1 ; then
exit 1
fi

# Note that numpy needs to be built after downloading.
echo Checking if numpy is installed in $TOOLS_DIR/pip_packages
if [ ! -d "$TOOLS_DIR/numpy-1.6.1" ]; then
echo Installing numpy

pip install numpy==1.6.1 --target="$TOOLS_DIR/numpy-1.6.1"
fi

echo Checking if pylint is installed in $TOOLS_DIR/pip_packages
if [ ! -d "$TOOLS_DIR/pylint-1.7.1" ]; then
echo Installing Pylint
Expand Down
1 change: 0 additions & 1 deletion scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@
_PARENT_DIR, 'oppia_tools', 'google_appengine_1.9.67',
'google_appengine'),
os.path.join(_PARENT_DIR, 'oppia_tools', 'webtest-1.4.2'),
os.path.join(_PARENT_DIR, 'oppia_tools', 'numpy-1.6.1'),
os.path.join(_PARENT_DIR, 'oppia_tools', 'browsermob-proxy-0.7.1'),
os.path.join(_PARENT_DIR, 'oppia_tools', 'pycodestyle-2.3.1'),
os.path.join(_PARENT_DIR, 'oppia_tools', 'selenium-2.53.2'),
Expand Down

0 comments on commit 7a4d28e

Please sign in to comment.