-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIP-47: Simplify narrative installation #3559
Conversation
NAR_NAME="kbase/narrative" | ||
NAR_VER_NAME="kbase/narrative_version" # Image for serving up the narrative version | ||
|
||
# Get the current branch, so that we can tag images to branch | ||
BRANCH=${TRAVIS_BRANCH:-`git symbolic-ref --short HEAD`} | ||
BRANCH=${GIT_BRANCH:-`git symbolic-ref --short HEAD`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TRAVIS_BRANCH
was annoying me
npm install 2>&1 | tee -a ${logfile} | ||
npm run install-npm | ||
|
||
# Install Narrative requirements | ||
# ------------------------------ | ||
log "Installing biokbase requirements from src/requirements.txt" | ||
cd "$NARRATIVE_ROOT_DIR/src" | ||
cat requirements.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 pip --no-cache-dir install 2>&1 | tee -a "${logfile}" | ||
cat $NARRATIVE_ROOT_DIR/src/requirements.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 pip --no-cache-dir install 2>&1 | tee -a "${logfile}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this command is what the install_docker_narrative.sh
script uses
# Install Narrative code | ||
# ---------------------- | ||
log "Installing biokbase modules" | ||
cd "$NARRATIVE_ROOT_DIR/src" | ||
log "Running local 'setup.py'" | ||
python setup.py install 2>&1 | tee -a "${logfile}" | ||
log "Done installing biokbase." | ||
cd "$NARRATIVE_ROOT_DIR" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Begone foul setup.py!
@@ -110,7 +101,6 @@ then | |||
cd nbextensions | |||
sh install.sh | |||
cd ../.. | |||
jupyter nbextension enable --py --sys-prefix widgetsnbextension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is in the install.sh script
# Install Narrative code | ||
# ---------------------- | ||
console "Installing biokbase modules" | ||
cd $NARRATIVE_ROOT_DIR/src | ||
console "Running local 'setup.py'" | ||
${PYTHON} setup.py install | ||
console "Done installing biokbase." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Begone again foul setup.py!
|
||
cp $NARRATIVE_DIR/src/config.json $JUPYTER_CONFIG_DIR/static/kbase/config/ | ||
|
||
python /kb/dev_container/narrative/src/biokbase/narrative/exporter/run_narrative.py "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this script does not exist. I meant to delete this file in the last PR but must have forgotten
@@ -6,6 +6,7 @@ export JUPYTER_RUNTIME_DIR=/tmp/jupyter_runtime | |||
export JUPYTER_DATA_DIR=/tmp/jupyter_data | |||
export JUPYTER_PATH=$NARRATIVE_DIR/kbase-extension | |||
export IPYTHONDIR=$NARRATIVE_DIR/kbase-extension/ipython | |||
export PYTHONPATH=$NARRATIVE_DIR/src/:$PYTHONPATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool new PYTHONPATH
@@ -1,6 +1,6 @@ | |||
#!/bin/bash | |||
export NARRATIVE_DIR=$(pwd) | |||
|
|||
export PYTHONPATH=$NARRATIVE_DIR/src:$PYTHONPATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amend the PYTHONPATH
8ec1f74
to
11e5618
Compare
11e5618
to
b2501ff
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3559 +/- ##
===========================================
- Coverage 25.72% 25.71% -0.02%
===========================================
Files 461 461
Lines 46694 46694
===========================================
- Hits 12014 12007 -7
- Misses 34680 34687 +7 see 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
b2501ff
to
c6fe5d9
Compare
Quality Gate passedIssues Measures |
Description of PR purpose/changes
Removing antiquated
setup.py
and adding thesrc/
directory to thePYTHONPATH
env var to simplify narrative installation and use.Jira Ticket / Issue
Related Jira ticket: https://kbase-jira.atlassian.net/browse/UIP-47
DATAUP-69 Adds a PR template
)Testing Instructions
Dev Checklist:
format
andcheck
on changed Python code manually or with a git precommit hookUpdating Version and Release Notes (if applicable)
N/A