-
Notifications
You must be signed in to change notification settings - Fork 3
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
DM-42023: Add documenteer technote add-author and sync-authors commands #205
Merged
Conversation
This file contains 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
The AuthorDb interface is based on one we wrote into lsst-sqre/lsst-templatebot-aide, and adapted to use requests. To improve on the latex encoding to unicode conversion, I'm adopting pylatexenc. This is a terrific package that replaces a lot of work that we'd used to to with pandoc or with fragile code of ours.
This class allows us to open and edit a technote.toml file, using preserved formatting. This is made possible by the tomlkit package. Notes on type checking: - Make use of typing casts to help mypy sort through ambiguous types - Use properties on the TechnoteTomlFile that take care of the casting
This service-layer class will power functionality in the documenteer CLI. Right now it supports adding an author by ID from the authordb.yaml file, and synchronizing author information in a technote.toml file.
This CLI will become the basis for future CL tooling from documenteer to help build and maintain documents.
This command adds and updates authors from authordb.yaml.
TOML doesn't represent null values, so the appropriate action is to omit the orcid key entirely.
I can't get dotted keys to work, but an inline table is a good fit here.
Right now this service migrates metadata.yaml content into technote.toml and updates index.rst to have a title, abstract, and References section.
3618513
to
9d6479c
Compare
This command, documenteer technote migrate, should speed up the process of migrating from an original metadata.yaml-based technote to the new style. Using data from metadata.yaml, it sets up a new technote.toml file. It also migrates index.rst to the new requirements for title, abstract and bibliography. Finally, it also adds/overwrites key infrastructure files (ci.yaml, tox.ini, Makefile, etc). This migration command should accomplish 90% of the work for authors to migrate their technotes.
Add a documenteer technote migrate -D option file as well as an interactive prompt to delete the old metadata.yaml and .travis.yml files after a technote migration. People can always use git history to reset this history if run mistakenl.
Add these to the Makefile and tox.ini used during the migration.
This reduces the chances of errors
c9c7cbe
to
2adcb94
Compare
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.
New command-line interface for technote authors.
documenteer technote migrate
automates to the process of migrating an old technote to the new format.documenteer technote add-author
adds an author to a technote'stechnote.toml
file using data from theauthordb.yaml
file in https://github.com/lsst/lsst-texmf.documenteer technote sync-authors
refreshing author information in atechnote.toml
file with information from theauthordb.yaml
file. This requires that individual authors haveinternal_id
fields to correlate withauthordb.yaml
.The motivation for adding the
add-author
andsync-authors
commands is to help technote authors use information from lsst-texmf's authordb.yaml file to populate author information in technote.toml. Using these commands ensures that affiliations are consistent and that theinternal_id
is used to correlate authors within Rubin documentation.