diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6267c64..a3454a4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,4 +13,5 @@ jobs: with: src-dir: pylhc pytest-options: -m "not cern_network" --mpl + min-coverage: 0.33 # todo: remove if we ever get >80% secrets: inherit diff --git a/CHANGELOG.md b/CHANGELOG.md index c05a36f..7aeed8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # pylhc Changelog +## Version 0.8.2 + +Dropped support for `Python 3.9`. + +## Version 0.8.1 + +Fixed: + - add FILL and JSON_FILE to output table of kickgroup summary + - catch empty kickgroups gracefully + - adapt for moving the `.sdds` and `.json` files to backup folders on `nfs` + - addtional checks/warning/dict-keys for old versions of the `.json` files + ## Version 0.8.0 Fixed: @@ -19,7 +31,7 @@ Changes in Machine Settings Info - Option `["default"]` available for default knobs. - Additional debug logging -## Version 0.7.3 +## Version 0.7.3 Fixes: - LSA to MADX sign convention @@ -65,11 +77,11 @@ Minor bugfixes in `machine_settings_info`. - Added: - `time` and `start_time` can now be given as `AccDatetime`-objects. - + - Fixed: - - `trims` variable is initialized as `None`. Was not initialized if no + - `trims` variable is initialized as `None`. Was not initialized if no trims were found, but used later on. - + ## Version 0.4.0 @@ -95,8 +107,8 @@ Added: Changed: - The package's license has been moved from `GPLv3` to `MIT`. -Note: if one wishes to extend the `IRNL` correction script to a different accelerator, -there are valuable pointers in the following +Note: if one wishes to extend the `IRNL` correction script to a different accelerator, +there are valuable pointers in the following [PR comment](https://github.com/pylhc/PyLHC/pull/74#issuecomment-966212021). @@ -122,7 +134,7 @@ Removed: - Added: - `python2` parameter for autosix. - + - Changed: - Bugfix for non-unique column names when indexing (`forced_da_analysis`) diff --git a/README.md b/README.md index 7f3c5ec..43711e6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -# PyLHC Tools +# omc3 logo PyLHC Tools -[![Cron Testing](https://github.com/pylhc/PyLHC/workflows/Cron%20Testing/badge.svg)](https://github.com/pylhc/PyLHC/actions?query=workflow%3A%22Cron+Testing%22) -[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/PyLHC.svg?style=popout)](https://codeclimate.com/github/pylhc/PyLHC) -[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/PyLHC.svg?style=popout)](https://codeclimate.com/github/pylhc/PyLHC) +[![Tests](https://github.com/pylhc/PyLHC/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/PyLHC/actions/workflows/coverage.yml) [![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/PyLHC.svg?style=popout)](https://github.com/pylhc/PyLHC/) +[![PyPI Version](https://img.shields.io/pypi/v/PyLHC?label=PyPI&logo=pypi)](https://pypi.org/project/PyLHC/) [![GitHub release](https://img.shields.io/github/release/pylhc/PyLHC.svg?style=popout)](https://github.com/pylhc/PyLHC/) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5643602.svg)](https://doi.org/10.5281/zenodo.5643602) @@ -18,6 +17,7 @@ It is a collection of useful scripts for the Optics Measurements and Corrections ## Installing This package is `Python 3.7+` compatible, and can be installed through `pip`: + ```bash python -m pip install pylhc ``` @@ -25,6 +25,7 @@ python -m pip install pylhc After installing, scripts can be run with either `python -m pylhc.SCRIPT --FLAG ARGUMENT` or by calling the Python files directly. For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies: + ```bash git clone https://github.com/pylhc/pylhc python -m pip install --editable "pylhc[all]" diff --git a/pylhc/__init__.py b/pylhc/__init__.py index bc95d96..89ca177 100644 --- a/pylhc/__init__.py +++ b/pylhc/__init__.py @@ -11,7 +11,7 @@ __title__ = "pylhc" __description__ = "An accelerator physics script collection for the OMC team at CERN." __url__ = "https://github.com/pylhc/pylhc" -__version__ = "0.8.1" +__version__ = "0.8.2" __author__ = "pylhc" __author_email__ = "pylhc@github.com" __license__ = "MIT" diff --git a/pyproject.toml b/pyproject.toml index cde78c4..7e11954 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ authors = [ ] license = "MIT" dynamic = ["version"] -requires-python = ">=3.9" +requires-python = ">=3.10" classifiers = [ "Intended Audience :: Science/Research", @@ -32,10 +32,11 @@ classifiers = [ "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", @@ -89,10 +90,24 @@ changelog = "https://github.com/pylhc/PyLHC/blob/master/CHANGELOG.md" markers = [ "cern_network: tests that require access to afs or the technical network", ] + +addopts = [ + "--import-mode=importlib", +] + # Helpful for pytest-debugging (leave commented out on commit): # log_cli=true # log_level=DEBUG +[tool.coverage.run] +relative_files = true + +[tool.coverage.report] +exclude_also = [ + "if TYPE_CHECKING:", # do not count if TYPE_CHECKING block imports (ignored at runtime) for coverage + "except ImportError:", # do not count missing optional dependencies set to None, we monkeypatch and test that +] + # ----- Dev Tools Configuration ----- # [tool.ruff]