Code Cleaning & Automation
The changes implemented through this merge are:
-
Quality-of-life:
- Refactor
logger
attribute creation in communication and orchestrating classes:- Client loggers are now instance-specific by default, to ease debugging.
- End-users and developers can now configure logging as they wish, notably to write down results to files.
- Fix keep-alive ping requests configuration when using websockets, preventing undue timeout errors.
- Raise a ValueError if
InMemoryDataset.generate_batches
would result in an empty iterator.
- Refactor
-
Redundant code cleaning:
- Refactor some
declearn.communication.Server
code to avoid redundant blocks when setting up SSL usage. - Add the
compatible_vector_types
property todeclearn.model.api.Vector
and remove redundant code in numpy-compatible, tensor-wrappingVector
subclasses. - Add the
dtypes
andshapes
methods todeclearn.model.api.Vector
, and use them to write a shared__repr__
method, removing some redundant code in subclasses.
- Refactor some
-
Formatting & Automation:
- Fix the
pyproject.toml
configuration and installation file, and drop thesetup.cfg
one. - Reformat code files using black and configure black usage.
- Add
black --check
andpylint
code verification to the tox test suite.
- Fix the
Edited by ANDREY Paul