Skip to content

Commit

Permalink
Merge pull request #2289 from kbase/develop
Browse files Browse the repository at this point in the history
Stage the 4.4.0 release
  • Loading branch information
briehl authored May 18, 2021
2 parents ff113f2 + 9b438eb commit 3b09924
Show file tree
Hide file tree
Showing 725 changed files with 177,605 additions and 106,995 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
.github
docs
js-coverage
kbase-extension/static/ext_components
kbase-extension/static/ext_packages
kbase-extension/static/kbase/js/patched-components
node_modules
37 changes: 23 additions & 14 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,40 @@ env:
browser: true
es6: true
node: true
extends: 'eslint:recommended'
extends:
- 'eslint:recommended'
- prettier
parserOptions:
ecmaVersion: 2018
root: true
rules:
strict:
- error
- function
indent:
- error
- 4
- SwitchCase: 1
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
no-console:
- error
- allow:
- warn
- error
require-await:
- error
no-confusing-arrow:
- error
no-const-assign:
- error
no-duplicate-imports:
- error
no-useless-computed-key:
- error
no-useless-rename:
- error
no-var:
- error
prefer-arrow-callback:
- warn
prefer-const:
- error
prefer-rest-params:
- warn
prefer-spread:
- warn
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ updates:
- package-ecosystem: pip
directory: "/src"
schedule:
interval: weekly
interval: monthly
time: '11:00'
open-pull-requests-limit: 20
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
interval: monthly
time: '11:00'
open-pull-requests-limit: 20
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
interval: monthly
time: '11:00'
open-pull-requests-limit: 20
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
auto-update-conda: true
condarc-file: test/condarc.yml

- name: Use Node JS 10.x
- name: Use Node JS 14.x
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 14.x

- name: Install JS dependencies
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
shell: bash -l {0}
run: |
bash ./scripts/install_narrative.sh
grunt minify
npm run minify
sed <src/config.json.templ >src/config.json "s/{{ .Env.CONFIG_ENV }}/dev/"
sed -i 's/{{ if ne .Env.CONFIG_ENV "prod" }} true {{- else }} false {{- end }}/true/' src/config.json
jupyter notebook --version
Expand All @@ -45,6 +45,13 @@ jobs:
shell: bash -l {0}
run: make test-frontend-unit

- name: make test output available as artefact in case of failure
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: karma-result.json
path: karma-result.json

- name: Run Narrative Frontend Integration Tests
shell: bash -l {0}
env:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ node_modules/
install.log
/src/build/
/venvs/
/venv/
.projectKnowledge
nbproject
static/dist
Expand Down Expand Up @@ -73,10 +74,14 @@ nosetests.xml
coverage.xml
*,cover
.hypothesis/
karma-result.json

# Integration test logs
/selenium-standalone-logs/

