Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed Jun 17, 2024
1 parent 4554ca8 commit b9483da
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ PYDEVD_DISABLE_FILE_VALIDATION="1"
test = "pytest test --cov=armscan_env --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes"
# Adjust to a smaller set of tests if appropriate
test-subset = "pytest test --color=yes"
_black_check = "black --check ."
_ruff_check = "ruff check ."
_black_check = "black --check src scripts docs"
_ruff_check = "ruff check src scripts docs"
_ruff_check_nb = "nbqa ruff docs"
_black_format = "black ."
_ruff_format = "ruff --fix ."
_black_format = "black src scripts docs"
_ruff_format = "ruff --fix src scripts docs"
_ruff_format_nb = "nbqa ruff --fix docs"
lint = ["_black_check", "_ruff_check", "_ruff_check_nb"]
_poetry_install_sort_plugin = "poetry self add poetry-plugin-sort"
Expand Down
3 changes: 2 additions & 1 deletion src/armscan_env/envs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
from dataclasses import dataclass, field
from typing import Any, Generic, TypeVar

import gymnasium as gym
import numpy as np

import gymnasium as gym
from gymnasium.core import ActType as TAction
from gymnasium.core import ObsType as TObs

Expand Down
5 changes: 3 additions & 2 deletions src/armscan_env/envs/labelmaps_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from copy import copy, deepcopy
from typing import Any, ClassVar, Literal

import gymnasium as gym
import numpy as np
import SimpleITK as sitk
from armscan_env.clustering import TissueClusters
Expand All @@ -19,13 +18,15 @@
from armscan_env.slicing import slice_volume
from armscan_env.util.visualizations import show_clusters
from celluloid import Camera
from gymnasium.core import ObsType as TObs
from IPython.core.display import HTML
from matplotlib import pyplot as plt
from matplotlib.animation import ArtistAnimation
from matplotlib.axes import Axes
from matplotlib.figure import Figure

import gymnasium as gym
from gymnasium.core import ObsType as TObs

log = logging.getLogger(__name__)

_VOL_NAME_TO_OPTIMAL_ACTION = {
Expand Down
3 changes: 2 additions & 1 deletion src/armscan_env/envs/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
cast,
)

import gymnasium as gym
import numpy as np
from armscan_env.clustering import TissueClusters, TissueLabel
from armscan_env.envs.base import ArrayObservation, DictObservation
from armscan_env.envs.state_action import LabelmapStateAction
from armscan_env.util.img_processing import crop_center

import gymnasium as gym


class ChanneledLabelmapsObsWithActReward(TypedDict):
"""TypeDict for LabelmapSliceAsChannelsObservation.
Expand Down
4 changes: 2 additions & 2 deletions src/armscan_env/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from abc import ABC, abstractmethod
from typing import Any, Literal, SupportsFloat, cast

import gymnasium as gym
import numpy as np
import SimpleITK as sitk
from armscan_env.envs.base import Observation, RewardMetric, TerminationCriterion
Expand All @@ -15,10 +14,11 @@
from armscan_env.envs.observations import MultiBoxSpace
from armscan_env.envs.rewards import LabelmapClusteringBasedReward
from armscan_env.envs.state_action import LabelmapStateAction

import gymnasium as gym
from gymnasium import Env, Wrapper
from gymnasium.core import ActType, ObsType, WrapperActType
from gymnasium.wrappers import FrameStackObservation

from tianshou.highlevel.env import (
EnvFactory,
EnvMode,
Expand Down

0 comments on commit b9483da

Please sign in to comment.