Skip to content

Commit

Permalink
Merge pull request #71 from kbaseapps/jsf-DEVOPS-231
Browse files Browse the repository at this point in the history
DEVOPS-260 - Merge recommended `git improvements`
  • Loading branch information
jsfillman authored Jun 9, 2020
2 parents 3ac390a + 8e2fe63 commit e36bf01
Show file tree
Hide file tree
Showing 6 changed files with 587 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10

57 changes: 57 additions & 0 deletions .github/workflows/kb_sdk_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: KBase SDK Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

sdk_tests:
runs-on: ubuntu-latest
steps:

- name: Check out GitHub repo
if: "!contains(github.event.head_commit.message, 'skip ci')"
uses: actions/checkout@v2

- name: Check out Actions CI files
if: "!contains(github.event.head_commit.message, 'skip ci')"
uses: actions/checkout@v2
with:
repository: 'kbaseapps/kb_sdk_actions'
path: 'kb_sdk_actions'


- name: Set up test environment
if: "!contains(github.event.head_commit.message, 'skip ci')"
shell: bash
env:
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }}
run: |
# Verify kb_sdk_actions clone worked
test -f "$HOME/kb_sdk_actions/bin/kb-sdk" && echo "CI files cloned"
# Pull kb-sdk & create startup script
docker pull kbase/kb-sdk
sh $GITHUB_WORKSPACE/kb_sdk_actions/bin/make_testdir && echo "Created test_local"
test -f "test_local/test.cfg" && echo "Confirmed config exists"
- name: Configure authentication
if: "!contains(github.event.head_commit.message, 'skip ci')"
shell: bash
env:
KBASE_TEST_TOKEN: ${{ secrets.KBASE_TEST_TOKEN }}
run: |
# Add token to config
sed -ie "s/^test_token=.*$/&$KBASE_TEST_TOKEN/g" ./test_local/test.cfg
- name: Run tests
if: "!contains(github.event.head_commit.message, 'skip ci')"
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
sh $GITHUB_WORKSPACE/kb_sdk_actions/bin/kb-sdk test
bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ build-test-script:
echo 'export PYTHONPATH=$$script_dir/../$(LIB_DIR):$$PATH:$$PYTHONPATH' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'cd $$script_dir/../$(TEST_DIR)' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'python -u -m unittest discover -p "*_test.py"' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'python -m nose --with-coverage --cover-package=$(SERVICE_CAPS) --cover-html --cover-html-dir=/kb/module/work/test_coverage --cover-xml --cover-xml-file=/kb/module/work/test_coverage/coverage.xml --nocapture --nologcapture .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
chmod +x $(TEST_DIR)/$(TEST_SCRIPT_NAME)

test:
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# DataFileUtil
---

Utility functions for operating on files and data objects in KBase data stores like Shock and the Workspace
Utility functions for operating on files and data objects in KBase data stores like Shock and the Workspace.

## Current Status

| Branch | Build | Coverage | LGTM Alerts |
| ------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| master | [![Build Status](https://travis-ci.org/kbaseapps/DataFileUtil.svg?branch=master)](https://travis-ci.org/kbaseapps/DataFileUtil) | [![Coverage Status](https://coveralls.io/repos/github/kbaseapps/DataFileUtil/badge.svg?branch=master)](https://coveralls.io/github/kbaseapps/DataFileUtil?branch=master) | [![Total alerts](https://img.shields.io/lgtm/alerts/g/kbaseapps/DataFileUtil.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kbaseapps/DataFileUtil/alerts/) |
| develop | [![Build Status](https://travis-ci.org/kbaseapps/DataFileUtil.svg?branch=develop)](https://travis-ci.org/kbaseapps/DataFileUtil) | [![Coverage Status](https://coveralls.io/repos/github/kbaseapps/DataFileUtil/badge.svg?branch=develop)](https://coveralls.io/github/kbaseapps/DataFileUtil?branch=develop) | |
---
| master | [![KBase SDK Tests](https://github.com/kbaseapps/DataFileUtil/workflows/KBase%20SDK%20Tests/badge.svg)](https://github.com/kbaseapps/DataFileUtil/actions?query=workflow%3A%22KBase+SDK+Tests%22) | [![codecov](https://codecov.io/gh/kbaseapps/DataFileUtil/branch/master/graph/badge.svg)](https://codecov.io/gh/kbaseapps/DataFileUtil) | [![Total alerts](https://img.shields.io/lgtm/alerts/g/kbaseapps/DataFileUtil.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kbaseapps/DataFileUtil/alerts/) |


## Details
DataFileUtil is the lowest level wrapper around the KBase data stores, including the workspace, shock, and handle services. It thus handles operations on files, including file transfer and compression, as well as operations on KBase data objects.

Assuming DataFileUtil is being called in the context of a set of local SDK modules calling each other, all file operations occur in the KBase job execution environment.
Expand Down
Loading

0 comments on commit e36bf01

Please sign in to comment.