Repository navigation
Generate training data: keep a correspondence block printed after the references in the header - #792
Merged
Merged
Conversation
… references in the header A preprint server sets who to write to at the end of the article, and the rule that keeps such a block in the header region names the field it arrives under. Giving a correspondence block a field of its own took it out of that rule, and out of the one that searches front matter from the start of the document, so two documents lost the region their block belongs to. The test for the rule named both of those documents and kept passing, because it asserts on the field the block no longer carries. It now has a sibling that names the field it does.
A comment explaining why a test exists named the document it came from, a fixture used one as its value, and the training documentation worked through one by name. Each now describes the shape it is about, or uses a plainly invented id. What a document is called belongs to the corpus, not to the code that reads it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
part of https://github.com/eLifePathways/ScienceBeam2.0/issues/205
A preprint server prints who to write to at the end of the article, and the rule that keeps such a block in the header region names the field it arrives under. Giving a correspondence block a field of its own took it out of that rule, and out of the one that searches front matter from the start of the document, so a block printed late left the region it belongs to and fell into the body.
It is back where it was, and generates what it generated before. The rule that was written for this case now names the field the block actually carries, as does the one the aligner uses to find front matter wherever it is printed.
The test guarding that rule kept passing throughout, because it asserts on the field the block used to arrive under. It has a sibling now that asserts the behaviour for the field the block has, which is what makes the rule hard to walk past again.
Alongside it, nothing in the tests or the documentation names a real document any more. A comment explaining why a test exists named the document it came from, a fixture used one as its value, and the training documentation worked through one by name. Each describes the shape it is about instead, or uses a plainly invented id, because what a document is called belongs to the corpus rather than to the code that reads it.