Crappy

Latest version: v2.0.6

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

Scan your dependencies

Page 2 of 5

2.0.0

The version 2.0.0 of Crappy is a **backwards-incompatible** release that contains almost one year's worth of work.
It brings **notable changes at almost every level in the module**, and constitutes a clean base for future developments of Crappy.
The transition from version 1.5 to version 2.0 is not seamless for users, but still clearly documented. Refer to a Discussion to come for more information about it.
The main changes in the module between versions 1.5 and 2.0 are listed below.

Main changes (in chronological order)

This list is a simplified overview of all the changes that occurred in the module. In particular, it does not list all the changes in the names of the files, classes, methods, or arguments. To get a better overview of all the names that changed, users should instead refer to the online documentation or check for `DeprecationError`s when running their old code compatible with Crappy 1.5 in Crappy 2.0.

* The old [`Camera` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/95ca19e74ebfcfe1cf4b697e7059a19e6d520b03/crappy/blocks/camera.py) (and its children) could only perform the acquisition, processing and recording of the images in a sequential way. The display of images was delegated to the [`Displayer` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/95ca19e74ebfcfe1cf4b697e7059a19e6d520b03/crappy/blocks/displayer.py). Now, the new [`Camera` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/camera.py) (and its children) performs the acquisition, display, recording and processing of the images in a parallelized way. This greatly improves the achievable frame rate for all these operations.
* The [`Displayer` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/95ca19e74ebfcfe1cf4b697e7059a19e6d520b03/crappy/blocks/displayer.py) was removed, as the display is now handled directly by the [`Camera` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/camera.py). Having a separate Block for the display was a source of bugs due to the limitation of the bandwidth between the Blocks.
* The [`CameraConfig` window](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/camera_config/camera_config.py) now handles the case when no image can be grabbed by the camera, and displays an error image instead of freezing. It can also handle the case when the flow of images stops, still without freezing.
* A special `trigger` setting was added to the [`Camera` object](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/camera/meta_camera/camera.py) for handling the hardware trigger option that some cameras may possess.
* The `open`, `stop` and `close` methods were added to the definition of the base [`Actuator` object](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/actuator/meta_actuator/actuator.py).
* The [`Machine` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/machine.py) can now acquire the speed and the position of the driven Actuator regardless of the driving mode, and adjust the target speed at runtime in *position* mode via an incoming label.
* The [base `Block`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/meta_block/block.py) was totally refactored to improve its stability and efficiency, using all the possibilities offered by the `multiprocessing` module. All the Blocks were updated accordingly.
* As a consequence of the point above, the methods to use for receiving data from upstream Blocks were totally changed. They now have a different name and a different behavior.
* A clean logging mechanism was added to Crappy, in place of the previous calls to `print`. The logs are both displayed in the console, and saved to a log file.
* The instantiation of the hardware related objects (Actuator, Camera, InOut) is now always performed once the Process driving them has started, for compatibility with the *spawn* start method of the `multiprocessing` module.
* The [`Link` object](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/links/link.py) was updated consistently with the improvements brought to the [base `Block`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/meta_block/block.py). The methods of the `Link` now have a different name and a different behavior, and users are not expected to call them directly anymore.
* A `debug` argument was added to all the Blocks, to let users choose the debug level to use between INFO and DEBUG for each Block individually.
* All the classes relying on the [`FT232H` tool](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/ft232h/ft232h_server.py) were moved to separate folders, to make them clearly discernible from the other classes.
* The [`FT232H` tool](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/ft232h/ft232h_server.py) and the associated [`USBServer`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/ft232h/usb_server.py) were improved, to increase both the communication speed and the stability.
* The entire structure of the module was re-thought, with the creation of many sub-folders containing sub-categories of files.
* The names of all the files and classes were changed to enforce PEP8. The list of the changes is too long to be displayed here, but all the name changes are clearly mentioned in the documentation.
* A number of unused files in the `util/` folder of the project were removed.
* The `impact/` folder of the project was removed.
* It is now possible for users to subclass the base [`Generator Path`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/generator_path/meta_path/path.py). That was previously not possible.
* The entire architecture of the project was changed from *flat* to *src*. It is considered a good practice for avoiding test and build errors.
* The `verbose` argument of all the Blocks was renamed to `display_freq`, which is a more accurate description of what this argument does.
* A draft for a test suite for Crappy was added in the [`tests/` folder](https://github.com/LaboratoireMecaniqueLille/crappy/tree/d1d7f5e78c19c70a38d1556054e39866fe4e176b/tests) of the project. It will be completed and actively used in future releases.
* The calculation of the histogram in the [`CameraConfig` window](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/camera_config/camera_config.py) is now parallelized, therfore improving the performance of this window.
* The P, I, and D gains of the [`PID` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/pid.py) can now be adjusted at runtime by sending new values over given labels.
* The images recorded by the [`Camera` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/camera.py) can now be saved as `.npy` files.
* The [`Modifier` objects](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/modifier/meta_modifier/modifier.py) now use the `__call__` method for altering the received data, instead of the `evaluate` method previously. This behavior is more consistent with the possibility to pass bare functions as Modifiers.
* A few objects were moved to a [`src/crappy/lamcube/` folder](https://github.com/LaboratoireMecaniqueLille/crappy/tree/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/lamcube), to clearly indicate that they are only meant to be used at the LaMcube laboratory.
* Most of the objects in Crappy now accept any type of iterable where they previously requested lists or tuples.
* The [`examples/` folder](https://github.com/LaboratoireMecaniqueLille/crappy/tree/d1d7f5e78c19c70a38d1556054e39866fe4e176b/examples) of the project was totally refactored, with more, thoroughly commented, tested examples. Most of the Blocks now have at least one example illustrating their usage, and most of the examples can be run locally without requiring any hardware.
* The packaging-related files ([`setup.py`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/setup.py), [`requirements.txt`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/requirements.txt), [`pyproject.toml`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/pyproject.toml), [`MANIFEST.in`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/MANIFEST.in)) were all refactored to include more complete and up-to-date information, and to comply with the recent standards.
* The configuration files for building the documentation ([`.readthedocs.yml`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/.readthedocs.yml), [`docs/source/conf.py`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/docs/source/conf.py), [`docs/Makefile`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/docs/Makefile)) were updated to include more information and comply with the recent evolution of the standards.
* The files needed to build the C++ extension modules were moved to the [`src/ext/`](https://github.com/LaboratoireMecaniqueLille/crappy/tree/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/ext) folder of the project.
* Crappy now raises a `CrappyFail` exception when stopped with CTRL+C, or when stopped by an unexpected exception. This is to prevent an external code launching Crappy from keeping running in case something goes wrong.
* To stop Crappy in a clean way in all scripts, a [`StopBlock`](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/stop_block.py) and a [`StopButton` Block](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/blocks/stop_button.py) were added to the module.
* The documentation of the module was greatly improved. All the objects listed in the API section are now fully documented, and the tutorials section was made as complete as possible. Overall, the documentation has a clearer layout, and contains more information.
* The [`Overlay` tool](https://github.com/LaboratoireMecaniqueLille/crappy/blob/d1d7f5e78c19c70a38d1556054e39866fe4e176b/src/crappy/tool/camera_config/config_tools/overlay_object.py) was added to allow users to display custom overlays on top of images processed by a child of the Camera Block.
* README.md files were added in each folder of the project to make it clearer what the different sections are intended for.
* Deprecation errors were added to the module to signal users the deprecated features in version 2.0.0.
* The `CameraGstreamer` and `CameraOpencv` cameras were greatly improved, to better interact with `v4l2` on Linux and provide more functionalities on Windows and macOS.
* In addition, a number of fixes were brought to the different objects in the module.

Merged pull requests
* Fix bug when switching trigger mode by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/32
* Fixed a few bugs by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/33
* Reset Block after cleanup by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/45
* Feature/Runtime order check in Block by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/46
* Add button to auto apply settings in the configuration window by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/48
* Allow custom overlay on Camera Displayer by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/49
* Make it more user-friendly to instantiate custom Camera Blocks by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/50
* Add a step option for the camera scale setting in the configuration window by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/51
* Documentation update for version 2.0.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/52
* Add example demonstrating the creation of a custom Camera Block by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/53
* Simplify the creation of custom Path objects by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/54
* Update the README files by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/56
* Enhancement of the parameters management for the gstreamer camera by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/55
* Add deprecation errors for objects renamed between v1.5 and v2.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/69
* Release of Crappy version 2.0.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/79

New Contributors
* PIERROOOTT made their first contribution in https://github.com/LaboratoireMecaniqueLille/crappy/pull/32

**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v1.5.11...v2.0.0

The tarball and the wheel are available [on PyPI](https://pypi.org/project/crappy/2.0.0/)

2.0.0rc.0

This release is the first candidate version for the upcoming 2.0.0 release, and hopefully the last one !
The remaining steps before the release of version 2.0.0 are :
- To heavily test it on both Windows and Linux
- To check that it runs as expected on all the supported Python versions
- To test it on real use cases on the experimental setups at the LaMcube

Changes

Compared to the last 2.0.0.dev3 release, it contains :
- A reorganization of the repository to have the extension files in src
- The addition of two Blocks for stopping Crappy in a clean way without using CTRL+C
- The addition of a possible no_raise argument to `crappy.start()`
- Notable changes on the runtime sequence of the Block, in particular in unexpected situations
- A refactoring of the examples following the update of the Block
- The addition of a CODEOWNERS file to the repository
- Improvements on the Camera Block to make it more user-friendly to subclass
- Improvements on the Generator Path to make it more user-friendly to subclass
- A major documentation and README update
- A number of Camera-related changes, in the configuration window and in the CameraGstreamer object
- Updates related to the transition towards 2.0.0
- Other minor example updates and bug fixes

Accepted pull requests
* Reset Block after cleanup by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/45
* Runtime order check in Block by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/46
* Add button to auto apply settings in the configuration window by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/48
* Allow custom overlay on Camera Displayer by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/49
* Make it more user-friendly to instantiate custom Camera Blocks by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/50
* Add a step option for the camera scale setting in the configuration window by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/51
* Documentation update for version 2.0.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/52
* Add example demonstrating the creation of a custom Camera Block by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/53
* Simplify the creation of custom Path objects by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/54
* Update the README files by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/56
* Enhancement of the parameters management for the gstreamer camera by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/55
* Add deprecation errors for objects renamed between v1.5 and v2.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/69
* Update version to 2.0.0-rc.0 by WeisLeDocto in https://github.com/LaboratoireMecaniqueLille/crappy/pull/70


**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v2.0.0.dev3...v2.0.0-rc.0

The tarball and the wheel are available [on PyPI](https://pypi.org/project/crappy/2.0.0rc.0/)

2.0.0.dev3

What's Changed
* Many minor fixes in a variety of Blocks and other objects
* Beginning of a major documentation update for v2.0.0
* Updated the config files for the documentation, and the setup.py file
* Renamed a few objects
* The camera configuration window now limits the acquisition frequency to that specified to the Camera Block
* Major refactoring of all the examples

**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v2.0.0.dev2...v2.0.0.dev3

The tarball and the wheel are available [on PyPI](https://pypi.org/project/crappy/2.0.0.dev3/)

2.0.0.dev2

What's Changed
* Renamed several Blocks, Actuators, InOuts for more clarity
* Renamed many files accordingly
* Minor improvements of several Camera objects
* The calculation of the histogram in the CameraConfig is now parallelized
* Added the possibility to apply a software ROI for Camera objects
* Improved the exception handling in the Block, and got rid of potential infinite loop
* Improved the send method of the Block, allowing it to handle more types of iterables
* Added the crappy.lamcube submodule containing devices specific to the LaMcube
* Major update and completion of the documentation for all the objects in Crappy
* Other minor improvements and bug fixes

**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v2.0.0.dev1...v2.0.0.dev2

2.0.0.dev1

What's Changed
* Fixed a bug when switching trigger mode on the XiAPI Camera by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/32
* Fixed a few bugs in the ClientServer Block by PIERROOOTT in https://github.com/LaboratoireMecaniqueLille/crappy/pull/33
* A test suite was added to improve bug detection, to be expanded later
* The example, documentation, and utility files are not included anymore with the package
* The instantiation of Generator Path objects is now cleaner and users can define their own Paths in the scripts
* The edges of the boxes in the Camera Displayer window adapt to the size of the image
* The behavior of the `spam` argument of the IOBlock was changed
* The Block was modified to avoid bugs when calling its fine-grain control methods
* Minor bug fixes
* Minor refactoring and syntax improvements

New Contributors
* PIERROOOTT made their first contribution in https://github.com/LaboratoireMecaniqueLille/crappy/pull/32

**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v2.0.0.dev0...v2.0.0.dev1

2.0.0.dev0

What's Changed
* The Camera Block and its children now run the acquisition, processing, recording and display in parallel processes
* The Displayer Block was removed
* The Streamer Camera was renamed FileReader
* The CameraConfig window can now start running even when no image is received
* A special CameraSetting was added for controlling the camera triggers
* Added warnings for full Pipes and Links
* Fixed bugs in the examples when running on Windows
* Complete refactoring of the base Block, to improve speed and stability
* Added a proper logger to Crappy, as well as debugging features
* Refactored the Link methods for more consistency
* Reorganized the repository
* The module is now contained in the src/ folder, to ensure the doc is built against a packaged module
* Enforced CamelCase throughout the module
* The data files to include are now explicitly listed
* The classes and methods to document are now explicitly listed

New Contributors
* Eddidoune made their first contribution in https://github.com/LaboratoireMecaniqueLille/crappy/pull/11

**Full Changelog**: https://github.com/LaboratoireMecaniqueLille/crappy/compare/v1.5.9...v2.0.0.dev0

**Wheel**: [crappy-2.0.0.dev0-py3-none-any.whl.gz](https://github.com/LaboratoireMecaniqueLille/crappy/files/10501738/crappy-2.0.0.dev0-py3-none-any.whl.gz)

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.