Pycomex

Latest version: v0.14.1

Safety actively analyzes 688843 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.8.0

------------------

* Removed the standard prints during the call of a hook, because they proved annoying in practice.
* Fixed the bug, where a sub experiment snapshot would not be executable because it was missing the the
base experiment. The base experiment script is now copied into the archive folder as well.
* Added the dependency system: It is now possible to define files which an experiment execution depends on
via the special ``DEPENDENCY_PATHS`` dict parameter. These files will be copied into the created archive
folders.

0.7.1

------------------

* Slightly changed the hook mechanic to allow the possibility of defining overwritable default
implementations for hooks.

0.7.0

------------------

* Added the ``experiment.SubExperiment`` class which implements experiment inheritance! This class now
allows to refer to a different experiment module to run as parent experiment, but with parameter
modifications.
* Added a hook system to experiments, which allows for parent experiment modules to define certain points
at which custom code from child experiments may be injected.

* changed the datetime format in ``HISTORY.rst`` to the only sane option
* Fixed a minor windows compatibility problem with the automatic pathing determining for experiments.
* Added the module ``pycomex.testing`` to contain all of the utility functions and classes which are needed
to facilitate the unittests such as the ``ExperimentIsolation`` context manager.
* Refactored most unittests to use ``pytest`` instead of ``unittest``
* Fixed a bunch of unittests that were not updated for the new API
* Fixed a rather serious bug in ``testing.ExperimentIsolation`` which left permanent modifications in
in the globals dict and thus introduced side-effects in between different unittests.

**INTERFACE CHANGES**

* changed functionality and signature of ``experiment.run_experiment``. Previously this function executed
an existing experiment module by using ``subprocessing.run`` and returned the completed process instance.
Now, this works by using ``experiment.SubExperiment`` and the function actually returns an experiment
instance.
* Do to the change above, the same now applies to ``experiment.run_example``.

0.6.1

------------------

* Fixed a bug where numpy arrays within the storage would cause an exception during the serialization
process by using a custom json encoder class which first converts all numpy arrays to nested lists

0.6.0

------------------

* Added ``pycomex.cli.ExperimentCLI`` class which can be used to automatically create a computational
experiment command line interface for a project by simply providing the folder path at which all the
experiment modules are located. They will automatically be discovered and the CLI will automatically
be built based on those experiments. Currently supported are ``list`` command which will
show an overview of experiments, ``info`` which will print more details and ``run`` which will prompt
the execution of an experiment.
* Made some changes in the ``Experiment`` class. Most importantly it now sets ``__experiment__`` global
variable in the original module namespace, which makes it easier to detect whether any given
python module contains an experiment or not.

0.5.2

------------------

* Extended ``run_experiment`` such that it can be called in a non-blocking manner and such that it relays
the output of the experiment subprocess to stdout in the main process

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.