-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add commands to create training materials #861
Conversation
Oops, I get this exception now:
|
😟 |
@abretaud it should be fixed. can you test? thanks |
@bebatut I confirm! thanks |
I've just re-checked the tutorial.md generated with the latest code on the maker workflow:
|
Some of the tests just don't pass for me: n = 'save_db'
tp_desc = tools[step['name']][n]
step_param = training.get_lower_params(step_params, n)
print(tp_desc)
print(n)
print(step_params)
print(step_param)
paramlist = training.format_param_desc(
step_param,
step_inputs,
tp_desc,
0,
wf['steps'],
force_default=False)
assert '`Yes`' in paramlist, paramlist That parameter appears to be false not true for instance. Does that work for you locally - does it require Galaxy modifications? |
planemo/training.py
Outdated
> ### {{ '{%' }} icon hands_on {{ '%}' }} Hands-on: Data upload | ||
> | ||
> 1. Import the following files from [Zenodo]({{ zenodo_link }}) or from a data | ||
> library named `TODO` if available (ask your instructor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be the same as L147?
@@ -0,0 +1,7 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file still needed? It looks its format changed
planemo/training.py
Outdated
> > ### {{ '{%' }} icon tip {{ '%}' }} Tip: Importing data from a data library | ||
> > | ||
> > * Go into "Shared data" (top panel) then "Data libraries" | ||
> > * Click on "Training data" and then "{{ topic_title }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it only topic_title
or topic_title
/tutorial_title
?
planemo/training.py
Outdated
wf, tools = get_wf_tools_from_running_galaxy(kwds) | ||
else: | ||
wf, tools = get_wf_tool_from_local_galaxy(kwds, kwds["workflow"], ctx) | ||
save_to_yaml(tools, 'tools.yaml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, don't know if it's intended but now I get a tools.yaml at the root of the gtn dir (but it doesn't look the same as the tutorial tools.yaml)
I updated to fit with the new metadata definition @jmchilton The test should be fixed now |
@abretaud I checked your comments. If the value of a parameter is set to the default value in the tool description, the corresponding parameter description does not appear (to avoid all parameters to be described, specially for big tool). It explain why "Organism type" for Maker tool does not appear |
@bebatut ah yes, it makes sense, I thought it was not the default value |
I restructured the code and split it into classes to try to make it easier to maintain. |
Hi @bebatut ! I'm trying Btw I'm using python 2.7 with this but I see python 3.6 in @abretaud's error above, should I be using python 3 or it doesn't matter? |
@mblue9 I could not reproduce your error (with Python 2.7 or 3.6) 😟 |
That error happens in the Travis tests as well https://travis-ci.org/galaxyproject/planemo/jobs/425797918.
|
@bebatut and @jmchilton thanks for taking a look! Yes I used the version from this PR and the command I used was: (The @bebatut does it work for you with my workflow? If so do you think you could send me the tutorial.md and I could keep going with that? as I'm running this tutorial in a couple of weeks. Otherwise I'll just manually create it. |
@mblue9 It works for me with your workflow: the tutorial.md (with changed extension) |
@jmchilton All the tests implying to start a Galaxy instance (though the call of
Are you aware of any similar issue? I will investigate how the workflow and the extracted tools from these Galaxy instance look like (empty or not). |
@bebatut thanks for the file!!! That auto-generation is so cool 😎 🙌and going to save me a chunk of time (and tedium) 😄!!! I tried training_generate_from_wf without |
c385d2d
to
ff390ff
Compare
ff390ff
to
45cd23a
Compare
Fixed some linting issues and I added test decorators so the tests requiring Galaxy don't slow the "quick" version of the test suite. All the tests will still run with the full suite for both Python 2 and Python 3. I couldn't love this anymore - it is absolutely amazing. |
The wide scope and stellar quality of the new training material commands, library functionality, and tests clearly warrant this. See #861. This is both to say thanks for the great contribution and done in hopes of encouraging continued use of Planemo for this awesome functionality.
Hi,
This PR adds new commands to planemo (as discussed during GCCBOSC: galaxyproject/training-material#941):
training_init
: a command to create new training material for the GTN material given the template there:data_library.yaml
file by parsing the Zenodo API and add the link in the tutorialtraining_generate_tuto_from_wf
to generate thetutorial.md
of an existing tutorial from a workflowtraining_fill_data_library
to fill thedata_library.yaml
file by parsing the Zenodo API of an existing tutorialI tested it by generating several tutorial skeletons. @abretaud tested it too.
I added tests to cover most of the functions (I have some doubts about the tests of the commands).
I am not sure about the code quality, particularly the
training.py
script if not so straightforward.I hope I could get your help there 😄
ping @shiltemann, @jmchilton
Bérénice