You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart.rst
+4-5
Original file line number
Diff line number
Diff line change
@@ -100,8 +100,7 @@ One can find many examples of the `~pyhdtoolkit.cpymadtools` apis' use in the :r
100
100
Utilities
101
101
^^^^^^^^^
102
102
103
-
The :ref:`utils <pyhdtoolkit-utils>` module contains useful functions to set up logging or
104
-
plotting :ref:`defaults <utils-defaults>`, run external programs through the :ref:`command line <utils-cmdline>`,
103
+
The :ref:`utils <pyhdtoolkit-utils>` module contains useful functions to set up (:ref:`logging <utils-logging>`, run external programs through the :ref:`command line <utils-cmdline>`,
105
104
run your functions through :ref:`useful contexts <utils-contexts>`, easily wrap and :ref:`parallelise <utils-executors>`
106
105
functions, or perform many convenient :ref:`operations <utils-operations>` on miscellaneous Python objects.
107
106
@@ -125,12 +124,12 @@ Alternatively one can easily parallelise an I/O-intensive function through multi
125
124
)
126
125
127
126
.. tip::
128
-
A useful tidbit is this line which sets up the logging level for functions in the package:
127
+
A useful tidbit is the following which sets up the logging level for functions in the package:
129
128
130
129
.. prompt:: python >>>
131
130
132
-
from pyhdtoolkit.utils import defaults
133
-
defaults.config_logger(level="trace") # the lowest level used, will give ALL logging
131
+
from pyhdtoolkit.utils import logging
132
+
logging.config_logger(level="trace") # the lowest level used, will give ALL logging
Copy file name to clipboardExpand all lines: docs/releases/v1.0.0.rst
+7-2
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
-----
5
5
6
6
Release `1.0.0` brings many breaking changes.
7
-
Be sure to read these release notes carefully before upgrading, as much of the code using ``pyhdtoolki`` will need to be adapted.
7
+
Be sure to read these release notes carefully before upgrading, as much of the code using ``pyhdtoolkit`` will need to be adapted.
8
8
9
9
Breaking Changes
10
10
~~~~~~~~~~~~~~~~
@@ -14,23 +14,28 @@ Breaking Changes
14
14
* The `~pyhdtoolkit.plotting.helpers` module has been renamed to `~pyhdtoolkit.plotting.utils` for consistency.
15
15
* The `~pyhdtoolkit.plotting.sbs.utils` module has been merged into `~pyhdtoolkit.plotting.utils`.
16
16
* The `~pyhdtoolkit.cpymadtools.plotters.DynamicAperture` functionality has been completely removed.
17
+
* The `~pyhdtoolkit.utils.defaults` module has been removed, and its functionality transferred in the relevant (new) places.
17
18
18
19
Enhancements
19
20
~~~~~~~~~~~~
20
21
21
22
* The machine layout plotting functionality has been made public api in a dedicated module, `~pyhdtoolkit.plotting.layout`.
22
23
* A new module has been added to the `~pyhdtoolkit.cpymadtools`, `~pyhdtoolkit.cpymadtools.setup`, with functions to conveniently set up a `~cpymad.madx.Madx` instance for either the Run 2 or Run 3 of the ``LHC``, also as a context manager.
23
24
* A new module has been added in `~pyhdtoolkit.plotting`, `~pyhdtoolkit.plotting.layout`, to make public the API to plot a machine's element onto an axis.
25
+
* A new module has been added in `~pyhdtoolkit.utils`, `~pyhdtoolkit.utils.logging`, to host the logging setup functionality that was previously in `~pyhdtoolkit.utils.defaults`.
26
+
* A new module has been added in `~pyhdtoolkit.plotting`, `~pyhdtoolkit.plotting.styles`, with various useful styles definitions and the functionality to install them locally.
24
27
* New function in `~pyhdtoolkit.cpymadtools.lhc`, `~pyhdtoolkit.cpymadtools.lhc.add_markers_around_lhc_ip`, to do exactly that, for high granularity of calculations around the IP point.
25
28
* New function in `~pyhdtoolkit.cpymadtools.lhc`, `~pyhdtoolkit.cpymadtools.lhc.get_sizes_at_ip`, to compute horizontal and vertical beam sizes at a given IP through ``Ripken`` parameters, which will be accurate in the presence of coupling.
26
29
* New function in `~pyhdtoolkit.plotting.utils`, `~pyhdtoolkit.plotting.utils.get_lhc_ips_positions`, to get a `dict` of different IP elements and their ``S`` coordinates.
27
30
* New function in `~pyhdtoolkit.plotting.utils`, `~pyhdtoolkit.plotting.utils.draw_ip_locations`, to highlight the positions of given IPs onto the current axis as vertical lines, potentially also writing out their names.
28
31
* The element plotting functionality handled by `~pyhdtoolkit.plotting.layout.plot_machine_layout` now determines reasonable default ``ylimits`` if none were provided. This allowed removing hardcoded default values of these limits, and should help get a good looking plot for any machine by default.
32
+
* The `~pyhdtoolkit.cpymadtools.lhc.make_lhc_beams` function can now handle the ``bv`` flag in case the user is trying to set up for tracking with B2 (which needs loading **lhcb4** and a different bv flag).
33
+
* The `config_logger` function, now in `~pyhdtoolkit.utils.logging`, now accepts custom formats and three default formats are provided in the module.
29
34
30
35
Maintenance
31
36
~~~~~~~~~~~
32
37
33
-
* Documentation has been updated. Refer to the gallery for example uses.
38
+
* Documentation has been updated for all new APIs. Refer to the gallery for example uses.
34
39
* Tests have been adapted.
35
40
36
41
See `v1.0.0 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/1.0.0>`_ and the `full changes since v0.21.0 <https://github.com/fsoubelet/PyhDToolkit/compare/0.21.0...1.0.0>`_.
0 commit comments