----------------------------------------------------------------------------------------
Added
~~~~~
- Add a default ``load_data`` method for physionet databases reader
classes in the base class ``PhysioNetDataBase``. In most cases,
in the inherited classes, one does not need to implement the
``load_data`` method, as the default method is sufficient. This
method is a slight improvement over ``wfdb.rdrecord``.
- Add decorator ``add_kwargs`` in the ``torch_ecg.utils.misc`` module
for adding keyword arguments to a function or method.
- Add functions ``list_databases``, ``list_datasets`` in the
``torch_ecg.datasets`` module for listing available databases reader
classes and ``Dataset`` classes.
- Add ``save`` method for the ``CkptMixin`` class. It is used to save
the model to a file.
- Add ``_normalize_leads`` a method of the base ``_DataBase`` class
in the ``torch_ecg.databases.base`` module. It is used to normalize
the names of the ECG leads.
- Add subsampling functionality for database reader classes.
- Add benchmark study ``train_mtl_cinc2022`` for the CinC2022 challenge.
- Add ``CITATIONS.bib`` file for storing BibTeX entries of the
papers related to the project.
- Add 10 sample data from the CPSC2018 database for testing in the
``sample-data`` directory.
Changed
~~~~~~~
- Use ``CitationMixin`` from the ``bib-lookup`` package as the base
class for the ``DataBaseInfo`` class in ``torch_ecg.databases.base``.
- Use ``CitationMixin`` as one of the base classes for the models
in ``torch_ecg.models``.
- Allow dummy (empty) preprocessor managers, a warning instead of an
error is raised in such cases.
- Enhance error message for the computation of metrics.
- Add keyword argument ``requires_grad`` and ``include_buffers`` to
the ``torch_ecg.utils.utils_nn.compute_module_size`` function.
The ``dtype`` argument is removed as the data type of the model
is now inferred from the model itself.
- Improve several database reader classes: ``CPSC2018``, ``CPSC2021``,
``CINC2017``, ``ApneaECG``, ``MITDB``, ``SPH``.
- Add asymmetric zero pad for convolution layers, so that when
``stride = 1`` and ``kernel_size`` is even, strict ``"same"``
padding is conducted.
- Use loggers instead of ``print`` in database reader classes.
- Integrate code coverage into the CI workflow. The coverage report
is generated and uploaded to Codecov.
- More unit tests are added, and the existing ones are updated.
Code coverage is largely improved.
Deprecated
~~~~~~~~~~
- Drop compatibility for ``tqdm`` < 4.29.1
Removed
~~~~~~~
- Remove unused rpeaks detection methods in the ``torch_ecg.utils.rpeaks``
module.
- Remove ``_normalize_leads`` method in ``LUDB`` database reader class.
- Remove unused functions in the file of the ``CPSC2020`` database reader
class.
Fixed
~~~~~
- Fix bugs in the config class ``torch_ecg.cfg.CFG``.
- Fix errors in the ``plot`` method of ``CINC2020`` and ``CINC2021``
database reader classes.
Security
~~~~~~~~
- `CVE-2007-4559 <https://github.com/advisories/GHSA-gw9q-c7gh-j9vm>`__
patch: Fix a potential security vulnerability in the
``torch_ecg.utils.download.http_get`` function.