Initial pass at full documentation for Conda-based dependency development.#642
Conversation
|
👏 |
docs/_writing_dependencies_conda.rst
Outdated
| Exercise - Package a Tool | ||
| ---------------------------------------------------------------- | ||
|
|
||
| 1. Package a tool for Bioconda. |
There was a problem hiding this comment.
Is this something you want to have captured here or just link out to bioconda tutorials?
There was a problem hiding this comment.
I know I would get push back if I put it here - so this is probably not going to end up in the planemo docs. 😢 If it does - it might be a smaller section on galaxy-specific or planemo-specific tricks that already assumes the reader has gone through bioconda docs.
There was a problem hiding this comment.
Perhaps - but that is besides the point. I'm sure the community would be better served by working on the bioconda documentation and tooling.
There was a problem hiding this comment.
Or do you mean this particular line - not the whole idea of documentation for building recipes? Sorry I'm being confusing.
There was a problem hiding this comment.
I changed the language here - I was using tool incorrectly.
…ment. - Add a new advanced topic for developing tools with Conda dependencies with 4 main sections: 1. Using the planemo conda commands such conda_init, conda_install, conda_env, lint --conda_requirements, and test. 2. Finding existing Conda packages - using the Anaconda site, conda search, or a new "planemo conda_search" command for searching best practice channels. 3. A formal exercise based on the tools-iuc pear.xml tool. 4. A short stub of a section containing resources on building and contributing Conda recipes. - Add a project template for downloading the completed intro seqtk_seq.xml example for testing out planemo conda commands. - Add a project template for a Conda exercise based on the pear tool from tools-iuc. - Add a ``planemo conda_search`` command for searching best practice channels from the command line. I think this can serve as the template and example for the first third of the "Conda and Containers - A Developer Perspective" workshop at the GCC 2017.
055202c to
cf795a9
Compare
mvdbeek
left a comment
There was a problem hiding this comment.
That reads really well. Thanks a lot @jmchilton!
| Linting tool /Users/john/workspace/planemo/docs/writing/seqtk_seq_v6.xml | ||
| ... | ||
| Applying linter requirements_in_conda... CHECK | ||
| .. INFO: Requirement [seqtk@1.2] matches target in best practice Conda channel [bioconda]. |
There was a problem hiding this comment.
Could we drop the "best-practice" ? I guess this would be helpful also if you have uploaded things to your own channel.
There was a problem hiding this comment.
lint --conda_requirements checks the "best practice" channels - i.e. will these resolve with the default configuration of Galaxy. It does not check against channels you configure to target with say conda_install or test.
There was a problem hiding this comment.
I guess we should make a separate issue if you want to discuss this more - I feel like a conda_check command or something would be reasonable - but it isn't what I was trying to capture with lint. Does that make sense?
There was a problem hiding this comment.
Yeah, for the lint command it does make sense to limit the channels.
In any case you'd notice something is wrong once you do planemo conda_install, so I would say that a planemo conda_check is not of high priority.
|
|
||
| :: | ||
|
|
||
| $ . <(planemo conda_env seqtk_seq.xml) |
| (seqtk_seq) $ conda_env_deactivate | ||
| $ | ||
|
|
||
| As shown above the ``conda_env_deactivate`` will be created in this environment and can |
There was a problem hiding this comment.
Why not use deactivate that should be present in that conda environment? Less of a change for people that know conda outside of the galaxy/planemo universe.
There was a problem hiding this comment.
- Conda's requires sourcing - unlike virtualenv's right? (source deactivate vs deactivate). As a personal taste I don't love that extra step.
- Also I usually use planemo from within a virtualenv - what would happen if I replaced deactivate - I guess I could create an
old_deactivatealias and restore it? I don't know how to do that in a cross shell compatible way. If someone wanted to work on that though - I'd be happy to merge the PR that did that.
| ``conda search`` command but configured to use the same channels and other options as | ||
| Planemo and Galaxy. The following Conda command would also work to search:: | ||
|
|
||
| $ $HOME/miniconda3/bin/conda -c bioconda -c conda-forge -c iuc seqt |
There was a problem hiding this comment.
Highest priority is iuc, then bioconda, then conda-forge. See https://github.com/galaxyproject/galaxy/blob/dev/config/galaxy.ini.sample#L212.
So that would be -c iuc -c bioconda -c conda-forge (I'm excluding defaults here, assuming this is always active). Can you confirm this @bgruening ?
| When using the website to search though, you need to aware of what channel you are using. By | ||
| default, Planemo and Galaxy will search a few different Conda channels. While it is possible | ||
| to configure a local Planemo or Galaxy to target different channels - the current best practice | ||
| it to add tools to the existing channels. |
|
|
||
| This will download a tool for `PEAR - Paired-End reAd mergeR | ||
| <http://sco.h-its.org/exelixis/web/software/pear/>`__. This tool however has | ||
| ``requirement`` tags and so will not work properly. |
There was a problem hiding this comment.
This tool has no requirements tag ... right?
There was a problem hiding this comment.
Yeah - that is what I meant.
| <tool id="iuc_pear" name="Pear" version="0.9.6.1"> | ||
| <description>Paired-End read merger</description> | ||
| <stdio> | ||
| <exit_code range="1:" /> |
There was a problem hiding this comment.
I think that in the IUC we would probably advocate the use of <command detect_errors="exit_code"> or "aggressive"
There was a problem hiding this comment.
It is an IUC tool 😜 - I'll collect your advice and open a PR against tools-iuc.
| <![CDATA[ | ||
| pear | ||
| #if str( $library.type ) == "paired": | ||
| -f "$library.forward" |
There was a problem hiding this comment.
And we're advocating single quotes for paths. But I guess it's not so straightforward to implement this in planemo, right?
There was a problem hiding this comment.
Also that has nothing to do with this PR, just mentioning it.
This pull request:
planemo conda_searchcommand for searching best practice channels.planemo conda_searchcommand for searching best practice channels from the command line.I think this can serve as the template and example for the first third of the "Conda and Containers - A Developer Perspective" workshop at the GCC 2017.