Skip to content

Commit f7c45a1

Browse files
authored
Linting PR (#179)
* need trailing line * alt tag in images * alt tag and spaces before code block * center figure * alt tag and lines in admonitions blocks * trailing line * empty lines and bullet lists linting * empty lines * empty lines * empty lines * trailing spaces * trailing spaces * fix todo * empty lines * define sshutle link * no kmod special as OP develops it now * remove from navigation too * alt text and center figures * trailing spaces * multiple empty lines, trailing spaces and eol at eof fixes in all logbook files * trailing spaces * eol at eof * trailing spaces * eol at eof * multiple empty lines, trailing spaces and eol at eof fixes * do not include weirdass AI pictures in the website * remove assets as well * alt tag and center figure * properly close center tag * html for figure * specify code fence language * multiple empty lines, trailing spaces and eol at eof fixes * multiple empty lines, trailing spaces and eol at eof fixes * eol at eof * eol at eof * explicitely refer to felix carlier * empty lines * empty lines * empty lines, alt tags and 2 spaces for highlighting * alt tags and centered * trailing spaces * eol at eof * trailing spaces * fix relative link * fix relative anchor links * fix relative anchor links * remove problematic anchor link * fix link for new kmod app * remove another broken anchor link * fix broken rel link since files move by josch * fix broken rel link since files move by josch * fix broken rel link since files move by josch * and refer to the proper tag * include alt tag for each image entry and reformat table * headers consistency and proper pip invocation command * eol at eof * spaces around code fences * empty lines * headers and list style * strip end space in code fence * spaces around code fences * trailing spaces and empty lines around code fence blocks * trailing spaces and headers consistency * proper pip invocation * and ref * and from navigation * eol at eof * trailing spaces and empty lines around code fence blocks * trailing spaces * trailing spaces * eol at eof and empty space around code block * eol at eof and empty space around code block * eol at eof and empty space around code block * trailing spaces * eol at eof * trailing spaces and empty lines around code fence blocks * empty lines * trailing spaces, empty lines, deduplicate headers * no punctuation in headers * eol at eof * little arrow last * use headers as the numbered list would reset anyway * remove trailing punctuation in header * empty lines * remove forgotten html artefact * imports sorting * imports sorting, quick formatting * minor typing, import future annotations * be explicit in what is replaced, via naming to avoid confusion. Type checker was complaining * a little type hinting * linting, formatting, eol at eof * ruff formatting again * future annotations * types and ruff formatting * escape pip * proper pip invocation * proper pip invocation
1 parent bf1029c commit f7c45a1

Some content is hidden

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

80 files changed

+519
-512
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Get a local copy of this repository, set up a `Python3.6+` environment and insta
1818

1919
```bash
2020
git clone https://github.com/pylhc/pylhc.github.io
21-
pip install mkdocs mkdocs-material mkdocs-minify-plugin
21+
python -m pip install mkdocs mkdocs-material mkdocs-minify-plugin
2222
```
2323

2424
Create a branch (from master) and make your changes.
-571 KB
Binary file not shown.
-292 KB
Binary file not shown.

docs/guis/about.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ The GUIs can be started from your development environment or via deployed `.jnlp
2323
- Latest [Beta-Beating production version][prod_bbgui]{target=_blank}.
2424
- Latest [Beta-Beating development version][dev_bbgui]{target=_blank}.
2525
- Complete [list of releases][releases_bbgui]{target=_blank}.
26-
26+
2727
=== "Kmod"
2828

2929
The K-modulations GUI is now a Python app published with `acc-py`, and can be run with:
30-
30+
3131
```bash
3232
/acc/local/share/python/acc-py/apps/acc-py-cli/pro/bin/acc-py app run pykmodlhc
3333
```
34-
34+
3535
=== "Multiturn"
3636

3737
- Latest [Multiturn production version][prod_mtgui]{target=_blank}.
@@ -123,14 +123,14 @@ Either fix the permissions on `afs` or ask someone to do so for you.
123123
[dev_mtgui]: https://bewww.cern.ch/ap/deployments-dev/applications/cern/lhc/lhc-multiturn/PRO/lhc-multiturn-lhc-multiturn.jnlp
124124
[releases_mtgui]: https://bewww.cern.ch/ap/deployments/applications/cern/lhc/lhc-multiturn/
125125

126-
[prod_kmodgui]: https://bewww.cern.ch/ap/deployments/applications/cern/lhc/lhc-app-kmod/PRO/lhc-app-kmod-lhc-app-kmod.jnlp
127-
[dev_kmodgui]: https://bewww.cern.ch/ap/deployments-dev/applications/cern/lhc/lhc-app-kmod/PRO/lhc-app-kmod-lhc-app-kmod.jnlp
126+
[prod_kmodgui]: https://bewww.cern.ch/ap/deployments/applications/cern/lhc/lhc-app-kmod/PRO/lhc-app-kmod-lhc-app-kmod.jnlp
127+
[dev_kmodgui]: https://bewww.cern.ch/ap/deployments-dev/applications/cern/lhc/lhc-app-kmod/PRO/lhc-app-kmod-lhc-app-kmod.jnlp
128128
[releases_kmodgui]: https://bewww.cern.ch/ap/deployments/applications/cern/lhc/lhc-app-kmod/
129129

130130
[jws_confluence]: https://wikis.cern.ch/display/DVTLS/jws+-+a+replacement+for+javaws
131131
[jws]: https://wikis.cern.ch/display/DVTLS/jws+-+a+replacement+for+javaws
132132

133-
[mounting_resources]: ../howto/setup/shared_filesystems.md#mounting-tn-resources-on-gn-machines
134-
[connect_gpn]: ../howto/teleworking/access.md#accessing-cern-internal-websites
135-
[sshuttle_method]: ../howto/setup/guis.md#running-guis-locally
133+
[mounting_resources]: ../resources/shared_filesystems.md#mounting-tn-resources-on-gpn-and-other-machines
134+
[connect_gpn]: ../resources/remote_access.md#accessing-cern-internal-websites
135+
[sshuttle_method]: usage/remote.md#running-guis-locally
136136
[jws_calls]: ../resources/links.md#jws-programs

docs/guis/betabeat/ampdet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Amplitude Detuning Analysis
1+
# Amplitude Detuning Analysis

docs/guis/betabeat/analysis_panel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ It should prevent the appearance of unphysical spikes in the optics functions wh
2323
Isolation Forest perfroms anomaly detection on the whole set of selected measurements data.
2424
Clicking on "Detect and remove bad BPMs"-button triggers an external python script which analyses the selected files.
2525
The output file is written in the TFS format and contains the list of detected bad BPMs is written to the folder of the first selected measurement in the analysis table.
26-
26+
2727
The output can be found in: `Measurements/.../bad_bpms_iforest_{x,y}`.
2828

2929
During IF-cleaning, the lines corresponding to detected faulty BPMs will be removed from the lin-files.
@@ -33,7 +33,7 @@ After cleaning is finished, the optics function can be computed from the harmoni
3333

3434
<figure>
3535
<center>
36-
<img src="../../assets/images/analysis_panel_cleaning.png" width="65%" />
36+
<img src="../../assets/images/analysis_panel_cleaning.png" width="65%" alt="Cleaning before optics analysis" />
3737
<figcaption> Cleaning before optics analysis </figcaption>
3838
</center>
3939
</figure>

docs/guis/betabeat/beam_selection.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# The Beam Selection Window
22

33
<figure>
4-
<img src="../../assets/images/betabeat_gui/beam_selection.png" width="100%" />
4+
<center>
5+
<img src="../../assets/images/betabeat_gui/beam_selection.png" width="100%" alt="The beam selection window" />
56
<figcaption>The Beam Selection Window.</figcaption>
7+
</center>
68
</figure>
79

810
The Beam Selection Window is your entry point to the GUI.
@@ -21,14 +23,19 @@ The options chosen here will also define the **folder-structure** you will be us
2123

2224
## Python Executable
2325

24-
In the Beam-Selection Window you need to give it a python-binary (e.g. `venv/bin/python`).
26+
In the Beam-Selection Window you need to give it a python-binary (e.g. `.venv/bin/python`).
2527
Best would be if you have a local virtual environment.
2628
This **needs to have omc3 installed as a package**.
27-
See [omc3 on github][omc3_github_getting_started]{target=_blank}.
29+
See [omc3 on github][omc3_github]{target=_blank}.
30+
2831
```bash
29-
pip install git+https://github.com/pylhc/omc3.git
32+
python -m pip install git+https://github.com/pylhc/omc3.git
3033
```
34+
3135
This is because python calls are now made by module, i.e.:
36+
3237
```bash
3338
python -m omc3.module arg1 arg2 ...
3439
```
40+
41+
[omc3_github]: https://github.com/pylhc/omc3

docs/guis/betabeat/bpm_panel.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The BPM panel provides a graphical interface to query and visualize information
44
It can load data files for all supported beams, mostly binary SDDS files or files in the SDDS ASCII format.
55

66
!!! todo
7+
78
Include a screenshot, possibly of settings when opening files?
89

910
## Opening Files and Applying SVD Cleaning
@@ -36,10 +37,10 @@ when SVD cleaning detects and removes bad BPMs, they will be marked in the BPM n
3637

3738
All the settings mentioned above can be changed in the global settings panel:
3839
<figure>
39-
<center>
40-
<img src="../../assets/images/cleaning_settings.png" width="95%" />
40+
<center>
41+
<img src="../../assets/images/cleaning_settings.png" width="95%" alt="Cleaning thresholds in the settings panel"/>
4142
<figcaption>Settings panel, where cleaning thresholds can be changed.</figcaption>
42-
</center>
43+
</center>
4344
</figure>
4445

4546
Turn-by-turn data cleaning is summarized in the output file which can be found at:
@@ -48,23 +49,24 @@ Turn-by-turn data cleaning is summarized in the output file which can be found a
4849
It contains BPM names and corresponding threshold which identified a BPM as faulty.
4950

5051
!!! note
52+
5153
A single BPM can appear twice (for each threshold separately), e.g. in the case of exact zero flat signal.
5254

5355
The content of the loaded files will be displayed in two charts:
5456

5557
- Horizontal BPMs,
5658
- Vertical BPMs.
5759

58-
5960
!!! todo
61+
6062
Include a screenshot with two BPM panels.
6163

6264
The charts are interactive and can be used to zoom in/out, or focus on a given rectangle of the shown data.
6365

6466
The charts can display either the measured amplitude values over turns for every BPM from the list or display the phase space, which is calculated by two consecutive BPMs.
6567

66-
6768
!!! todo
69+
6870
Include a screenshot of the bad bpms panel.
6971

7072
## Removing Turns and Computing an Average
@@ -74,21 +76,25 @@ The buttons on the top left side of the pane provide useful features to handle t
7476
- `Remove Turns` can be used to cut turns from the start or the end, to focus on a specified range of the data.
7577

7678
!!! todo
79+
7780
Include a screenshot of before-after comparison for `Remove Turns`.
7881

7982
- `Create Average` allows loading several data files too visualize their average repesentations on the same graph, which helps detecting differences or reducing noise.
8083

8184
!!! todo
85+
8286
Include a screenshot of `Create Average` effect.
8387

8488
- `Do Analysis` spawns the configuration dialogue for the external analysis.
8589
This will call an external program to perform harmonic analysis of the BPM data, in order to compute tunes and similar beam properties.
8690
The results from the analysis can be seen in the [Analysis Panel](analysis_panel.md).
8791

8892
!!! todo
93+
8994
Include of screenshot of `Do Analysis` dialogue window.
9095

9196
!!! note
97+
9298
The `Create Average` option requires synchronized data from withing the same bounds, otherwise the results will be meaningless.
9399
The figure below shows three runs from LHC beam one with synchronized peaks for every turn and their corresponding averages.
94100

docs/guis/betabeat/correction_panel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ By selecting one, the user can examine or visualize the values attributed to eac
3030
Include a screenshot of the Knob Panel view knobs table
3131

3232
!!! todo
33-
Include a screenshot of the Knob Panel view knobs chart
33+
Include a screenshot of the Knob Panel view knobs chart

docs/guis/betabeat/optics_panel.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
The `Optics Panel` provides graphical interface to compare the computed optics to the nominal model.
44
There are in total three main tabs for the optics panel:
55

6-
- The [Optics](#Optics Tab) tab, where a tree menu (on the left) provides many physical properties to be displayed.
7-
- The [Segment-by-Segment: Segment](#Segment-by-Segment: Segment Tab) tab, to have a look at properties in a pre-defined segment of the machine.
8-
- The [Segment-by-Segment: Element](#Segment-by-Segment: Element Tab) tab, to have a look at properties for a pre-defined list of elements in the machine.
6+
- The [Optics](#optics-tab) tab, where a tree menu (on the left) provides many physical properties to be displayed.
7+
- The [Segment-by-Segment: Segment](#segment-by-segment-segment-tab) tab, to have a look at properties in a pre-defined segment of the machine.
8+
- The [Segment-by-Segment: Element](#segment-by-segment-element-tab) tab, to have a look at properties for a pre-defined list of elements in the machine.
99

1010
## Optics Tab
1111

@@ -37,7 +37,7 @@ Clicking `Go` will call for another python script and take you to the `Segment-b
3737
## Segment-by-Segment: Element Tab
3838

3939
Pre-defined lists of elements can be selected to view properties across said elements.
40-
The working is similar to the one for different [segments](#Segment-by-Segment: Segment).
40+
The working is similar to the one for different [segments](#segment-by-segment-segment-tab).
4141

4242
!!! todo
4343
Include a screenshot of the element tab.
@@ -65,9 +65,8 @@ These files store the magnet names and corresponding correction strengths.
6565

6666
They are also displayed in the [Correction Panel](correction_panel.md).
6767

68-
6968
### Optics Plotting
7069

71-
* RDT and CRDT plots are added dynamically depending on the files present in the respective folders.
72-
* Nicer names and more structure in the tree.
73-
* Backend was rewritten, so it is now more modular and easier to add new plot-types.
70+
- RDT and CRDT plots are added dynamically depending on the files present in the respective folders.
71+
- Nicer names and more structure in the tree.
72+
- Backend was rewritten, so it is now more modular and easier to add new plot-types.

0 commit comments

Comments
 (0)