Skip to content

Commit 2d5ab32

Browse files
authored
Maintenance and python 3.9 drop (#110)
1 parent cdad450 commit 2d5ab32

File tree

5 files changed

+43
-14
lines changed

5 files changed

+43
-14
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ jobs:
1313
with:
1414
src-dir: pylhc
1515
pytest-options: -m "not cern_network" --mpl
16+
min-coverage: 0.33 # todo: remove if we ever get >80%
1617
secrets: inherit

CHANGELOG.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# pylhc Changelog
22

3+
## Version 0.8.2
4+
5+
Dropped support for `Python 3.9`.
6+
7+
## Version 0.8.1
8+
9+
Fixed:
10+
- add FILL and JSON_FILE to output table of kickgroup summary
11+
- catch empty kickgroups gracefully
12+
- adapt for moving the `.sdds` and `.json` files to backup folders on `nfs`
13+
- addtional checks/warning/dict-keys for old versions of the `.json` files
14+
315
## Version 0.8.0
416

517
Fixed:
@@ -19,7 +31,7 @@ Changes in Machine Settings Info
1931
- Option `["default"]` available for default knobs.
2032
- Additional debug logging
2133

22-
## Version 0.7.3
34+
## Version 0.7.3
2335

2436
Fixes:
2537
- LSA to MADX sign convention
@@ -65,11 +77,11 @@ Minor bugfixes in `machine_settings_info`.
6577

6678
- Added:
6779
- `time` and `start_time` can now be given as `AccDatetime`-objects.
68-
80+
6981
- Fixed:
70-
- `trims` variable is initialized as `None`. Was not initialized if no
82+
- `trims` variable is initialized as `None`. Was not initialized if no
7183
trims were found, but used later on.
72-
84+
7385

7486
## Version 0.4.0
7587

@@ -95,8 +107,8 @@ Added:
95107
Changed:
96108
- The package's license has been moved from `GPLv3` to `MIT`.
97109

98-
Note: if one wishes to extend the `IRNL` correction script to a different accelerator,
99-
there are valuable pointers in the following
110+
Note: if one wishes to extend the `IRNL` correction script to a different accelerator,
111+
there are valuable pointers in the following
100112
[PR comment](https://github.com/pylhc/PyLHC/pull/74#issuecomment-966212021).
101113

102114

@@ -122,7 +134,7 @@ Removed:
122134

123135
- Added:
124136
- `python2` parameter for autosix.
125-
137+
126138
- Changed:
127139
- Bugfix for non-unique column names when indexing (`forced_da_analysis`)
128140

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28"> PyLHC Tools
1+
# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28" alt="omc3 logo"> PyLHC Tools
22

3-
[![Cron Testing](https://github.com/pylhc/PyLHC/workflows/Cron%20Testing/badge.svg)](https://github.com/pylhc/PyLHC/actions?query=workflow%3A%22Cron+Testing%22)
4-
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/PyLHC.svg?style=popout)](https://codeclimate.com/github/pylhc/PyLHC)
5-
[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/PyLHC.svg?style=popout)](https://codeclimate.com/github/pylhc/PyLHC)
3+
[![Tests](https://github.com/pylhc/PyLHC/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/PyLHC/actions/workflows/coverage.yml)
64
[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/PyLHC.svg?style=popout)](https://github.com/pylhc/PyLHC/)
5+
[![PyPI Version](https://img.shields.io/pypi/v/PyLHC?label=PyPI&logo=pypi)](https://pypi.org/project/PyLHC/)
76
[![GitHub release](https://img.shields.io/github/release/pylhc/PyLHC.svg?style=popout)](https://github.com/pylhc/PyLHC/)
87
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5643602.svg)](https://doi.org/10.5281/zenodo.5643602)
98

@@ -18,13 +17,15 @@ It is a collection of useful scripts for the Optics Measurements and Corrections
1817
## Installing
1918

2019
This package is `Python 3.7+` compatible, and can be installed through `pip`:
20+
2121
```bash
2222
python -m pip install pylhc
2323
```
2424

2525
After installing, scripts can be run with either `python -m pylhc.SCRIPT --FLAG ARGUMENT` or by calling the Python files directly.
2626

2727
For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies:
28+
2829
```bash
2930
git clone https://github.com/pylhc/pylhc
3031
python -m pip install --editable "pylhc[all]"

pylhc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
__title__ = "pylhc"
1212
__description__ = "An accelerator physics script collection for the OMC team at CERN."
1313
__url__ = "https://github.com/pylhc/pylhc"
14-
__version__ = "0.8.1"
14+
__version__ = "0.8.2"
1515
__author__ = "pylhc"
1616
__author_email__ = "[email protected]"
1717
__license__ = "MIT"

pyproject.toml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ authors = [
2424
]
2525
license = "MIT"
2626
dynamic = ["version"]
27-
requires-python = ">=3.9"
27+
requires-python = ">=3.10"
2828

2929
classifiers = [
3030
"Intended Audience :: Science/Research",
3131
"License :: OSI Approved :: MIT License",
3232
"Natural Language :: English",
3333
"Operating System :: OS Independent",
3434
"Programming Language :: Python :: 3 :: Only",
35-
"Programming Language :: Python :: 3.9",
3635
"Programming Language :: Python :: 3.10",
3736
"Programming Language :: Python :: 3.11",
3837
"Programming Language :: Python :: 3.12",
38+
"Programming Language :: Python :: 3.13",
39+
"Programming Language :: Python :: 3.14",
3940
"Programming Language :: Python :: Implementation :: CPython",
4041
"Topic :: Scientific/Engineering",
4142
"Topic :: Software Development :: Libraries :: Python Modules",
@@ -89,10 +90,24 @@ changelog = "https://github.com/pylhc/PyLHC/blob/master/CHANGELOG.md"
8990
markers = [
9091
"cern_network: tests that require access to afs or the technical network",
9192
]
93+
94+
addopts = [
95+
"--import-mode=importlib",
96+
]
97+
9298
# Helpful for pytest-debugging (leave commented out on commit):
9399
# log_cli=true
94100
# log_level=DEBUG
95101

102+
[tool.coverage.run]
103+
relative_files = true
104+
105+
[tool.coverage.report]
106+
exclude_also = [
107+
"if TYPE_CHECKING:", # do not count if TYPE_CHECKING block imports (ignored at runtime) for coverage
108+
"except ImportError:", # do not count missing optional dependencies set to None, we monkeypatch and test that
109+
]
110+
96111
# ----- Dev Tools Configuration ----- #
97112

98113
[tool.ruff]

0 commit comments

Comments
 (0)