Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Imports to __init__ files #63

Merged
merged 4 commits into from
May 24, 2024
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
2 changes: 2 additions & 0 deletions minerva/analysis/metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .pixel_accuracy import PixelAccuracy

__all__ = ["PixelAccuracy"]
4 changes: 4 additions & 0 deletions minerva/data/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .base import SimpleDataset
from .supervised_dataset import SupervisedReconstructionDataset

__all__ = ["SimpleDataset", "SupervisedReconstructionDataset"]
13 changes: 13 additions & 0 deletions minerva/data/readers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from .patched_array_reader import PatchedArrayReader
from .png_reader import PNGReader
from .reader import _Reader
from .tiff_reader import TiffReader
from .zarr_reader import PatchedZarrReader

__all__ = [
"PatchedArrayReader",
"PatchedZarrReader",
"PNGReader",
"TiffReader",
"_Reader",
]
13 changes: 13 additions & 0 deletions minerva/models/nets/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from .base import SimpleSupervisedModel
from .deeplabv3 import DeepLabV3
from .setr import SETR_PUP
from .unet import UNet
from .wisenet import WiseNet

__all__ = [
"SimpleSupervisedModel",
"DeepLabV3",
"SETR_PUP",
"UNet",
"WiseNet",
]
3 changes: 3 additions & 0 deletions minerva/pipelines/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .base import Pipeline

__all__ = ["Pipeline"]
2 changes: 2 additions & 0 deletions minerva/transforms/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .transform import Flip, PerlinMasker, TransformPipeline, _Transform

__all__ = ["Flip", "PerlinMasker", "TransformPipeline", "_Transform"]
3 changes: 2 additions & 1 deletion tests/data/datasets/test_simple_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np
import pytest
from minerva.data.datasets.base import SimpleDataset

from minerva.data.datasets import SimpleDataset


class _SimpleReader:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/readers/test_patched_array_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from minerva.data.readers.patched_array_reader import PatchedArrayReader
from minerva.data.readers import PatchedArrayReader


def test_patched_array_reader_no_stride_1():
Expand Down
2 changes: 1 addition & 1 deletion tests/models/nets/test_setr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import torch

from minerva.models.nets.setr import SETR_PUP
from minerva.models.nets import SETR_PUP


def test_setr_loss():
Expand Down
6 changes: 3 additions & 3 deletions tests/models/nets/test_unet.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import lightning as L
import torch

from minerva.models.nets.unet import UNet
import torchmetrics
import lightning as L

from minerva.models.nets import UNet
from minerva.utils.data import RandomDataModule


Expand Down
2 changes: 1 addition & 1 deletion tests/models/nets/test_wisenet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import torch

from minerva.models.nets.wisenet import WiseNet
from minerva.models.nets import WiseNet


def test_wisenet_loss():
Expand Down
Loading