# Test tokens
/test/*.tok

# Translations
*.mo
*.pot
Expand All @@ -93,3 +98,4 @@ target/
# IDE / Editor
.vscode
/tags
.idea
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run husky_msg && npm run prettier_check
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.github
docs
js-coverage
kbase-extension/static/ext_components
kbase-extension/static/ext_packages
kbase-extension/static/kbase/js/patched-components
venv
cover
5 changes: 5 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
printWidth: 100
trailingComma: "es5"
tabWidth: 4
# use single quotes instead of double quotes
singleQuote: true
58 changes: 20 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Made available under the KBase Open Source License
#

FROM kbase/narrbase:6.1
FROM kbase/narrbase:6.2

# These ARGs values are passed in via the docker build command
ARG BUILD_DATE
Expand All @@ -22,15 +22,10 @@ ARG SKIP_MINIFY

EXPOSE 8888

# Remove Debian's older Tornado package - updated/removed in the narrbase package
#RUN DEBIAN_FRONTEND=noninteractive apt-get remove -y python-tornado

RUN echo Skip=$SKIP_MINIFY

# install pyopenssl cryptography idna and requests is the same as installing
# requests[security]
RUN source activate base
RUN conda install -c conda-forge ndg-httpsclient==0.5.1 pyasn1==0.4.5 pyopenssl==19.0.0 cryptography==2.7 idna==2.8 requests==2.21.0 \
RUN source activate base && \
conda install -c conda-forge ndg-httpsclient==0.5.1 pyasn1==0.4.5 pyopenssl==19.0.0 cryptography==2.7 idna==2.8 requests==2.21.0 \
beautifulsoup4==4.8.1 html5lib==1.0.1

# Copy in the narrative repo
Expand All @@ -39,32 +34,23 @@ ADD ./kbase-logdb.conf /tmp/kbase-logdb.conf
ADD ./deployment/ /kb/deployment/
WORKDIR /kb/dev_container/narrative

# Generate a version file that we can scrape later
RUN mkdir -p /kb/deployment/ui-common/ && ./src/scripts/kb-update-config -f src/config.json.templ -o /kb/deployment/ui-common/narrative_version

# Install Javascript dependencies
RUN npm install -g grunt-cli && \
RUN \
# Generate a version file that we can scrape later
mkdir -p /kb/deployment/ui-common/ && \
./src/scripts/kb-update-config -f src/config.json.templ -o /kb/deployment/ui-common/narrative_version && \
# install JS deps
npm install -g grunt-cli && \
npm install && \
./node_modules/.bin/bower install --allow-root --config.interactive=false

# Compile Javascript down into an itty-bitty ball unless SKIP_MINIFY is non-empty
RUN [ -n "$SKIP_MINIFY" ] || grunt minify

# Add Tini. Tini operates as a process subreaper for jupyter. This prevents
# kernel crashes. See Jupyter Notebook known issues here:˜
# http://jupyter-notebook.readthedocs.org/en/latest/public_server.html#known-issues
# ENV TINI_VERSION v0.8.4
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
# RUN chmod +x /usr/bin/tini

RUN /bin/bash scripts/install_narrative_docker.sh

# RUN ./fixupURL.sh && chmod 666 /kb/dev_container/narrative/src/config.json
RUN pip install jupyter-console==6.0.0

WORKDIR /tmp
RUN mkdir /tmp/narrative && \
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative/kbase-extension; find / -xdev \( -perm -4000 \) -type f -print -exec rm {} \;
./node_modules/.bin/bower install --allow-root --config.interactive=false && \
# Compile Javascript down into an itty-bitty ball unless SKIP_MINIFY is non-empty
echo Skip=$SKIP_MINIFY && \
[ -n "$SKIP_MINIFY" ] || npm run minify && \
# install the narrative and jupyter console
/bin/bash scripts/install_narrative_docker.sh && \
pip install jupyter-console==6.0.0 && \
cd /tmp && \
mkdir /tmp/narrative && \
chown -R nobody:www-data /tmp/narrative /kb/dev_container/narrative ; find / -xdev \( -perm -4000 \) -type f -print -exec rm {} \;

# Set a default value for the environment variable VERSION_CHECK that gets expanded in the config.json.templ
# into the location to check for a new narrative version. Normally we would put this in the template itself
Expand All @@ -75,7 +61,7 @@ ENV VERSION_CHECK /narrative_version
# Set the default environment to be CI, can be overriden by passing new CONFIG_ENV setting at container start
ENV CONFIG_ENV ci

USER root
USER nobody

LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/narrative.git" \
Expand All @@ -92,10 +78,6 @@ CMD [ "--template", \
"/kb/dev_container/narrative/src/config.json.templ:/kb/dev_container/narrative/src/config.json", \
"--template", \
"/kb/dev_container/narrative/src/config.json.templ:/kb/dev_container/narrative/kbase-extension/static/kbase/config/config.json", \
"-euid", \
"65534", \
"-egid", \
"65534", \
"kbase-narrative"]
#ONBUILD USER root
#ONBUILD ADD url.cfg /kb/dev_container/narrative/url.cfg
Expand Down
Loading

0 comments on commit 3b09924

Please sign in to comment.