Skip to content
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

Convert Docs to Tests and Example Notebooks #703

Open
jmchilton opened this issue Jun 23, 2017 · 0 comments
Open

Convert Docs to Tests and Example Notebooks #703

jmchilton opened this issue Jun 23, 2017 · 0 comments

Comments

@jmchilton
Copy link
Member

https://github.com/galaxyproject/planemo/pull/699/files added some ad-hoc tests generated from documentation manually but I think this process should be made automatic.

I'm imagining a fairly simple two step process - collection and output.

  • During the first step we simply take a list of RST docs to pull commands from - commands are just lines of RST in "code" blocks that start with "$" (extending the line if it ends with \).
  • During the second step we could generate bash scripts for testing and a Jupyter notebook displaying the output. If we placed the bash scripts in the repo - we could execute them from planemo-machine to test the documentation and if we placed the Jupyter notebook in repo we could use nbviewer and have awesome extra interactive docs for exploring Planemo.
    • To generate the bash script we would set the same header used now at the top of the file, list the preconditions for that doc, and then list the commands. We'd have to annotate commands that we expect to fail in the RST so we could appent || true or something to them.
    • To generate the notebook - I'm imaging using notedown with the same preconditions and commands - I'd just wrap each command with a Markdown codeblock and prepend ! to commands.
```python
!mkdir tool_init_exercise
!cd tool_init_exercise
!wget https://raw.githubusercontent.com/galaxyproject/galaxy-test-data/master/2.fastq
!seqtk seq -A 2.fastq > 2.fasta
!cat 2.fasta
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant