From 05f3f1cd260ae0205fa72171f024aa6a0c8377fc Mon Sep 17 00:00:00 2001 From: Ryuichi Arafune Date: Wed, 28 Feb 2024 11:04:16 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.rst | 2 +- pytest-config/pytest-coverage-codecov.ini | 1 - pytest-config/pytest-coverage.ini | 1 - pytest-config/pytest.ini | 1 - src/arpes/utilities/geometry.py | 7 +++++-- src/arpes/utilities/qt/__init__.py | 2 +- src/arpes/xarray_extensions.py | 6 ++++-- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 8fc8ad9f..48168e24 100644 --- a/README.rst +++ b/README.rst @@ -100,7 +100,7 @@ Details can be found on `the documentation site`_. Suggested steps --------------- -1. install `rye `. +1. install `rye `__. 2. Clone or duplicate the folder structure in this repository. 3. `rye sync` 4. Activate `arpes` environment. diff --git a/pytest-config/pytest-coverage-codecov.ini b/pytest-config/pytest-coverage-codecov.ini index 736d27fe..769b724e 100644 --- a/pytest-config/pytest-coverage-codecov.ini +++ b/pytest-config/pytest-coverage-codecov.ini @@ -3,7 +3,6 @@ addopts = --doctest-modules --cov arpes --cov-report=xml - --ignore=arpes/analysis/fft.py norecursedirs = .git diff --git a/pytest-config/pytest-coverage.ini b/pytest-config/pytest-coverage.ini index 671edfa2..54ca8b58 100644 --- a/pytest-config/pytest-coverage.ini +++ b/pytest-config/pytest-coverage.ini @@ -4,7 +4,6 @@ addopts = --cov arpes --cov-report=term --cov-report=html - --ignore=arpes/analysis/fft.py norecursedirs = .git diff --git a/pytest-config/pytest.ini b/pytest-config/pytest.ini index 33e056f1..5e5d65a1 100644 --- a/pytest-config/pytest.ini +++ b/pytest-config/pytest.ini @@ -5,7 +5,6 @@ addopts = -l --failed-first --doctest-modules - --ignore=arpes/analysis/fft.py norecursedirs = .git diff --git a/src/arpes/utilities/geometry.py b/src/arpes/utilities/geometry.py index 7cb0d25e..13386db4 100644 --- a/src/arpes/utilities/geometry.py +++ b/src/arpes/utilities/geometry.py @@ -98,7 +98,7 @@ def polyhedron_intersect_plane( plane_point: Any point on the plane epsilon: Used to determine precision for non-intersection """ - collected_points = [] + collected_points: list[NDArray[np.float_]] = [] def add_point(c: NDArray[np.float_]) -> None: already_collected = False @@ -123,7 +123,10 @@ def add_point(c: NDArray[np.float_]) -> None: b, epsilon=epsilon, ) - if segment_contains_point(a, b, intersection, epsilon=epsilon): + if ( + segment_contains_point(a, b, intersection, epsilon=epsilon) + and intersection is not None + ): add_point(intersection) points = ConvexHull(collected_points, qhull_options="Qc QJ").points diff --git a/src/arpes/utilities/qt/__init__.py b/src/arpes/utilities/qt/__init__.py index 3d037f5e..386ee89a 100644 --- a/src/arpes/utilities/qt/__init__.py +++ b/src/arpes/utilities/qt/__init__.py @@ -72,7 +72,7 @@ def wrapped_handler( data: XrTypes, *, detached: bool = False, - **kwargs: Incomplete, + **kwargs: P.kwargs, ) -> None: if not detached: return tool_handler(data, **kwargs) diff --git a/src/arpes/xarray_extensions.py b/src/arpes/xarray_extensions.py index 788ba338..abaaab93 100644 --- a/src/arpes/xarray_extensions.py +++ b/src/arpes/xarray_extensions.py @@ -317,8 +317,10 @@ def is_slit_vertical(self) -> bool: angle_tolerance = 1.0 if self.angle_unit.startswith("Deg") or self.angle_unit.startswith("deg"): return float(np.abs(self.lookup_offset_coord("alpha") - 90.0)) < angle_tolerance - return float(np.abs(self.lookup_offset_coord("alpha") - np.pi / 2)) < np.deg2rad( - angle_tolerance, + return float(np.abs(self.lookup_offset_coord("alpha") - np.pi / 2)) < float( + np.deg2rad( + angle_tolerance, + ), ) @property