Step by step workflow test notebook


In [1]:
%load_ext autoreload
%autoreload 2

In [ ]:
#!echo %PATH%

In [2]:
#import sys
#sys.path.append('C:\\Users\\Stephan Kindermann\\Documents\\GitHub\\submission_forms')
import logging as log
import os
from dkrz_forms import form_handler
from test import test_steps
#from dkrz_forms.config.project_config import FORM_REPO, NOTEBOOK_DIRECTORY
#print NOTEBOOK_DIRECTORY
vprint = form_handler.vprint


Detected FORM_URL_PATH:  http://localhost:8888/notebooks/Repos/submission_forms/test/forms

Generate a personal submission form based on a project template


In [3]:
from dkrz_forms import utils

In [4]:
### form generation
import pprint
test_steps.test_init_form()


Initialize git repo: /home/stephan/tmp/Repos/test
Form Handler: 
    -- initializing form for project: test
test
/home/stephan/tmp/Repos/test
test_testsuite_123.ipynb
entity_in.form_path /home/stephan/Repos/submission_forms/test/forms/test
entity_out.form_repo: /home/stephan/tmp/Repos/test
entity_out.form.json: /home/stephan/tmp/Repos/test/test_testsuite_123.json
/home/stephan/Repos/submission_forms/test/forms/test/test_testsuite_123.ipynb
/home/stephan/tmp/Repos/test/test_testsuite_123.ipynb
    -- submission form intitialized
    -- (For the curious: the resulting sf object is used in the following
        to store and manage all your submission related information)

In [ ]:
test_steps.sf.form_dir

Retrieve the private template (pwd protected) and make changes form


In [ ]:


In [5]:
test_steps.test_generate_submission_form()


Form Handler: 
    -- initializing form for project: test
test
/home/stephan/tmp/Repos/test
test_testsuite_123.ipynb
entity_in.form_path /home/stephan/Repos/submission_forms/test/forms/test
Warning: no keystore - new keystore generated
TTT:  store key in keystore 6ZB66G /home/stephan/tmp/Repos/keystore
--- copy from: /home/stephan/Repos/submission_forms/dkrz_forms/Templates/test_submission_form.ipynb
--- to:   /home/stephan/tmp/Repos/test/test_testsuite_123.ipynb
--- and to:  /home/stephan/Repos/submission_forms/test/forms/test/test_testsuite_123.ipynb
--------------------------------------------------------------------
   A submission form was created for you, please visit the following link:
http://localhost:8888/notebooks/Repos/submission_forms/test/forms/test/test_testsuite_123.ipynb
--------------------------------------------------------------------
/home/stephan/Repos/submission_forms/test/forms/test/test_testsuite_123.ipynb
/home/stephan/tmp/Repos/test/test_testsuite_123.ipynb
 
 ......  initial version saved ...
/home/stephan/Repos/submission_forms/test/forms/test/test_testsuite_123.ipynb
/home/stephan/tmp/Repos/test/test_testsuite_123.ipynb
 
  !!  current version saved in repository
  !!  the above link is only valid for the next 5 hours
  !!  to retrieve the form after this use the following link: 
http://localhost:8888/notebooks/Repos/submission_forms/test/forms/Create_Submission_Form.ipynb
       with the password: 6ZB66G

Retrieve a partially filled form and complete it


In [ ]:
test_steps.test_form_completion()

#print test_steps.sf

Submit a completed form


In [ ]:
test_steps.test_form_submission()

Admin workflow step 1: form validation


In [ ]:
test_steps.test_form_review()

step 2: data ingest


In [ ]:
test_steps.test_data_ingest()

step 3: data quality assurance


In [ ]:
test_steps.test_data_quality_assurance()

step 4: data publication


In [ ]:
test_steps.test_data_publication()

step 5: data archival


In [ ]:
test_steps.test_data_archival()

In [ ]:
print C.d

In [ ]: