Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ and Recore uses semantic versioning.
policy, and the drawings decide by the same rules as the code, which
`tools/check_site.py` holds them to. The README follows the website: the
same opening, the same numbered steps, an animated preview of How it works
and a link into each part of the site. `tools/check_site.py` checks its
links, the options of its commands, and that its Try-it block and counts
are the website's. The README names the authors, Paula Ruiz-Rodriguez and
Mireia Coscolla, and the contributors; the citation reads "Ruiz-Rodriguez P,
Coscolla M." in the README, on the website and in its BibTeX, and
`Cargo.toml` lists both authors. `tools/check_site.py` fails if a page of the
website cites differently from the README.
in the reader's light or dark theme, and a link into each part of the site.
`tools/check_site.py` checks its links, the options of its commands, that
its Try-it block and counts are the website's, and that no picture which
follows the theme sits inside a link, where GitHub breaks it. The README
names the authors, Paula Ruiz-Rodriguez and Mireia Coscolla, and the
contributors; the citation reads "Ruiz-Rodriguez P, Coscolla M." in the
README, on the website and in its BibTeX, and `Cargo.toml` lists both
authors. `tools/check_site.py` fails if a page of the website cites
differently from the README.
- `publication_status` in `orthology_evidence.tsv` follows `matrix_action`.
Evidence the matrix policy or a quality floor kept out reads `held_out_policy`
or `held_out_quality` instead of a `corrected...` value, and a strict
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<div align="center">
<a href="https://pathogenomics-lab.github.io/recore/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/recore_logo_dark.svg">
<img src="assets/recore_logo.svg" alt="Recore" width="420">
</picture>
</a>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/recore_logo_dark.svg">
<img src="assets/recore_logo.svg" alt="Recore" width="420">
</picture>

### Missing from the matrix. Still in the genome.

Expand Down Expand Up @@ -34,7 +32,10 @@ __and Mireia Coscolla<sup>1</sup>__
<sub> 1. I<sup>2</sup>SysBio, University of Valencia-CSIC, FISABIO Joint Research Unit Infection and Public Health, Valencia, Spain </sub>

<p align="center">
<a href="https://pathogenomics-lab.github.io/recore/how-it-works.html"><img src="assets/how-it-works.gif" alt="How Recore decides one empty cell, in seven steps: the matrix says absent, take the gene's sequence, search the assembly, look at what is there, check the neighbours, decide, write it down" width="760"></a><br>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/how-it-works_dark.gif">
<img src="assets/how-it-works.gif" alt="How Recore decides one empty cell, in seven steps: the matrix says absent, take the gene's sequence, search the assembly, look at what is there, check the neighbours, decide, write it down" width="760">
</picture><br>
<sub>One empty cell, seven steps. <a href="https://pathogenomics-lab.github.io/recore/how-it-works.html">The interactive version</a> lets you pick what the search finds.</sub>
</p>

Expand Down
Binary file modified assets/how-it-works.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/how-it-works_dark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/about/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ <h2 id="documentation">Documentation<a class="anchor" href="#documentation" aria
<p>The website is <code>docs/index.html</code>, <code>docs/how-it-works.html</code> and <code>docs/reference.html</code>, styled by <code>docs/assets/site.css</code> and driven by <code>docs/assets/site.js</code>: plain files, so opening <code>docs/index.html</code> in a browser shows a change. Keep the front page short. It is there to get someone running in two minutes; the details belong in the documentation.</p>
<p>The drawings of How it works are <code>docs/assets/how.js</code>. They decide with a copy of <code>evidence_state</code> and <code>matrix_policy_corrects</code> from <code>src/pipeline.rs</code>, so a change to those rules is a change there too; <code>tools/check_site.py</code> fails if the policy table, a state, a rescue type, a matrix action or a column no longer matches the code.</p>
<p>The README is the same front door on GitHub, in the website's words: keep the two in step. <code>tools/check_site.py</code> checks the README's links into the repository and into the website, the options of its <code>recore</code> commands, and that its Try-it block and counts are the website's.</p>
<p>A picture that follows the reader's theme, like the logo and the How it works preview, is a bare <code>&lt;picture&gt;</code> with a <code>_dark</code> source: put inside a link, GitHub moves the image out of it and the image stops following the theme. The check fails on that too.</p>
<p>The Docs tab is these markdown pages. <code>tools/build_docs.py</code> turns each one into an <code>.html</code> page next to it, with the site's header, sidebar, contents and search, and writes <code>docs/documentation.html</code> and the search index. The pages are committed, so after editing a <code>.md</code> file, rebuild them:</p>
<div class="code" data-lang="bash"><pre>python3 tools/build_docs.py</pre></div>
<p>A new page is a line in <code>PAGES</code> at the top of that script.</p>
Expand Down
5 changes: 5 additions & 0 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ two in step. `tools/check_site.py` checks the README's links into the
repository and into the website, the options of its `recore` commands, and that
its Try-it block and counts are the website's.

A picture that follows the reader's theme, like the logo and the How it works
preview, is a bare `<picture>` with a `_dark` source: put inside a link, GitHub
moves the image out of it and the image stops following the theme. The check
fails on that too.

The Docs tab is these markdown pages. `tools/build_docs.py` turns each one into
an `.html` page next to it, with the site's header, sidebar, contents and
search, and writes `docs/documentation.html` and the search index. The pages
Expand Down
11 changes: 9 additions & 2 deletions tools/check_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
columns of src/pipeline.rs;
readme README.md's links land, in the repository and on the website with
their anchors, its recore commands use options that exist, and its
Try-it block and counts are the website's, and every page of the
website cites Recore the way the README does;
Try-it block and counts are the website's, every page of the
website cites Recore the way the README does, and no <picture> sits
inside a link, where GitHub breaks it;
dashes no em-dashes;
try with --run-tutorial, the "Try it" commands are run as written and
summary.txt must give the numbers the page promises.
Expand Down Expand Up @@ -355,6 +356,12 @@ def check_readme(pages: dict[str, Page], recore: str) -> list[str]:
elif not re.match(r"^(https?:|mailto:)", url) and not Path(url.partition("#")[0]).exists():
problems.append(f"README.md: links to {url}, which does not exist")

# GitHub splits a <picture> inside a link: the <img> lands outside it, so
# the image stops following the reader's theme and opens the file.
for link in re.findall(r"<a\b[^>]*>((?:(?!</a>).)*)</a>", prose, flags=re.S):
if "<picture" in link:
problems.append("README.md: a <picture> inside a link; GitHub moves its image out and it stops following the theme")

longs, shorts, _ = help_options(recore)
named: set[str] = set()
snippets = [c for b in blocks for c in commands(b) if c.split()[:1] == ["recore"]]
Expand Down
Loading