Skip to content

Commit

Permalink
Release 1.2.0 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet authored Mar 10, 2023
1 parent e538dc0 commit 825c782
Show file tree
Hide file tree
Showing 72 changed files with 3,655 additions and 804 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Continous Integration Workflows
# Continuous Integration Workflows

This package implements different workflows for CI.
They are organised as follows.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: python -m pip install ".[test]"

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

- name: Run all tests
run: make alltests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", 3.x] # crons should always run latest python hence 3.x
python-version: [3.8, 3.9, "3.10", "3.11", 3.x] # crons should always run latest python hence 3.x
# exclude:
# - os: windows-latest # scipy deps issues
# python-version: "3.10"
Expand All @@ -42,7 +42,7 @@ jobs:
run: python -m pip install ".[test]"

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

- name: Run Tests
run: make alltests
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

# Upload artifacts if in PR so reviewers can have a quick look without building documentation from the branch locally
- name: Upload build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: success() && github.event_name == 'pull_request' # only for pushes in PR
with:
name: site-build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10", "3.11"]
fail-fast: false

steps:
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10", "3.11"]
fail-fast: false

steps:
Expand All @@ -59,7 +59,7 @@ jobs:
run: python -m pip install ".[test]"

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

- name: Run Tests
run: make slowtests
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@

import pyhdtoolkit

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

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

# Config for autosectionlabel extension
Expand Down
12 changes: 10 additions & 2 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@ Release Notes

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

Version 1.2.0
-------------

.. toctree::
:maxdepth: 2

releases/v1.2.0

Version 1.1.1
-------------

.. toctree::
:maxdepth: 2

releases/v1.1.1

Version 1.1.0
-------------

.. toctree::
:maxdepth: 2

releases/v1.1.0

Version 1.0.0
-------------

Expand Down
2 changes: 1 addition & 1 deletion docs/releases/v1.1.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Bug Fixes
* A few values in the available plotting settings were changed.


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>`_.
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>`_.
45 changes: 45 additions & 0 deletions docs/releases/v1.2.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. _release_1.2.0:

1.2.0
-----

Release `1.2.0` brings some new features and dependency changes.

Changes
~~~~~~~

* 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.

Enhancements
~~~~~~~~~~~~

* 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.
* The `pyhdtoolkit.plotting.utils` module has a new function, `~pyhdtoolkit.plotting.utils.draw_confidence_ellipse`, to plot the covariance ellipse of two arrays.
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function (and those relying on it) can now plot octupole patches.
* 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)`.
* 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`.
* 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`.
* 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`.
* 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.

Bug Fixes
~~~~~~~~~

* 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.
* The `pyhdtoolkit.plotting.layout.plot_machine_layout` function now tries to properly determine legend locations based on which elements were drawn.

Documentation
~~~~~~~~~~~~~

* The documentation generated by `Sphinx` should now properly display short type hints instead of the full expanded ones.
* Some example pages have been updated to use the minimal requirement of provided **args** for the functions in `~pyhdtoolkit.cpymadtools.matching`.
* Some typos that were left in a few docstrings have been corrected.

Maintenance
~~~~~~~~~~~

* The `madx` argument is now positional only in all APIs involving it (APIs in `~pyhdtoolkit.cpymadtools` and `~pyhdtoolkit.plotting`).
* The `~numpy` dependency is now capped at version `<1.24.0`, as when using this new version some `~matplotlib` functions are broken.
* 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`).

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>`_.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
! JMad export of model LHC 2022 optic R2022a_A11mC11mA10mL10m


call, file="acc-models-lhc/toolkit/zero-strengths.madx";
call, file="acc-models-lhc/strengths/ATS_Nominal/2022/ramp/ats_11m.madx";
call, file="acc-models-lhc/toolkit/reset-bump-flags.madx";
call, file="acc-models-lhc/toolkit/match-lumiknobs.madx";
call, file="acc-models-lhc/toolkit/generate-op-tune-knobs-ats.madx";
call, file="acc-models-lhc/toolkit/generate-op-chroma-knobs-ats.madx";
call, file="acc-models-lhc/toolkit/generate-op-coupling-knobs-ats.madx";
Loading

0 comments on commit 825c782

Please sign in to comment.