For most cases, it is as easy as changing the value of the right key and running
$ make run.
set_run.py: input languages and graph objectslanguage_table.py: input language vocabulary tablemeta.py: meta-generating methods for each graph objectmeta_shortcuts.py: meta-generating shortcuts classes and methodsmeta_examples.py: examples (or code snippets) classesrun.py: generate, format and write meta for all languages
Repetition in meta-generating files should be kept to a minimum.
More precisely, key meta that are contained in more than one graph object and
that show significant similarities, are generated using shortcuts. All
shortcuts methods are labelled as @key@ in meta_shortcuts.py making
navigation between objects, keys and shortcuts a breeze.
In addition, language-specific vocabulary is inserted using Python .format()
method for string. Insert {TERM} in accordance with language table defined in
language_table.py and its variations (i.e. indefinite articles, plurals
etc.) generated in run.py.
Before each case, make sure to pull the latest master and check out to a new branch.
- Open
meta.pyand search for the@<graph-object>@in question. This will take you to the meta-generating method for this particular graph object.
If the meta field in question is set in meta.py (i.e. without a shortcut),
modify it, save meta.py, run $ make run and you are done!
- If the meta field is generated using a shortcut, open
meta_shortcuts.pyand search for the@<key>@in question. This will take you to the meta-generating shortcut method for this particular key.
Modify it, save meta_shortcuts.py, run $ make run and you are done!
- Determine whether this new key has an equivalent for other graph object(s). You
can easily do so by searching for
'<key>'inmeta.pyor@<key>@inmeta_shortcuts.py.
If so, modify the appropiate meta_shortcuts.Make method accordingly
(on most occasion this will mean
adding a key to the dictionary handling 'description') then link the key question
in meta.py to the updated meta_shortcuts.Make method.
- if you are making a new shortcut function use, it is best to copy the syntax
from a similar shortcut. Use the
_outputfunction (see@output@to format the 'keymeta' dictionary,
After saving both meta,py and meta_shortcuts.py, run $ make run and you are done!
(coming soon)
After all cases, commit the changes and make a PR to the online repo.
When you push any branch to the online repo, Nose is going to test the
test_graph_references.py file.
To see if your push passed, go here.
Pull the latest master version of streambed/ and check out to a new branch.
Then,
- run
$ make push-to-streambedingraph_reference
and you are done!
(need to update this section)
-
The
graph_referencesubmodule in the Python-API needs to be updated and tests need to pass -
The Python-API needs to be pushed to pip,
-
Our backend's
requirements.txtneeds to be updated with the new version of the Python-API.
Please create a new task on the Asana project.
You can also comment in the scripts/ files using the following terminology:
-
#Q: ingraph_objs_meta.pythese comments refer to questions about Plotly's functionality. -
#TODO: ingraph_objs_meta.pythese comments refer to tasks that remain to be completed. -
Artifact (or
#ARTIFACT): Artifact keys are keys that not intended for API use (i.e. meant for GUI use), but that must remain part of graph reference to ensure reproducibility. Artifact keys should be placed last in each graph objects. -
Obsolete: Obsolete keys are keys no longer relevant in both from the APIs and the GUI. Obsolete keys must be dropped from graph reference.