Skip to content

Commit 825c782

Browse files
authored
Release 1.2.0 (#101)
1 parent e538dc0 commit 825c782

File tree

72 files changed

+3655
-804
lines changed

Some content is hidden

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

72 files changed

+3655
-804
lines changed

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Continous Integration Workflows
1+
# Continuous Integration Workflows
22

33
This package implements different workflows for CI.
44
They are organised as follows.

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: python -m pip install ".[test]"
3535

3636
- name: Get acc-models-lhc
37-
run: git clone https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
37+
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
3838

3939
- name: Run all tests
4040
run: make alltests

.github/workflows/cron.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
19-
python-version: [3.8, 3.9, "3.10", 3.x] # crons should always run latest python hence 3.x
19+
python-version: [3.8, 3.9, "3.10", "3.11", 3.x] # crons should always run latest python hence 3.x
2020
# exclude:
2121
# - os: windows-latest # scipy deps issues
2222
# python-version: "3.10"
@@ -42,7 +42,7 @@ jobs:
4242
run: python -m pip install ".[test]"
4343

4444
- name: Get acc-models-lhc
45-
run: git clone https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
45+
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
4646

4747
- name: Run Tests
4848
run: make alltests

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
# Upload artifacts if in PR so reviewers can have a quick look without building documentation from the branch locally
5858
- name: Upload build artifacts
59-
uses: actions/upload-artifact@v2
59+
uses: actions/upload-artifact@v3
6060
if: success() && github.event_name == 'pull_request' # only for pushes in PR
6161
with:
6262
name: site-build

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
19-
python-version: [3.8, 3.9, "3.10"]
19+
python-version: [3.8, 3.9, "3.10", "3.11"]
2020
fail-fast: false
2121

2222
steps:
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
45-
python-version: [3.8, 3.9, "3.10"]
45+
python-version: [3.8, 3.9, "3.10", "3.11"]
4646
fail-fast: false
4747

4848
steps:
@@ -59,7 +59,7 @@ jobs:
5959
run: python -m pip install ".[test]"
6060

6161
- name: Get acc-models-lhc
62-
run: git clone https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
62+
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
6363

6464
- name: Run Tests
6565
run: make slowtests

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636

3737
import pyhdtoolkit
3838

39+
# This is to tell Sphinx how to print some specific type annotations
40+
# See: https://stackoverflow.com/a/67483317
41+
# See: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases
42+
autodoc_type_aliases = {"ArrayLike": "ArrayLike"}
3943

4044
# To use SVG outputs when scraping matplotlib figures for the sphinx-gallery
4145
class matplotlib_svg_scraper(object):
@@ -144,6 +148,7 @@ def __call__(self, *args, **kwargs):
144148
"sphinx_panels", # Create panels in a grid layout or as drop-downs
145149
"matplotlib.sphinxext.plot_directive", # Include a Matplotlib plot in a Sphinx document
146150
"sphinx-prompt", # prompt symbols will not be copy-pastable
151+
"sphinx_codeautolink", # Automatically link example code to documentation source
147152
]
148153

149154
# Config for autosectionlabel extension

docs/release.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ 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+
Version 1.2.0
7+
-------------
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
releases/v1.2.0
13+
614
Version 1.1.1
715
-------------
816

917
.. toctree::
1018
:maxdepth: 2
1119

1220
releases/v1.1.1
13-
21+
1422
Version 1.1.0
1523
-------------
1624

1725
.. toctree::
1826
:maxdepth: 2
1927

2028
releases/v1.1.0
21-
29+
2230
Version 1.0.0
2331
-------------
2432

docs/releases/v1.1.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ Bug Fixes
1313
* A few values in the available plotting settings were changed.
1414

1515

16-
See `v1.1.1 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/1.1.1>`_ and the `full changes since v1.0.0 <https://github.com/fsoubelet/PyhDToolkit/compare/1.1.0...1.1.1>`_.
16+
See `v1.1.1 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/1.1.1>`_ and the `full changes since v1.1.0 <https://github.com/fsoubelet/PyhDToolkit/compare/1.1.0...1.1.1>`_.

