-
Notifications
You must be signed in to change notification settings - Fork 22
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 changelog to Markdown (MyST) #671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I’ve requested a few tweaks but nothing major :)
I resisted the temptation to convert all the documentation to MyST :)
Full disclosure, I’ll probably keep the majority of the docs in rst format (personally, I prefer the syntax 😅). That said, if someone came along and wanted to contribute a new section to the docs and did it in markdown I’d happily accept it - it would be good to have examples of both syntaxes to be able to dogfood the server’s support of both styles :)
Thanks so much for taking the time to contribute this!
scripts/make_release.py
Outdated
@@ -212,20 +212,20 @@ def generate_changelog(component: Component, version: str): | |||
|
|||
# Release notes for github | |||
run( | |||
"rst2html.py", | |||
"myst-docutils-html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the release notes are in markdown, I suspect converting them to html is now unnecessary. Would you mind removing this this step and changing draft_file
to point at pathlib.Path(component[‘src’]) / ‘.changes.html’
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, towncrier build --draft
produces Markdown now, so it's not entirely clear to me why the draft file should be changes.html
. I'm going ahead and changing it though.
A test:
❯ pushd lib/esbonio && towncrier build --draft --version 0.16.3 && popd
Loading template...
Finding news fragments...
Rendering news fragments...
Draft only -- nothing has been written.
What is seen below is what would be written.
## v0.16.3 - 2023-10-29
### Breaking Changes
- Removed ``esbonio.lsp.spelling`` module, though it will be available as ``esbonio.ext.spelling`` via the ``esbonio-extensions`` package. ([#583](https://github.com/swyddfa/esbonio/issues/583))
- Drop Python 3.7 support ([#584](https://github.com/swyddfa/esbonio/issues/584))
- Drop Sphinx 4.x support ([#585](https://github.com/swyddfa/esbonio/issues/585))
~/Projects/Personal/esbonio changelog-markdown !2 ····················································································· .env 20:14:53
❯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
It doesn’t necessarily matter what the draft file is called, it just so happens that the release pipelines are currently configured to look for a file with that name - it seemed easier to keep the file name consistent rather than try updating all the pipelines to use something else.
f4e32c2
to
9f26ef7
Compare
9f26ef7
to
a8666ce
Compare
Unsure if the MyPy failures are my own 🤔 |
No, they’re pre-existing failures - I’ve only recently added mypy checks against the |
Closes #483.
I tried to amend the release scripts, but I haven't tested them. Happy to lend a hand for the first dry run.
I resisted the temptation to convert all the documentation to MyST :) but now it's possible thanks to https://github.com/executablebooks/rst-to-myst.
One minor caveat is that now
CHANGES.md
titles start with##
because Markdown doesn't have (to my knowledge) the concept of "semantic headings".