Skip to content

Commit

Permalink
Removes support for Python 3.7 and 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoFara committed Oct 2, 2024
1 parent 038b75e commit 5dad0a0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ iteration.
### Deprecated

- Using ``tqdm_verbosity`` is deprecated in favor of using ``disable=True`` in a tqdm object.
- ``movement_bounding_bow`` is replaced by ``movement_bounding_box`` (typo in function name).
- 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] - 2023-06-23

Expand Down
3 changes: 2 additions & 1 deletion pylinkage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"""

from .geometry import (
dist,
sqr_dist,
norm,
cyl_to_cart,
Expand Down Expand Up @@ -51,5 +50,7 @@
show_linkage,
swarm_tiled_repr,
)
# For compatibility only, geometry.dist is deprecated
from math import dist

__version__ = "0.5.3"
3 changes: 2 additions & 1 deletion pylinkage/geometry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""

from .core import (
dist,
sqr_dist,
norm,
cyl_to_cart,
Expand All @@ -14,3 +13,5 @@
circle_line_from_points_intersection,
intersection,
)
# For compatibility only, geometry.core.dist is deprecated
from math import dist
10 changes: 2 additions & 8 deletions pylinkage/geometry/secants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@
The geometry module provides general geometry functions.
It is used extensively, so each function should be highly optimized.
Created on Wed May 5, 17:34:45 2021.
@author: HugoFara
"""
import math

from .core import dist


def secant_circles_intersections(
distance, dist_x, dist_y, mid_dist, radius1, projected
Expand Down Expand Up @@ -186,15 +180,15 @@ def intersection(obj_1, obj_2, tol=0.0):
"""
# Two points
if len(obj_1) == 2 and len(obj_2) == 2:
if obj_1 == obj_2 or tol and dist(obj_1, obj_2) <= tol:
if obj_1 == obj_2 or tol and math.dist(obj_1, obj_2) <= tol:
return obj_1
return
# Two circles
if len(obj_1) == 3 and len(obj_2) == 3:
return circle_intersect(obj_1, obj_2)[1:]
# Point and circle
if len(obj_1) == 2 and len(obj_2) == 3:
if dist(obj_1, obj_2[:2]) - obj_2[2] <= tol:
if math.dist(obj_1, obj_2[:2]) - obj_2[2] <= tol:
return obj_1
return
# Circle and point
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Legal Industry",
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ classifiers =
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Artificial Intelligence
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Intended Audience :: Science/Research
Intended Audience :: Legal Industry
Intended Audience :: End Users/Desktop
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37,py38,py39,flake8
envlist = py39,py310,py311,py312,flake8

[testenv]
commands = python -m unittest discover . -p "test_*.py"
Expand Down

0 comments on commit 5dad0a0

Please sign in to comment.