Where can I find an example of a file workflow.rst for generating snakemake reports? - reporting

I am trying to use the reporting function of snakemake which is documented here:
https://snakemake.readthedocs.io/en/stable/snakefiles/reporting.html
However I am finding it hard to find a meaningful example of what the workflow.rst file should look like.
I have looked at the output example
https://koesterlab.github.io/resources/report.html
but I can't find the code to generate this report.

It seems that the link in the documentation is broken.
I found an example in the tests of snakemake:
https://github.com/snakemake/snakemake/tree/master/tests/test_report
The snakefile generating a report is there:
https://github.com/snakemake/snakemake/blob/master/tests/test_report/Snakefile
It uses the following .rst file:
https://github.com/snakemake/snakemake/blob/master/tests/test_report/report/workflow.rst

Related

How to divide the changelog.yaml into subsections?

I would like to separate each change of the databaseChangeLog in YAML format into its own file (again YAML) and include/import it somehow. It should be in way such that I can use a FileSystemAccessor or ClassPathAccessor to load it again.
Is there some example how to do that?
Thanks,
Dieter
The way to do this is described at https://www.liquibase.org/bestpractices.html
The example given shows XML formatted changelogs, but the basic idea would be the same for YAML formatted changelogs.
Leave me a comment and I can generate a sample in YAML.
After some searching I found this on the liquibase repo:
https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/test/resources/liquibase/parser/core/yaml/doubleNestedChangeLog.yaml
It is an example how you can separate your yaml files analog to the xml as shown by SteveDonies link.

Validating YAML file in PhpStorm

I'm working on a project where YAMLs are used (among other use cases) for storing synonym lists. A file may look a little like this:
- "streifen,gestreift"
- "fleeceoverall,fleeceanzug"- "federball,badminton"
- "hochgarage,parkgarage"
In this case - "federball,badminton" is on the same row as - "fleeceoverall,fleeceanzug" which causes the build of the application to fail with an error stating
Unexpected characters near "- "federball,badminton".
I tried to configure a code style profile for code inspections as mentioned here in the PhpStorm documentation:
https://www.jetbrains.com/help/phpstorm/customizing-profiles.html?keymap=secondary_default_for_macos
But I don't know what to adjust here. I using the IDE-Standard which looks like this for wrapping and braces (which I guess is what I'm looking for ;) :
I also took a look at validating my YAML against a JSON file as mentioned here: https://www.jetbrains.com/help/phpstorm/yaml.html# but ultimately I don't understand how this works :/
So I guess I'm a little lost on how to avoid the errors at build time beforehand and would love some advice!

Sphinx docs including unit test output

This is a how-to/best-practice question.
I have a code base with a suite of unit tests run with pytest
I have a set of *.rst files which provide explanation of each test, along with a table of results and images of some mathematical plots
Each time the pytest suite runs, it dynamically updates the *.rst files with the results of the latest test data, updating numerical values, time-stamping the tests, etc
I would like to integrate this with the project docs. I could
Build these rst files separately with sphinx-build whenever I want to view the test results [this seems bad, since it's labor intensive and not automated]
tell Sphinx to render these pages separately and include them in the project docs [better, but I'm not sure how to configure this]
have a separate set of sphinx docs for the test results which I can build after each run of the test suite
Which approach (or another approach) is most effective? Is there a best practice for doing this type of thing?
Maybe take a look into Sphinx-Test-Reports, which reads in all information from junit-based xml-files (pytest supports this) and generates the output during the normal sphinx build phase.
So you are free to add custom information around the test results.
Example from webpage:
.. test-report:: My Report
:id: REPORT
:file: ../tests/data/pytest_sphinx_data_short.xml
So complete answer to your question: Take none of the given approaches and let a sphinx-extension do it during build-time.

Create "browsable" source code based on ctags output?

Is there a way to take a program's source code, run ctags on it and generate an HTML file for each of original source code file, with hyperlinks at places where ctags can see relations in the code? How could I do that?
I believe http://lxr.sourceforge.net/en/index.php is what you're looking for.

How to debug Octopress markdown source files?

I use Octopress for blogging. Generally it works well except one occassion -- after typing rake generate, I got depressing output which says something like:
psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 3 column 6 (Psych::SyntaxError)
I can't remember how many times I've encounterd this situation. Every time I google the key words above, but got nothing help.
What I can do is to exclude all the source files (*.mkd) from _posts, and add them one by one to check which one goes wrong. I keep checking, and finally it turns out that a minor grammer mistake makes octopress angry.
Life should NOT be that hard. So is it possible to debug a octopress source file to show which line of file is incorrect in grammer? The outputs from rake generate don't make sense at all.
The reason could be wrong JAML in the top part of the post (e.g. ':' in the title), see https://github.com/jekyll/jekyll/issues/549 for more info.
I've seen a similar error ("mapping values are not allowed in this context") when I try to convert markdown files, using Pandoc. Perhaps your error message is coming from pandoc somehow?
Don't bother to debug Octopress. Please migrate to Pelican -- a Python-powered static site generator. It is full-featured, easy to use, and no doubt, generating useful debug information.

Resources