docs/releases/v1.2.0.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _release_1.2.0:
2+
3+
1.2.0
4+
-----
5+
6+
Release `1.2.0` brings some new features and dependency changes.
7+
8+
Changes
9+
~~~~~~~
10+
11+
* The `pyhdtoolkit.plotting.envelope` functions `plot_envelope` and `plot_stay_clear` have been removed. They are replaced by a new one, `plot_beam_envelope`, which handles all enveloppe calculations directly from the `MAD-X` instance. Documentation and examples have been updated.
12+
13+
Enhancements
14+
~~~~~~~~~~~~
15+
16+
* The `pyhdtoolkit.plotting.aperture` module has a new function, `~pyhdtoolkit.plotting.aperture.plot_physical_apertures`, to try and plot the physical apertures of elements on the given axis.
17+
* The `pyhdtoolkit.plotting.utils` module has a new function, `~pyhdtoolkit.plotting.utils.draw_confidence_ellipse`, to plot the covariance ellipse of two arrays.
18+
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function (and those relying on it) can now plot octupole patches.
19+
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function (and those relying on it) can now handle single values given for ylimits of different elements in the machine layout. For instance now `k1l_lim=5e-2` is valid and equivalent to `k1l_lim=(-5e-2, 5e-2)`.
20+
* An experimental utility function was added to split a complex-valued columns from a dataframe into two real-valued ones. It might join the public API in a future release, and is for now available as `~pyhdtoolkit.utils._misc.split_complex_columns`.
21+
* An experimental utility function was added to add noise to the ``LHC`` *IR* BPMs in a given dataframe column. It might join the public API in a future release, and is for now available as `~pyhdtoolkit.utils._misc.add_noise_to_ir_bpms`.
22+
* An experimental utility function was added to add noise to the ``LHC`` *arc* BPMs in a given dataframe column. It might join the public API in a future release, and is for now available as `~pyhdtoolkit.utils._misc.add_noise_to_arc_bpms`.
23+
* The functions in the `pyhdtoolkit.cpymadtools.ptc` module can now be given values for the ``PTC`` universe creation and called commands parameters through keyword arguments. The documentation has been updated with information on the available parameters.
24+
25+
Bug Fixes
26+
~~~~~~~~~
27+
28+
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function now only adds a legend for element patches of a certain type if at least one element was drawn.
29+
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function now tries to properly determine legend locations based on which elements were drawn.
30+
31+
Documentation
32+
~~~~~~~~~~~~~
33+
34+
* The documentation generated by `Sphinx` should now properly display short type hints instead of the full expanded ones.
35+
* Some example pages have been updated to use the minimal requirement of provided **args** for the functions in `~pyhdtoolkit.cpymadtools.matching`.
36+
* Some typos that were left in a few docstrings have been corrected.
37+
38+
Maintenance
39+
~~~~~~~~~~~
40+
41+
* The `madx` argument is now positional only in all APIs involving it (APIs in `~pyhdtoolkit.cpymadtools` and `~pyhdtoolkit.plotting`).
42+
* The `~numpy` dependency is now capped at version `<1.24.0`, as when using this new version some `~matplotlib` functions are broken.
43+
* Various type hints from the `typing` module, such as `Dict` or `List`, have been superseeded by the default, now-standard builtins (such as `dict` or `list`).
44+
45+
See `v1.2.0 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/1.2.0>`_ and the `full changes since v1.1.1 <https://github.com/fsoubelet/PyhDToolkit/compare/1.1.1...1.2.0>`_.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
! JMad export of model LHC 2022 optic R2022a_A11mC11mA10mL10m
2+
3+
4+
call, file="acc-models-lhc/toolkit/zero-strengths.madx";
5+
call, file="acc-models-lhc/strengths/ATS_Nominal/2022/ramp/ats_11m.madx";
6+
call, file="acc-models-lhc/toolkit/reset-bump-flags.madx";
7+
call, file="acc-models-lhc/toolkit/match-lumiknobs.madx";
8+
call, file="acc-models-lhc/toolkit/generate-op-tune-knobs-ats.madx";
9+
call, file="acc-models-lhc/toolkit/generate-op-chroma-knobs-ats.madx";
10+
call, file="acc-models-lhc/toolkit/generate-op-coupling-knobs-ats.madx";

0 commit comments

Comments
 (0)