In [1]:
%load_ext autoreload
%autoreload 2
In [2]:
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
vprint = form_handler.vprint
In [3]:
from dkrz_forms import utils
In [4]:
par = {'a':'b','__doc__':"Test Test"}
tst = utils.Form(par)
In [5]:
tst['a']
?tst
In [6]:
### form generation
import pprint
test_steps.test_init_form()
sf = test_steps.sf
#sf = form_handler.set_doc(sf,DOCUMENTATION_DICT)
#pprint.pprint(form_handler.form_to_dict(sf))
In [7]:
?sf.sub.entity_out.form
In [8]:
?sf
In [9]:
test_steps.test_generate_submission_form()
In [10]:
test_steps.test_form_completion()
print test_steps.sf
In [11]:
test_steps.test_form_submission()
In [12]:
test_steps.test_form_review()
In [13]:
test_steps.test_data_ingest()
In [14]:
test_steps.test_data_quality_assurance()
In [15]:
test_steps.test_data_publication()
In [ ]:
test_steps.test_data_archival()
In [ ]:
sf = test_steps.sf
In [ ]:
help(sf.sub.entity_in)
In [ ]:
print sf.workflow
for (a,b) in sf.workflow:
print a,b
In [ ]:
error
SUBMISSION_FORMTEMPLATE_ENTITY_DOC = """
:param source_path: :
a
b
c
d
,
args:
form_version: :
x
y
z
"""
sf = test_steps.sf
print sf.sub.__dict__
sf.sub.__doc__ = "test test TEst"
sf.sub.entity_out.__doc__="test entity_submission out doc"
sf.rev.entity_out.__doc__=SUBMISSION_FORMTEMPLATE_ENTITY_DOC
In [ ]:
In [ ]:
#?sf.rev.entity_out
?sf.rev.entity_out
In [ ]:
#import abc
def myprop(x, doc):
def getx(self):
return getattr(self, '_' + x)
def setx(self, val):
setattr(self, '_' + x, val)
def delx(self):
delattr(self, '_' + x)
return property(getx, setx, delx, doc)
class C(object):
#__metaclass__=abc.ABCMeta
a = myprop("a", "Hi, I'm A!")
b = myprop("b", "Hi, I'm B!")
d = 5
C.d = myprop("d","....DDDDDDDDDDDDDDDD......")
#C.__doc__ = "test test"
co.x = 5
co = C()
In [ ]:
print C.d
In [ ]: