Skip to content

Commit

Permalink
Merge pull request #424 from kbase/develop
Browse files Browse the repository at this point in the history
D->M
  • Loading branch information
bio-boris authored Nov 4, 2021
2 parents 849dc38 + 1e268df commit 5f6dea6
Show file tree
Hide file tree
Showing 105 changed files with 17,882 additions and 4,155 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ exclude =
execution_engine2Impl.py,
lib/installed_clients/,
lib/execution_engine2/execution_engine2Impl.py,
lib/execution_engine2/authclient.py,
lib/biokbase/log.py,
*Impl.py
52 changes: 52 additions & 0 deletions .github/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Code scanning - action"

on:
push:
pull_request:
schedule:
- cron: '0 19 * * 0'

jobs:
CodeQL-Build:

# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@

# Testing Instructions
* Details for how to test the PR:
- [ ] Tests pass in travis and locally
- [ ] Tests pass in Github Actions and locally
- [ ] Changes available by spinning up a local test suite and doing X

# Dev Checklist:

- [ ] My code follows the guidelines at https://sites.google.com/truss.works/kbasetruss/development
- [ ] My code follows the guidelines at https://sites.google.com/truss.works/kbasetruss/data-upload-project/development
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I have run Black and Flake8 on changed Python Code manually or with git precommit (and the travis build passes)
- [ ] I have run Black and Flake8 on changed Python Code manually or with git precommit (and the Github Actions build passes)

# Updating Version and Release Notes (if applicable)

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/build_feature_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Feature Branches

on: [pull_request]

jobs:
main:
runs-on: ubuntu-20.04
steps:
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
-
name: Build and push this feature branch
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.head_ref }}

-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
31 changes: 31 additions & 0 deletions .github/workflows/build_on_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Main/Develop Branches on push

on:
push:
branches:
- main
- master
- develop

jobs:
main:
runs-on: ubuntu-20.04
steps:
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
-
name: Build and push the main branch
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}:${ GITHUB_REF##*/ }

-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
12 changes: 8 additions & 4 deletions .github/workflows/ee2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
- name: Lint with flake8 and black
run: |
python -m pip install --upgrade pip
pip install flake8 black pytest
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
- name: Lint with flake8 and black
run: |
flake8 ./lib ./test
black --check ./lib ./test
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
cd /opt
git clone https://github.com/kbase/jars
cd -
- name: Build Docker Image
run: |
docker build . -t execution_engine2:test
Expand All @@ -39,4 +42,5 @@ jobs:
docker-compose up -d
cp test/env/test.travis.env test.env
make test-coverage
codecov
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ sdk.cfg
.pytest_cache
lib/execution_engine2/execution_engine2Impl.py.bak*

coverage.xml
test_temp_can_delete
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 21.5b0
hooks:
- id: black
exclude: '.+Impl.py'
Expand Down
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kbase/sdkbase2:python
FROM quay.io/kbase/sdkbase2:python
MAINTAINER KBase Developer

RUN apt-get clean all && apt-get update --fix-missing -y
Expand All @@ -18,6 +18,12 @@ RUN DEBIAN_FRONTEND=noninteractive wget -qO - https://research.cs.wisc.edu/htcon
&& apt-get update -y \
&& apt-get install -y condor

# install jars
# perhaps we should have test and prod dockerfiles to avoid jars and mongo installs in prod
RUN cd /opt \
&& git clone https://github.com/kbase/jars \
&& cd -

# install mongodb
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
Expand All @@ -37,12 +43,14 @@ RUN echo "mongodb-org hold" | dpkg --set-selections \
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
&& bash ~/miniconda.sh -b -p /miniconda-latest

# Setup Cron
COPY ./bin/ee2_cronjobs /etc/cron.d/ee2_cronjobs

# Need to change startup scripts to match this in MAKEFILE
ENV PATH=/miniconda-latest/bin:$PATH
RUN pip install --upgrade pip && python -V


COPY ./requirements.txt /kb/module/requirements.txt

RUN pip install -r /kb/module/requirements.txt
RUN adduser --disabled-password --gecos '' -shell /bin/bash kbase
# -----------------------------------------
Expand All @@ -57,7 +65,10 @@ WORKDIR /kb/module/scripts
RUN chmod +x download_runner.sh && ./download_runner.sh

WORKDIR /kb/module/

# Set deploy.cfg location
ENV KB_DEPLOYMENT_CONFIG=/kb/module/deploy.cfg
ENV PATH=/kb/module:$PATH

ENTRYPOINT [ "./scripts/entrypoint.sh" ]
CMD [ ]
65 changes: 65 additions & 0 deletions KIDLspec.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
html, body {
height: 100%;
}
html {
display: table;
margin: auto;
}
body {
background-color: white;
color: #000;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-weight: normal;
font-size: 12px;
margin: 0;
padding: 20px;
display: table-cell;
vertical-align: middle;
}
span.space {
display: inline-block;
width: 7px;
}
span.tab {
display: inline-block;
width: 30px;
}
span.keyword {
font-weight: bold;
color: #008;
}
span.name {
color: #000; !important
}
span.deprecated {
text-decoration: line-through;
}
span.annotation {
color: #303030;
}
span.primitive {
font-weight: bold;
color: #066;
}
div.body {
background-color: #ffffff;
color: #3e4349;
padding: 0 30px;
}
div.comment {
color: #A0A0A0;
}
a {
color: #004b6b;
text-decoration: none;
}
a:hover {
color: #6d4100;
text-decoration: underline;
}
:target {
background-color: #ffa;
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ compile:
--pysrvname $(SERVICE_CAPS).$(SERVICE_CAPS)Server \
--pyimplname $(SERVICE_CAPS).$(SERVICE_CAPS)Impl;

kb-sdk compile $(SPEC_FILE) \
--out . \
--html \

build:
chmod +x $(SCRIPTS_DIR)/entrypoint.sh

Expand Down
Loading

0 comments on commit 5f6dea6

Please sign in to comment.