Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ on:

jobs:
pytest-with-nbmake:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Setup uv project virtual environment
env:
UV_PYTHON: ${{ matrix.python-version }}
uses: ./.github/actions/setup-uv
- name: Run pytest --nbmake
run: uv run --no-project pytest --nbmake
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jupyter = [
mypy = [
"mypy >= 1.14",
"scipy-stubs >= 1.15; python_version >= '3.10'",
"typing_extensions >= 4.10",
]

[dependency-groups]
Expand Down
2 changes: 1 addition & 1 deletion src/rydstate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
]


__version__ = "0.9.0"
__version__ = "0.9.1"
4 changes: 3 additions & 1 deletion src/rydstate/angular/angular_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
from abc import ABC
from typing import TYPE_CHECKING, Any, ClassVar, Literal, Self, get_args, overload
from typing import TYPE_CHECKING, Any, ClassVar, Literal, get_args, overload

from rydstate.angular.angular_matrix_element import (
AngularMomentumQuantumNumbers,
Expand All @@ -24,6 +24,8 @@
from rydstate.species import SpeciesObject

if TYPE_CHECKING:
from typing_extensions import Self
Comment thread
johannes-moegerle marked this conversation as resolved.

from rydstate.angular.angular_state import AngularState

logger = logging.getLogger(__name__)
Expand Down
5 changes: 3 additions & 2 deletions src/rydstate/angular/angular_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import math
from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, get_args, overload
from typing import TYPE_CHECKING, Any, Generic, Literal, TypeVar, get_args, overload

import numpy as np

Expand All @@ -17,10 +17,11 @@
if TYPE_CHECKING:
from collections.abc import Iterator

from typing_extensions import Self
Comment thread
johannes-moegerle marked this conversation as resolved.

from rydstate.angular.angular_ket import CouplingScheme
from rydstate.angular.angular_matrix_element import AngularOperatorType


logger = logging.getLogger(__name__)


Expand Down
4 changes: 2 additions & 2 deletions src/rydstate/angular/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def sympify_args(func: Callable[P, R]) -> Callable[P, R]:
return func

def check_arg(arg: float) -> Integer:
if arg.is_integer():
if isinstance(arg, int) or arg.is_integer():
return Integer(int(arg))
if (arg * 2).is_integer():
if isinstance(arg * 2, int) or (arg * 2).is_integer():
return Integer(int(arg * 2)) / Integer(2)
raise ValueError(f"Invalid input to {func.__name__}: {arg}.")

Expand Down