-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collect functions used for documentation building in
docs_utils.py
(#…
…1380) * Collect functions used for documentation building in `docs_utils.py` * Update documentation and fix bug * Move more functions into `docs_utils.py`
- Loading branch information
Showing
15 changed files
with
209 additions
and
101 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,10 @@ | ||
from m2r import convert | ||
import os | ||
from straxen.docs_utils import convert_release_notes | ||
|
||
header = """ | ||
Release notes | ||
============== | ||
|
||
""" | ||
|
||
|
||
def convert_release_notes(): | ||
"""Convert the release notes to an RST page with links to PRs.""" | ||
if __name__ == "__main__": | ||
this_dir = os.path.dirname(os.path.realpath(__file__)) | ||
notes = os.path.join(this_dir, "..", "..", "HISTORY.md") | ||
with open(notes, "r") as f: | ||
notes = f.read() | ||
rst = convert(notes) | ||
with_ref = "" | ||
for line in rst.split("\n"): | ||
# Get URL for PR | ||
if "#" in line: | ||
pr_number = line.split("#")[1] | ||
while len(pr_number): | ||
try: | ||
pr_number = int(pr_number) | ||
break | ||
except ValueError: | ||
# Too many tailing characters to be an int | ||
pr_number = pr_number[:-1] | ||
if pr_number: | ||
line = line.replace( | ||
f"#{pr_number}", | ||
f"`#{pr_number} <https://github.com/XENONnT/straxen/pull/{pr_number}>`_", | ||
) | ||
with_ref += line + "\n" | ||
target = os.path.join(this_dir, "reference", "release_notes.rst") | ||
|
||
with open(target, "w") as f: | ||
f.write(header + with_ref) | ||
|
||
|
||
if __name__ == "__main__": | ||
convert_release_notes() | ||
pull_url = "https://github.com/XENONnT/straxen/pull" | ||
convert_release_notes(notes, target, pull_url) |
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
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
21 changes: 0 additions & 21 deletions
21
docs/source/reference/straxen.plugins.detector_time_offsets.rst
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
straxen.plugins.gps\_syncing package | ||
==================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
straxen.plugins.gps\_syncing.gps\_syncing module | ||
------------------------------------------------ | ||
|
||
.. automodule:: straxen.plugins.gps_syncing.gps_syncing | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: straxen.plugins.gps_syncing | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
straxen.plugins.ref\_mon\_nv package | ||
==================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
straxen.plugins.ref\_mon\_nv.ref\_mon\_nv module | ||
------------------------------------------------ | ||
|
||
.. automodule:: straxen.plugins.ref_mon_nv.ref_mon_nv | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: straxen.plugins.ref_mon_nv | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ multihist>=0.6.3 | |
numba>=0.50.0 | ||
numpy | ||
packaging | ||
m2r | ||
pymongo | ||
requests | ||
strax>=1.5.0 | ||
|
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
Oops, something went wrong.