Skip to content

Commit

Permalink
Added optional welcome cell to create_new_narrative
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Nov 8, 2016
1 parent c764384 commit 0cdfd5a
Show file tree
Hide file tree
Showing 16 changed files with 302 additions and 147 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test_local
sdk.cfg
data
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ MAINTAINER KBase Developer
# Insert apt-get instructions here to install
# any required dependencies for your module.

# RUN apt-get update

RUN apt-get update
RUN apt-get install -y python-coverage
# -----------------------------------------

COPY ./ /kb/module
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ build-test-script:
echo 'export KB_AUTH_TOKEN=`cat /kb/module/work/token`' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
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 -u -m unittest discover -p "*_test.py"' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
echo 'python -m nose --with-coverage --cover-package=NarrativeService --cover-html --cover-html-dir=/kb/module/work/cover_html .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME)
chmod +x $(TEST_DIR)/$(TEST_SCRIPT_NAME)

test:
Expand All @@ -69,3 +70,7 @@ install-clients:
kb-sdk install -c https://raw.githubusercontent.com/kbase/workspace_deluxe/master/workspace.spec
kb-sdk install -c https://raw.githubusercontent.com/kbase/narrative_method_store/develop/NarrativeMethodStore.spec
kb-sdk install -d https://raw.githubusercontent.com/kbaseapps/DataPaletteService/master/DataPaletteService.spec

ref-data:
cp -a ./data/* /data/
touch /data/__READY__
20 changes: 12 additions & 8 deletions NarrativeService.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ A KBase module: NarrativeService

module NarrativeService {

/* @range [0,1] */
typedef int boolean;

/*
/*
A time in the format YYYY-MM-DDThh:mm:ssZ, where Z is either the
character Z (representing the UTC timezone) or the difference
in time to UTC in the format +/-HHMM, eg:
Expand All @@ -16,7 +18,7 @@ module NarrativeService {
typedef string timestamp;

/* Represents the permissions a user or users have to a workspace:

'a' - administrator. All operations allowed.
'w' - read/write.
'r' - read.
Expand All @@ -30,7 +32,7 @@ module NarrativeService {
typedef string lock_status;

/* Information about an object, including user provided metadata.

obj_id objid - the numerical id of the object.
obj_name name - the name of the object.
type_string type - the type of the object.
Expand Down Expand Up @@ -92,7 +94,7 @@ module NarrativeService {
returns (ListObjectsWithSetsOutput) authentication required;

/*
workspaceId - optional workspace ID, if not specified then
workspaceId - optional workspace ID, if not specified then
property from workspaceRef object info is used.
*/
typedef structure {
Expand Down Expand Up @@ -187,6 +189,7 @@ module NarrativeService {
markdown - markdown text for cell of 'markdown' type (optional)
copydata - packed inport data in format "import(;...)*" (alternative to importData)
importData - import data in unpacked form (alternative to copydata)
includeIntroCell - if 1, adds an introductory markdown cell at the top (optional, default 0)
*/
typedef structure {
string app;
Expand All @@ -196,13 +199,14 @@ module NarrativeService {
string markdown;
string copydata;
list<string> importData;
boolean includeIntroCell;
} CreateNewNarrativeParams;

typedef structure {
WorkspaceInfo workspaceInfo;
ObjectInfo objectInfo;
ObjectInfo narrativeInfo;
} CreateNewNarrativeOutput;

funcdef create_new_narrative(CreateNewNarrativeParams params)
returns (CreateNewNarrativeOutput) authentication required;

Expand All @@ -227,7 +231,7 @@ module NarrativeService {
ObjectInfo info;
} CopyObjectOutput;

funcdef copy_object(CopyObjectParams params)
funcdef copy_object(CopyObjectParams params)
returns (CopyObjectOutput) authentication required;


Expand Down
39 changes: 39 additions & 0 deletions data/welcome-cell-content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
![KBase Logo](/images/kbase-logo-web.png)
# Welcome to the Narrative Interface!

## What's a Narrative?
In KBase, you can customize and execute a series of analysis steps to create shareable, reproducible “Narratives” that include data, analysis steps, results, visualizations and commentary.

[learn more...]({{config.resources.docSite.base.url}}/narrative-guide)

## Get Some Data
Click the Add Data button in the Data Panel to browse for KBase data or
upload your own. Mouse over a data object to add it to your Narrative, and
check out more details once the data appears in your list.

[learn more...]({{config.resources.docSite.base.url}}/narrative-guide/explore-data)

## Analyze It
Browse available analyses that can be run using KBase apps. Select an app, fill in the fields, and click Run.
Output will be generated, and new data objects may be created and added
to your data list.

[learn more...]({{config.resources.docSite.base.url}}/narrative-guide/browse-apps-and-methods)

## Save and Share Your Narrative
Be sure to save your Narrative frequently. When you're ready, click the share button above to let collaborators view your analysis steps
and results. Or better yet, make your Narrative public and help expand
the social web that KBase is building to make systems biology research
more open, reproducible and collaborative.

[learn more...]({{config.resources.docSite.base.url}}/narrative-guide/share-narratives/)

## Find Documentation and Help
For more information, please see the
[Narrative Interface User Guide]({{config.resources.docSite.base.url}}/narrative-guide)
or the [tutorials]({{config.resources.docSite.base.url}}/tutorials).

Questions? [Contact us]({{config.resources.docSite.base.url}}/contact-us)!

Ready to begin adding to your Narrative? You can keep this Welcome cell or
delete it by selecting "Delete cell" from the "..." menu in the top right corner of this cell.
1 change: 1 addition & 0 deletions deploy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ narrative-method-store = {{ kbase_endpoint }}/narrative_method_store/rpc
setapi-version = dev
datapaletteservice-version = dev
scratch = /kb/module/work/tmp
intro-markdown-file = /data/welcome-cell-content.md
5 changes: 4 additions & 1 deletion kbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ owners:
[rsutormin, msneddon, wjriehl]

service-config:
dynamic-service: true
dynamic-service: true

data-version:
1.0
Loading

0 comments on commit 0cdfd5a

Please sign in to comment.