Skip to content

Commit eb24b5c

Browse files
authored
Niceties and improved documentation (#80)
1 parent 7cbc9d0 commit eb24b5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+30469
-480
lines changed

.github/workflows/documentation.yml

+21-9
Original file line numberDiff line numberDiff line change
@@ -69,45 +69,57 @@ jobs:
6969
# Forcing several successive builds here and hoping it works out (sphinx-gallery
7070
# checks for the existence of already built examples to avoid re-running them, so
7171
# once the gallery is built successive builds will just re-generate the html, very quickly)
72-
- name: Build documentation (1/7)
72+
- name: Build documentation (1/10)
7373
continue-on-error: true
7474
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
7575

76-
- name: Build documentation (2/7)
76+
- name: Build documentation (2/10)
7777
continue-on-error: true
7878
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
7979

80-
- name: Build documentation (3/7)
80+
- name: Build documentation (3/10)
8181
continue-on-error: true
8282
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
8383

84-
- name: Build documentation (4/7)
84+
- name: Build documentation (4/10)
8585
continue-on-error: true
8686
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
8787

88-
- name: Build documentation (5/7)
88+
- name: Build documentation (5/10)
8989
continue-on-error: true
9090
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
9191

92-
- name: Build documentation (6/7)
92+
- name: Build documentation (6/10)
9393
continue-on-error: true
9494
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
9595

96-
- name: Build documentation (7/7)
96+
- name: Build documentation (7/10)
97+
continue-on-error: true
98+
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
99+
100+
- name: Build documentation (8/10)
101+
continue-on-error: true
102+
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
103+
104+
- name: Build documentation (9/10)
105+
continue-on-error: true
106+
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
107+
108+
- name: Build documentation (10/10)
97109
continue-on-error: true
98110
run: poetry run python -m sphinx -v -b html docs doc_build -d doc_build
99111

100112
# Upload artifacts if in PR so reviewers can have a quick look without building documentation from the branch locally
101113
- name: Upload build artifacts
102114
uses: actions/upload-artifact@v2
103-
if: ${{ success() }} && github.event_name == 'pull_request' # only for pushes in PR
115+
if: success() && github.event_name == 'pull_request' # only for pushes in PR
104116
with:
105117
name: site-build
106118
path: doc_build
107119
retention-days: 7
108120

109121
- name: Upload documentation to gh-pages
110-
if: ${{ success() }} && github.ref == 'refs/heads/master' # only for pushes to master
122+
if: success() && github.ref == 'refs/heads/master' # only for pushes to master
111123
uses: JamesIves/[email protected]
112124
with:
113125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/conf.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def __call__(self, *args, **kwargs):
5252
copyright = f"2019, {pyhdtoolkit.__author__}"
5353
author = pyhdtoolkit.__author__
5454

55+
rst_prolog = f""":github_url: {pyhdtoolkit.__url__}"""
56+
5557
# The full version, including alpha/beta/rc tags
5658
version = pyhdtoolkit.__version__
5759
release = pyhdtoolkit.__version__
@@ -517,7 +519,7 @@ def __call__(self, *args, **kwargs):
517519
# use in refs e.g:
518520
# :ref:`comparison manual <python:comparisons>`
519521
intersphinx_mapping = {
520-
"python": ("https://docs.python.org/", None),
522+
"python": ("https://docs.python.org/3/", None),
521523
"numpy": ("https://numpy.org/doc/stable/", None),
522524
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
523525
"matplotlib": ("https://matplotlib.org/stable/", None),

docs/references.bib

+74-65
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,93 @@
11
@article{Boumal:NPS:2016,
2-
title = {Nonconvex Phase Synchronization},
3-
author = {Boumal, Nicolas},
4-
year = 2016,
5-
journal = {SIAM Journal on Optimization},
6-
volume = 26,
7-
number = 4,
8-
pages = {2355--2377},
9-
doi = {10.1137/16M105808X},
10-
url = {https://doi.org/10.1137/16M105808X}
2+
author = {Boumal, Nicolas},
3+
doi = {10.1137/16M105808X},
4+
journal = {SIAM Journal on Optimization},
5+
number = 4,
6+
pages = {2355--2377},
7+
title = {Nonconvex Phase Synchronization},
8+
url = {https://doi.org/10.1137/16M105808X},
9+
volume = 26,
10+
year = 2016
1111
}
1212
@article{Miyamoto:ACD:2008,
13-
title = {Parametrization of the driven betatron oscillation},
14-
author = {Miyamoto, R. and Kopp, S. E. and Jansson, A. and Syphers, M. J.},
15-
year = 2008,
16-
month = {Aug},
17-
journal = {Phys. Rev. ST Accel. Beams},
18-
publisher = {American Physical Society},
19-
volume = 11,
20-
pages = {084002},
21-
doi = {10.1103/PhysRevSTAB.11.084002},
22-
url = {https://link.aps.org/doi/10.1103/PhysRevSTAB.11.084002},
23-
issue = 8,
24-
numpages = 8
13+
author = {Miyamoto, R. and Kopp, S. E. and Jansson, A. and Syphers, M. J.},
14+
doi = {10.1103/PhysRevSTAB.11.084002},
15+
issue = 8,
16+
journal = {Phys. Rev. ST Accel. Beams},
17+
month = {Aug},
18+
numpages = 8,
19+
pages = {084002},
20+
publisher = {American Physical Society},
21+
title = {Parametrization of the driven betatron oscillation},
22+
url = {https://link.aps.org/doi/10.1103/PhysRevSTAB.11.084002},
23+
volume = 11,
24+
year = 2008
2525
}
2626

2727
@article{Tomas:ACDAdiabaticity:2005,
28-
title = {Adiabaticity of the ramping process of an ac dipole},
29-
author = {Tom\'as, R.},
30-
year = 2005,
31-
month = {Feb},
32-
journal = {Phys. Rev. ST Accel. Beams},
33-
publisher = {American Physical Society},
34-
volume = 8,
35-
pages = {024401},
36-
doi = {10.1103/PhysRevSTAB.8.024401},
37-
url = {https://link.aps.org/doi/10.1103/PhysRevSTAB.8.024401},
38-
issue = 2,
39-
numpages = 7
28+
author = {Tom\'as, R.},
29+
doi = {10.1103/PhysRevSTAB.8.024401},
30+
issue = 2,
31+
journal = {Phys. Rev. ST Accel. Beams},
32+
month = {Feb},
33+
numpages = 7,
34+
pages = {024401},
35+
publisher = {American Physical Society},
36+
title = {Adiabaticity of the ramping process of an ac dipole},
37+
url = {https://link.aps.org/doi/10.1103/PhysRevSTAB.8.024401},
38+
volume = 8,
39+
year = 2005
4040
}
4141

4242
@inproceedings{Ripken:optics:1989,
43-
title = {Methods of beam optics},
44-
author = {Willeke, F. and Ripken, G.},
45-
year = 1989,
46-
booktitle = {{AIP} {Conference} {Proceedings}},
47-
publisher = {AIP},
48-
address = {FERMILAB/ CORNELL UNIVERSITY, USA},
49-
volume = 184,
50-
pages = {758--819},
51-
doi = {10.1063/1.38050},
52-
url = {http://aip.scitation.org/doi/abs/10.1063/1.38050},
53-
note = {ISSN: 0094243X},
54-
language = {en}
43+
address = {FERMILAB/ CORNELL UNIVERSITY, USA},
44+
author = {Willeke, F. and Ripken, G.},
45+
booktitle = {{AIP} {Conference} {Proceedings}},
46+
doi = {10.1063/1.38050},
47+
language = {en},
48+
note = {ISSN: 0094243X},
49+
pages = {758--819},
50+
publisher = {AIP},
51+
title = {Methods of beam optics},
52+
url = {http://aip.scitation.org/doi/abs/10.1063/1.38050},
53+
volume = 184,
54+
year = 1989
5555
}
5656

5757
@article{Lebedev:coupling:2010,
58-
title = {Betatron {Motion} with {Coupling} of {Horizontal} and {Vertical} {Degrees} of {Freedom}},
59-
author = {Lebedev, V A and Bogacz, S A},
60-
year = 2010,
61-
journal = {Journal of Instrumentation},
62-
pages = 24,
63-
doi = {10.1088/1748-0221/5/10/P10010},
64-
url = {https://arxiv.org/ftp/arxiv/papers/1207/1207.5526.pdf},
65-
language = {en}
58+
author = {Lebedev, V A and Bogacz, S A},
59+
doi = {10.1088/1748-0221/5/10/P10010},
60+
journal = {Journal of Instrumentation},
61+
language = {en},
62+
pages = 24,
63+
title = {Betatron {Motion} with {Coupling} of {Horizontal} and {Vertical} {Degrees} of {Freedom}},
64+
url = {https://arxiv.org/ftp/arxiv/papers/1207/1207.5526.pdf},
65+
year = 2010
6666
}
6767

6868
@book{Strang:linalg:1980,
69-
title = {Linear Algebra and Its Applications},
70-
author = {G. Strang},
71-
year = 1980,
72-
publisher = {Academic Press, Inc.},
73-
address = {Orlando, FL},
74-
isbn = {0534422004}
69+
address = {Orlando, FL},
70+
author = {G. Strang},
71+
isbn = {0534422004},
72+
publisher = {Academic Press, Inc.},
73+
title = {Linear Algebra and Its Applications},
74+
year = 1980
7575
}
7676

7777
@misc{Tomas:CASImperfections:2018,
78-
title = {Imperfections and corrections},
79-
author = {R. Tomás and X. Buffat and J. Coello and E. Fol and L. Malina},
80-
year = 2018,
81-
eprint = {2006.10661},
82-
archiveprefix = {arXiv},
83-
primaryclass = {physics.acc-ph}
78+
archiveprefix = {arXiv},
79+
author = {R. Tomás and X. Buffat and J. Coello and E. Fol and L. Malina},
80+
eprint = {2006.10661},
81+
primaryclass = {physics.acc-ph},
82+
title = {Imperfections and corrections},
83+
year = 2018
84+
}
85+
86+
@article{Carlier:AccuracyFeasibilityMeasurement2017,
87+
author = {Carlier, F. and Tomás, R.},
88+
doi = {10.1103/PhysRevAccelBeams.20.011005},
89+
journal = {Phys. Rev. ST Accel. Beams},
90+
journaltitle = {Physical Review Accelerators and Beams},
91+
title = {Accuracy and Feasibility of the β * Measurement for {{LHC}} and {{High Luminosity LHC}} Using k Modulation},
92+
year = {2017}
8493
}

docs/release.rst

+30
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,36 @@ Release Notes
33

44
The full list of releases can be found in the Github repository's `releases page <https://github.com/fsoubelet/PyhDToolkit/releases>`_.
55

6+
.. _release_0.18.0:
7+
8+
0.18.0
9+
------
10+
11+
Enhancements
12+
~~~~~~~~~~~~
13+
14+
* The `pyhdtoolkit.utils._misc` module has a new function, `~pyhdtoolkit.utils._misc.add_markers_around_lhc_ip` to add `MAD-X` markers around a given IP in order to increase the resolution of the TWISS calls in the IP vicinity.
15+
* The `pyhdtoolkit.utils._misc` module has a new function, `~pyhdtoolkit.utils._misc.get_lhc_ips_positions`, to determine the longitudinal position (S variable) of LHC IPs from a dataframe.
16+
* The `pyhdtoolkit.utils._misc` module has a new function, `~pyhdtoolkit.utils._misc.draw_ip_locations`, to add labels with the location of LHC IPs to a given `~matplotlib.axes.Axes` object.
17+
* The `LHC Rigid Waist Shift` gallery has been improved, and now shows a visualization of the waist shift and two ways to calculate its value.
18+
19+
Bug Fixes
20+
~~~~~~~~~
21+
22+
* The `~pyhdtoolkit.cpymadtools.orbit.lhc_orbit_variables` function does not return a wrong `on_phi_IR5` variable anymore.
23+
24+
Maintenance
25+
~~~~~~~~~~~
26+
27+
* The dependency on `matplotlib` has been pinned to `<3.5` to avoid issues with the documentation plot style, to be fixed later on.
28+
* The bibliography file for the package's documentation has been cleaned up.
29+
* The Github icon in the documentation pages now redirects to the proper pages.
30+
* The documentation for the `~pyhdtoolkit.maths.nonconvex_phase_sync` has been improved.
31+
* Some additional files necessary for the documentation additions are now included in the repo, but not the package.
32+
33+
See `v0.18.0 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/0.18.0>`_ and the `full changes since v0.17.0 <https://github.com/fsoubelet/PyhDToolkit/compare/0.17.0...0.18.0>`_.
34+
35+
636
.. _release_0.17.0:
737

838
0.17.0

examples/README.rst

100644100755
File mode changed.

0 commit comments

Comments
 (0)