-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add python-releases.toml #4331
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
base: main
Are you sure you want to change the base?
Add python-releases.toml #4331
Changes from all commits
13bf22c
813ac0d
1615b1d
3414c2e
d81a00d
27be901
7836259
9a70c0a
2207db2
674eba1
3dc6277
a72c1f9
e4f42ac
73cf41e
7b18f8d
1f1c73d
aa84830
44d535c
9a6d518
bf25b48
390a2da
0eecc18
27777fd
aa2ff65
073e34e
3568c54
6f01ad8
46d6b83
b680726
ab15a36
c7641b9
bd34d01
941b77a
b9cc8ac
69219cf
9dc3311
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -26,6 +26,7 @@ | |||||||||||||||||||||
from pep_sphinx_extensions.pep_zero_generator import subindices | ||||||||||||||||||||||
from pep_sphinx_extensions.pep_zero_generator import writer | ||||||||||||||||||||||
from pep_sphinx_extensions.pep_zero_generator.constants import SUBINDICES_BY_TOPIC | ||||||||||||||||||||||
from release_management.serialise import create_release_cycle, create_release_json | ||||||||||||||||||||||
|
||||||||||||||||||||||
if TYPE_CHECKING: | ||||||||||||||||||||||
from sphinx.application import Sphinx | ||||||||||||||||||||||
|
@@ -73,3 +74,9 @@ def create_pep_zero(app: Sphinx, env: BuildEnvironment, docnames: list[str]) -> | |||||||||||||||||||||
subindices.generate_subindices(SUBINDICES_BY_TOPIC, peps, docnames, env) | ||||||||||||||||||||||
|
||||||||||||||||||||||
write_peps_json(peps, Path(app.outdir)) | ||||||||||||||||||||||
|
||||||||||||||||||||||
release_cycle = create_release_cycle() | ||||||||||||||||||||||
app.outdir.joinpath('release-cycle.json').write_text(release_cycle, encoding="utf-8") | ||||||||||||||||||||||
|
||||||||||||||||||||||
release_json = create_release_json() | ||||||||||||||||||||||
app.outdir.joinpath('python-releases.json').write_text(release_json, encoding="utf-8") | ||||||||||||||||||||||
Comment on lines
+78
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's stick these next to https://peps.python.org/api/peps.json so we can (later) document them at https://peps.python.org/api/
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is right. The releases as machine-readable data have nothing to do with the "API" of the PEPs website, to the extent that such a thing exists. I don't see a reasonable reason not to have the files at the root, it won't conflict with anything & it's a shorter link. If you do want to put the JSON files in a subdirectory though, let's use a more appropriate folder name (e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The data is here, it's coming from the PEPs website; it's data from the release PEPs. We're precomputing the data to create a read-only API served via static JSON. This is a common thing to do.
So we can document them via https://peps.python.org/api/
This data will be mostly read by machines, an extra 4 characters is no problem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree it would make sense to document the files. I still think that |
Uh oh!
There was an error while loading. Please reload this page.