Pylinkage

Latest version: v0.6.0

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

Scan your dependencies

Page 1 of 2

0.6.0

Added

- New joint: the ``Linear`` joint!
- New sub-package: optimization.collections.
``optimization.collections.Agent`` and ``optimization.collections.MutableAgent`` are two new classes that should standardize the format of
optimization, related to ([5](https://github.com/HugoFara/pylinkage/issues/5)).
- ``Agent`` is immutable and inherits from a namedtuple. It is recommended to use it, as it is a bit faster.
- ``MutableAgent`` is mutable. It may be deprecated/removed if ``Agent`` is satisfactory.
- New sub-package: geometry.
- It introduces two new functions ``line_from_points`` and ``circle_line_intersection``.
- New examples:
- ``examples/strider.py`` from [leggedsnake](https://github.com/HugoFara/leggedsnake),
based on the [Strider Linkage](https://www.diywalkers.com/strider-linkage-plans.html).
- ``examples/inverted_stroke_engine.py`` is a demo of a [four-stroke engine](https://en.wikipedia.org/wiki/Four-stroke_engine) featuring a Linear joint.
- ``Linkage.set_completely`` is a new method combining both ``Linkage.set_num_constraints`` and ``Linkage.set_coords``.
- New exception ``NotCompletelyDefinedError``, when a joint is reloading but its anchor coordinates are set to None.
- Some run configuration files added *for users of PyCharm*:
- Run all tests with "All Tests".
- Regenerate documentation with "Sphinx Documentation".

Changed

- Optimization return type changed ([5](https://github.com/HugoFara/pylinkage/issues/5)):
- ``trials_and_error_optimization`` return an array of ``MutableAgent``.
- ``particle_swarm_optimization`` return an array of one ``Agent``.
- It should not be a breaking change for most users.
- Changes to the "history" style.
- It is no longer a global variable in example scripts.
- It was in format iterations[dimensions, score], now it is a standard iterations[score, dimensions, initial pos].
- ``repr_polar_swarm`` (in example scripts) changed to follow the new format.
- ``swarm_tiled_repr`` takes (index, swarm) as input argument. swarm is (score, dim, pos) for each agent for this
iteration.
- ``repr_polar_swarm`` reload frame only when a new buildable linkage is generated.
- This makes the display much faster.
- For each iteration, you may see linkages that do not exist anymore.
- Folders reorganization:
- The ``geometry`` module is now a package (``pylinkage/geometry``)
- New package ``pylinkage/linkage``:
- ``pylinkage/linkage.py`` separated and inserted in this package.
- New package: ``pylinkage/joints``
- Joints definition are in respective files.
- New package ``pylinkage/optimization/``
- ``pylinkage/optimizer.py`` split and inserted in.
- Trials-and-errors related functions goes to ``grid_search.py``.
- Particle swarm optimization is at ``particle_swarm.py``.
- New file ``utils.py`` for ``generate_bounds``.
- Tests follow the same renaming.
- From the user perspective, no change (execution *may* be a bit faster)
- ``source/`` renamed to ``sphinx/`` because it was confusing and only for Sphinx configuration.
- Transition from Numpydoc to reST for docstrings ([12](https://github.com/HugoFara/pylinkage/issues/12)).
- ``__secant_circles_intersections__`` renamed to
``secant_circles_intersections`` (in ``pylinkage/geometry/secants.py``).

Fixed

- ``swarm_tiled_repr`` in ``visualizer.py`` was wrongly assigning dimensions.
- Setting ``locus_highlight`` in ``plot_static_linkage`` would result in an error.
- ``Pivot.reload`` was returning arbitrary point when we had an infinity of solutions.
- The highlighted locus was sometimes buggy in ``plot_static_linkage`` in
``visualizer.py``.

Deprecated

- Using ``tqdm_verbosity`` is deprecated in favor of using ``disable=True`` in a tqdm object.
- The ``Pivot`` class is deprecated in favor of the ``Revolute`` class.
The name "Pivot joint" is not standard.
Related to [13](https://github.com/HugoFara/pylinkage/issues/13).
- The ``hyperstaticity`` method is renamed ``indeterminacy`` in ``Linkage``
(linkage.py)

Removed

- Drops support for Python 3.7 and 3.8 as both versions reached end-of-life.
- ``movement_bounding_bow`` is replaced by ``movement_bounding_box`` (typo in function name).

0.5.3

- Using Python 3.7 is officially deprecated ([end of life by 2023-06-27](https://devguide.python.org/versions/)).
It will no longer be tested, use it at your own risks!

0.5.2

- The optimizer tests are 5 times quicker (~1 second now) and raise less
false positive.
- The sidebar in the documentation makes navigation easier.
- A bit of reorganization in optimizers, it should not affect users.

0.5.1

- [matplotlib](https://matplotlib.org/) and tqdm now required.

0.5.0

- After many hours of computations, default parameters in
``particle_swarm_optimization`` are much more efficient. With the demo
``fourbar_linkage``, the output wasn't even convergent sometimes. Now we
have a high convergence rate (~100%), and results equivalent to the
``trials_and_errors_optimization`` (in the example).
- ``variator`` function of ``optimizer`` module was poorly working.
- The docstrings were not displayed properly in documentation, this is fixed.

0.4.1

- Examples moved from ``pylinkage/examples/`` to ``docs/examples/``.
- Tests moved from ``pylinkage/tests/`` to ``tests/``.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.