From 260bf9b7d258ebae1a6c207580b38afc02644f1a Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 26 Aug 2022 13:34:00 -0700 Subject: [PATCH 1/5] Add v23 release notes --- doc/changes/DM-31721.feature.rst | 1 - doc/lsst.utils/CHANGES.rst | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 doc/changes/DM-31721.feature.rst diff --git a/doc/changes/DM-31721.feature.rst b/doc/changes/DM-31721.feature.rst deleted file mode 100644 index 74d0bebf..00000000 --- a/doc/changes/DM-31721.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Moved all C++ code out of this package and into ``cpputils`` package and changed license to BSD 3-clause. diff --git a/doc/lsst.utils/CHANGES.rst b/doc/lsst.utils/CHANGES.rst index 0dc8b495..19c20be0 100644 --- a/doc/lsst.utils/CHANGES.rst +++ b/doc/lsst.utils/CHANGES.rst @@ -1,3 +1,8 @@ +lsst_utils v23.0.0 2021-09-27 +============================= + +- Moved all C++ code out of this package and into ``cpputils`` package and changed license to BSD 3-clause. (`DM-31721 `_) + lsst.utils v22.0 (2021-07-09) ============================= From 9fa67d93b9235264a7efd0db019712405dd10d8a Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 26 Aug 2022 14:07:06 -0700 Subject: [PATCH 2/5] Add v24.0.0 release notes --- doc/changes/DM-20970.api.rst | 2 -- doc/changes/DM-29370.feature.rst | 1 - doc/changes/DM-29701.api.rst | 2 -- doc/changes/DM-31141.feature.rst | 1 - doc/changes/DM-31722.feature.rst | 8 ----- doc/changes/DM-32142.feature.rst | 1 - doc/changes/DM-32408.feature.rst | 1 - doc/changes/DM-32661.perf.rst | 1 - doc/changes/DM-33331.feature.rst | 1 - doc/changes/DM-33403.feature.rst | 2 -- doc/changes/DM-33622.feature.rst | 4 --- doc/changes/DM-33919.feature.rst | 1 - doc/changes/DM-33934.api.rst | 1 - doc/changes/DM-34208.feature.rst | 1 - doc/lsst.utils/CHANGES.rst | 54 +++++++++++++++++++++++++++++--- 15 files changed, 50 insertions(+), 31 deletions(-) delete mode 100644 doc/changes/DM-20970.api.rst delete mode 100644 doc/changes/DM-29370.feature.rst delete mode 100644 doc/changes/DM-29701.api.rst delete mode 100644 doc/changes/DM-31141.feature.rst delete mode 100644 doc/changes/DM-31722.feature.rst delete mode 100644 doc/changes/DM-32142.feature.rst delete mode 100644 doc/changes/DM-32408.feature.rst delete mode 100644 doc/changes/DM-32661.perf.rst delete mode 100644 doc/changes/DM-33331.feature.rst delete mode 100644 doc/changes/DM-33403.feature.rst delete mode 100644 doc/changes/DM-33622.feature.rst delete mode 100644 doc/changes/DM-33919.feature.rst delete mode 100644 doc/changes/DM-33934.api.rst delete mode 100644 doc/changes/DM-34208.feature.rst diff --git a/doc/changes/DM-20970.api.rst b/doc/changes/DM-20970.api.rst deleted file mode 100644 index a10dcc2a..00000000 --- a/doc/changes/DM-20970.api.rst +++ /dev/null @@ -1,2 +0,0 @@ -The values for max resident set size stored in metadata are now consistently reported as bytes. -Previously the units were platform specific (kibibytes on Liux and bytes on macOS). diff --git a/doc/changes/DM-29370.feature.rst b/doc/changes/DM-29370.feature.rst deleted file mode 100644 index f5c51599..00000000 --- a/doc/changes/DM-29370.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add option to ignore NaNs in ``lsst.utils.tests.assertFloatsAlmostEqual``. diff --git a/doc/changes/DM-29701.api.rst b/doc/changes/DM-29701.api.rst deleted file mode 100644 index 531abf88..00000000 --- a/doc/changes/DM-29701.api.rst +++ /dev/null @@ -1,2 +0,0 @@ -``deprecate_pybind11`` now requires a ``version`` parameter. -This matches the upstream requirement from ``deprecated.deprecated`` diff --git a/doc/changes/DM-31141.feature.rst b/doc/changes/DM-31141.feature.rst deleted file mode 100644 index 9d0fc931..00000000 --- a/doc/changes/DM-31141.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add test decorators to operate on cartesian product. diff --git a/doc/changes/DM-31722.feature.rst b/doc/changes/DM-31722.feature.rst deleted file mode 100644 index 388316e2..00000000 --- a/doc/changes/DM-31722.feature.rst +++ /dev/null @@ -1,8 +0,0 @@ -* Several new packages added from ``pipe_base`` and ``daf_butler``: - * ``lsst.utils.timer`` - * ``lsst.utils.classes`` - * ``lsst.utils.introspection`` - * ``lsst.utils.iteration`` - * ``lsst.utils.logging`` -* Added ``lsst.utils.doImportType`` to import a python type from a string and guaranteeing it is not a module. -* ``lsst.utils.get_caller_name`` is now deprecated in its current location and has been relocated to ``lsst.utils.introspection``. diff --git a/doc/changes/DM-32142.feature.rst b/doc/changes/DM-32142.feature.rst deleted file mode 100644 index ad020058..00000000 --- a/doc/changes/DM-32142.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add `lsst.logging.set_trace_at` to control TRACE loggers. diff --git a/doc/changes/DM-32408.feature.rst b/doc/changes/DM-32408.feature.rst deleted file mode 100644 index a5113182..00000000 --- a/doc/changes/DM-32408.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Builds using ``setuptools`` now calculate versions from the Git repository, including the use of alpha releases for those associated with weekly tags. diff --git a/doc/changes/DM-32661.perf.rst b/doc/changes/DM-32661.perf.rst deleted file mode 100644 index 28c5acfd..00000000 --- a/doc/changes/DM-32661.perf.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed an optimization when using `lsst.utils.TemplateMeta` classes with `isintance` or `issubclass`. diff --git a/doc/changes/DM-33331.feature.rst b/doc/changes/DM-33331.feature.rst deleted file mode 100644 index 1c59123c..00000000 --- a/doc/changes/DM-33331.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Context manager time_this can now include memory usage in its report. diff --git a/doc/changes/DM-33403.feature.rst b/doc/changes/DM-33403.feature.rst deleted file mode 100644 index bc04f685..00000000 --- a/doc/changes/DM-33403.feature.rst +++ /dev/null @@ -1,2 +0,0 @@ -A new package `lsst.utils.packages` has been added to allow system package versions to be obtained. -This code has been relocated from ``lsst.base``. diff --git a/doc/changes/DM-33622.feature.rst b/doc/changes/DM-33622.feature.rst deleted file mode 100644 index 0f2c096a..00000000 --- a/doc/changes/DM-33622.feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -Add ``lsst.utils.threads`` for control of threads. -Use `lsst.utils.threads.disable_implicit_threading()` to disable implicit threading. -This function should be used in place of ``lsst.base.disableImplicitThreading()`` in all new code. -This package now depends on the `threadpoolctl` package. diff --git a/doc/changes/DM-33919.feature.rst b/doc/changes/DM-33919.feature.rst deleted file mode 100644 index 72116edd..00000000 --- a/doc/changes/DM-33919.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added a new class `lsst.utils.logging.PeriodicLogger` to allow a user to issue log messages after some time interval has elapsed. diff --git a/doc/changes/DM-33934.api.rst b/doc/changes/DM-33934.api.rst deleted file mode 100644 index 71d9d215..00000000 --- a/doc/changes/DM-33934.api.rst +++ /dev/null @@ -1 +0,0 @@ -Add parameter to `~lsst.utils.packages.getEnvironmentPackages` to return all EUPS packages rather than just those that are locally setup. diff --git a/doc/changes/DM-34208.feature.rst b/doc/changes/DM-34208.feature.rst deleted file mode 100644 index b5fa896b..00000000 --- a/doc/changes/DM-34208.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Added ``lsst.utils.logging.getTraceLogger`` to simplify the creation of a trace logger that uses a ``TRACEn`` prefix for the logger name. diff --git a/doc/lsst.utils/CHANGES.rst b/doc/lsst.utils/CHANGES.rst index 19c20be0..e76d1f19 100644 --- a/doc/lsst.utils/CHANGES.rst +++ b/doc/lsst.utils/CHANGES.rst @@ -1,9 +1,55 @@ -lsst_utils v23.0.0 2021-09-27 -============================= +lsst-utils v24.0.0 (2022-08-26) +=============================== + +New Features +------------ + +- Add option to ignore NaNs in ``lsst.utils.tests.assertFloatsAlmostEqual``. (`DM-29370 `_) +- Add test decorators to operate on cartesian product. (`DM-31141 `_) +- * Several new packages added from ``pipe_base`` and ``daf_butler``: + + * ``lsst.utils.timer`` + * ``lsst.utils.classes`` + * ``lsst.utils.introspection`` + * ``lsst.utils.iteration`` + * ``lsst.utils.logging`` + * Added ``lsst.utils.doImportType`` to import a python type from a string and guarantee it is not a module. + * ``lsst.utils.get_caller_name`` is now deprecated in its current location and has been relocated to ``lsst.utils.introspection``. (`DM-31722 `_) +- Add `lsst.logging.set_trace_at` to control ``TRACE``-level loggers. (`DM-32142 `_) +- Builds using ``setuptools`` now calculate versions from the Git repository, including the use of alpha releases for those associated with weekly tags. (`DM-32408 `_) +- Context manager ``lsst.utils.timer.time_this`` can now include memory usage in its report. (`DM-33331 `_) +- A new package `lsst.utils.packages` has been added to allow system package versions to be obtained. + This code has been relocated from ``lsst.base``. (`DM-33403 `_) +- Add ``lsst.utils.threads`` for control of threads. + Use `lsst.utils.threads.disable_implicit_threading()` to disable implicit threading. + This function should be used in place of ``lsst.base.disableImplicitThreading()`` in all new code. + This package now depends on the `threadpoolctl` package. (`DM-33622 `_) +- Added a new class `lsst.utils.logging.PeriodicLogger` to allow a user to issue log messages after some time interval has elapsed. (`DM-33919 `_) +- Added ``lsst.utils.logging.getTraceLogger`` to simplify the creation of a trace logger that uses a ``TRACEn`` prefix for the logger name. (`DM-34208 `_) + + +API Changes +----------- + +- The values for max resident set size stored in metadata are now consistently reported as bytes. + Previously the units were platform specific (kibibytes on Liux and bytes on macOS). (`DM-20970 `_) +- ``deprecate_pybind11`` now requires a ``version`` parameter. + This matches the upstream requirement from ``deprecated.deprecated`` (`DM-29701 `_) +- Add parameter to `~lsst.utils.packages.getEnvironmentPackages` to return all EUPS packages rather than just those that are locally setup. (`DM-33934 `_) + + +Performance Enhancement +----------------------- + +- Fixed an optimization when using `lsst.utils.TemplateMeta` classes with `isinstance` or `issubclass`. (`DM-32661 `_) + + +lsst-utils v23.0.0 (2021-09-27) +=============================== - Moved all C++ code out of this package and into ``cpputils`` package and changed license to BSD 3-clause. (`DM-31721 `_) -lsst.utils v22.0 (2021-07-09) +lsst-utils v22.0 (2021-07-09) ============================= Bug fix @@ -11,7 +57,7 @@ Bug fix * Error reporting in `~lsst.utils.doImport` has been improved. [DM-27638] -lsst.utils v21.0 (2020-12-08) +lsst-utils v21.0 (2020-12-08) ============================= New Features From 2f6b6e1e46001dbda4388846215c02a97f88cd54 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 26 Aug 2022 14:07:33 -0700 Subject: [PATCH 3/5] Change config for towncrier title --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b21ec0ff..f954d645 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" package_dir = "python" filename = "doc/lsst.utils/CHANGES.rst" directory = "doc/changes" - title_format = "lsst_utils {version} {project_date}" + title_format = "lsst-utils {version} ({project_date})" issue_format = "`{issue} `_" From 4d80dec2f5ff7bc94c03cba45c62344166fbb5ec Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 26 Aug 2022 14:13:52 -0700 Subject: [PATCH 4/5] Add codecov and pypi to README --- README.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index dac7a321..b66ed088 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,15 @@ -===== -utils -===== +========== +lsst-utils +========== -Common code, floating-point utilities, test helpers, and angle stringification. +.. image:: https://img.shields.io/pypi/v/lsst-utils.svg + :target: https://pypi.org/project/lsst-utils/ + +.. image:: https://codecov.io/gh/lsst/utils/branch/master/graph/badge.svg?token=TUaqTDjdIZ :target: https://codecov.io/gh/lsst/utils + +Utility functions from Rubin Observatory Data Management for the `Legacy Survey of Space and Time (LSST). `_. + +PyPI: `lsst-utils `_ License ------- From 25252d1fae31996e058b2c485680f94b1fb36205 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Thu, 4 Aug 2022 15:01:36 -0700 Subject: [PATCH 5/5] Pin build to flake8<5 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 76251762..463c3580 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,7 @@ jobs: # We have two cores so we can speed up the testing with xdist - name: Install pytest packages shell: bash -l {0} - run: conda install -y -q pytest pytest-flake8 pytest-xdist pytest-openfiles pytest-cov + run: conda install -y -q pytest pytest-flake8 pytest-xdist pytest-openfiles pytest-cov "flake8<5" - name: Install numexpr for tests shell: bash -l {0}