Skip to content

Commit

Permalink
update pytest to 8.0.0 (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzouink authored May 9, 2024
2 parents afc7428 + 12cfd55 commit 9d2384a
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 29 deletions.
5 changes: 3 additions & 2 deletions dacapo/experiments/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .validation_scores import ValidationScores
from .starts import Start
from .model import Model
from typing import Optional

import torch

Expand Down Expand Up @@ -48,13 +49,13 @@ class Run:
task: Task
architecture: Architecture
trainer: Trainer
datasplit: DataSplit
_datasplit: Optional[DataSplit]

model: Model
optimizer: torch.optim.Optimizer

training_stats: TrainingStats
validation_scores: ValidationScores
_validation_scores: Optional[ValidationScores]

def __init__(self, run_config, load_starter_model: bool = True):
"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencies = [
# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
test = ["pytest==7.4.4", "pytest-cov", "pytest-lazy-fixture"]
test = ["pytest", "pytest-cov", "pytest-lazy-fixtures"]
dev = [
"black",
"mypy",
Expand Down
8 changes: 4 additions & 4 deletions tests/components/test_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from dacapo.store.create_store import create_config_store

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf


@pytest.mark.parametrize(
"array_config",
[
lazy_fixture("cellmap_array"),
lazy_fixture("zarr_array"),
lazy_fixture("dummy_array"),
lf("cellmap_array"),
lf("zarr_array"),
lf("dummy_array"),
],
)
def test_array_api(options, array_config):
Expand Down
8 changes: 4 additions & 4 deletions tests/components/test_gp_arraysource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import gunpowder as gp

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf


@pytest.mark.parametrize(
"array_config",
[
lazy_fixture("cellmap_array"),
lazy_fixture("zarr_array"),
lazy_fixture("dummy_array"),
lf("cellmap_array"),
lf("zarr_array"),
lf("dummy_array"),
],
)
def test_gp_dacapo_array_source(array_config):
Expand Down
6 changes: 3 additions & 3 deletions tests/components/test_trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from dacapo.store.create_store import create_config_store

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf


@pytest.mark.parametrize(
"trainer_config",
[
lazy_fixture("dummy_trainer"),
lazy_fixture("gunpowder_trainer"),
lf("dummy_trainer"),
lf("gunpowder_trainer"),
],
)
def test_trainer(
Expand Down
8 changes: 4 additions & 4 deletions tests/operations/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dacapo import apply

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf

import logging

Expand All @@ -18,9 +18,9 @@
@pytest.mark.parametrize(
"run_config",
[
# lazy_fixture("distance_run"),
lazy_fixture("dummy_run"),
# lazy_fixture("onehot_run"),
# lf("distance_run"),
lf("dummy_run"),
# lf("onehot_run"),
],
)
def test_apply(options, run_config, zarr_array, tmp_path):
Expand Down
8 changes: 4 additions & 4 deletions tests/operations/test_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dacapo import predict

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf

import logging

Expand All @@ -18,9 +18,9 @@
@pytest.mark.parametrize(
"run_config",
[
# lazy_fixture("distance_run"),
lazy_fixture("dummy_run"),
# lazy_fixture("onehot_run"),
# lf("distance_run"),
lf("dummy_run"),
# lf("onehot_run"),
],
)
def test_predict(options, run_config, zarr_array, tmp_path):
Expand Down
8 changes: 4 additions & 4 deletions tests/operations/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from dacapo.train import train_run

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf

import logging

Expand All @@ -20,9 +20,9 @@
@pytest.mark.parametrize(
"run_config",
[
lazy_fixture("distance_run"),
lazy_fixture("dummy_run"),
lazy_fixture("onehot_run"),
lf("distance_run"),
lf("dummy_run"),
lf("onehot_run"),
],
)
def test_train(
Expand Down
6 changes: 3 additions & 3 deletions tests/operations/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dacapo import validate

import pytest
from pytest_lazyfixture import lazy_fixture
from pytest_lazy_fixtures import lf

import logging

Expand All @@ -18,8 +18,8 @@
@pytest.mark.parametrize(
"run_config",
[
lazy_fixture("distance_run"),
# lazy_fixture("onehot_run"),
lf("distance_run"),
# lf("onehot_run"),
],
)
def test_validate(
Expand Down

0 comments on commit 9d2384a

Please sign in to comment.