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

Change name to NDStorage #148

Merged
merged 5 commits into from
Jun 13, 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
7 changes: 7 additions & 0 deletions python/ndstorage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "ndstorage"

from ndstorage.ndstorage_base import NDStorageAPI, WritableNDStorageAPI
from ndstorage._superclass import Dataset
from ndstorage.ndtiff_dataset import NDTiffDataset
from ndstorage.ndram_dataset import NDRAMDataset
from ndstorage.ndtiff_pyramid_dataset import NDTiffPyramidDataset
10 changes: 5 additions & 5 deletions python/ndtiff/_superclass.py → python/ndstorage/_superclass.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
from ndtiff.ndtiff_dataset import NDTiffDataset
from ndtiff.ndtiff_pyramid_dataset import NDTiffPyramidDataset
from ndtiff.old_format_version_readers.nd_tiff_v2 import NDTiff_v2_0
from ndtiff.old_format_version_readers.ndtiff_v1 import NDTiff_v1
from ndstorage.ndtiff_dataset import NDTiffDataset
from ndstorage.ndtiff_pyramid_dataset import NDTiffPyramidDataset
from ndstorage.old_format_version_readers.nd_tiff_v2 import NDTiff_v2_0
from ndstorage.old_format_version_readers.ndtiff_v1 import NDTiff_v1
import numpy as np
from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO

class Dataset:
"""
Expand Down
2 changes: 1 addition & 1 deletion python/ndtiff/_version.py → python/ndstorage/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (3, 1, 0)
version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List, Dict, Union

import threading
from ndtiff.ndstorage_base import WritableNDStorageAPI, NDStorageBase
from ndstorage.ndstorage_base import WritableNDStorageAPI, NDStorageBase


class NDRAMDataset(NDStorageBase, WritableNDStorageAPI):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import dask.array as da
import threading

from ndtiff.ndtiff_file import _POSITION_AXIS, _ROW_AXIS, _COLUMN_AXIS, _Z_AXIS, _TIME_AXIS, _CHANNEL_AXIS
from ndstorage.ndtiff_file import _POSITION_AXIS, _ROW_AXIS, _COLUMN_AXIS, _Z_AXIS, _TIME_AXIS, _CHANNEL_AXIS

# Standard order of axes when opening data. Data does not need to be acquired in this order -- this is just a convention
_AXIS_ORDER = {_ROW_AXIS: 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import warnings
import re

from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndtiff.ndtiff_file import SingleNDTiffReader
from ndtiff.ndtiff_file import _CHANNEL_AXIS
from ndtiff.ndtiff_index import NDTiffIndexEntry, read_ndtiff_index
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.ndtiff_file import SingleNDTiffReader
from ndstorage.ndtiff_file import _CHANNEL_AXIS
from ndstorage.ndtiff_index import NDTiffIndexEntry, read_ndtiff_index

from ndtiff.ndtiff_file import SingleNDTiffWriter, MAJOR_VERSION, MINOR_VERSION
from ndstorage.ndtiff_file import SingleNDTiffWriter, MAJOR_VERSION, MINOR_VERSION

from ndtiff.ndstorage_base import WritableNDStorageAPI, NDStorageBase
from ndstorage.ndstorage_base import WritableNDStorageAPI, NDStorageBase

class NDTiffDataset(NDStorageBase, WritableNDStorageAPI):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import warnings
from collections import OrderedDict
from io import BytesIO
from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndtiff.ndtiff_index import NDTiffIndexEntry
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.ndtiff_index import NDTiffIndexEntry

from collections import deque
from concurrent.futures import ThreadPoolExecutor
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import numpy as np
import threading
from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndtiff.ndtiff_dataset import NDTiffDataset
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.ndtiff_dataset import NDTiffDataset

class NDTiffPyramidDataset:
"""Class that opens a single NDTiffStorage multi-resolution pyramid dataset"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import warnings
import struct
import threading
from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO

_POSITION_AXIS = "position"
_ROW_AXIS = "row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import dask.array as da
import warnings
import struct
from ndtiff.file_io import NDTiffFileIO, BUILTIN_FILE_IO
from ndstorage.file_io import NDTiffFileIO, BUILTIN_FILE_IO

class _MultipageTiffReader:
# Class corresponsing to a single multipage tiff file in a Micro-Magellan dataset. Pass the full path of the TIFF to
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from ndtiff import Dataset
from ndstorage import Dataset
import os


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from ndtiff import Dataset, file_io
from ndstorage import Dataset, file_io
import os
import pytest
from typing import List
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# import numpy as np
# import os
# import shutil
# from ndtiff.ndtiff_file import SingleNDTiffWriter, SingleNDTiffReader
# from ndtiff.ndtiff_dataset import NDTiffDataset
# from ndstorage.ndtiff_file import SingleNDTiffWriter, SingleNDTiffReader
# from ndstorage.ndtiff_dataset import NDTiffDataset
# import pytest
# import time
# from tqdm import tqdm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import numpy as np
import os
import shutil
from ndtiff.ndtiff_file import SingleNDTiffWriter, SingleNDTiffReader
from ndtiff.ndtiff_dataset import NDTiffDataset
from ndtiff.ndram_dataset import NDRAMDataset
from ndstorage.ndtiff_file import SingleNDTiffWriter, SingleNDTiffReader
from ndstorage.ndtiff_dataset import NDTiffDataset
from ndstorage.ndram_dataset import NDRAMDataset
import pytest

@pytest.fixture(scope="function")
Expand Down
7 changes: 0 additions & 7 deletions python/ndtiff/__init__.py

This file was deleted.

8 changes: 4 additions & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = fh.read()

# extract version
path = path.realpath("ndtiff/_version.py")
path = path.realpath("ndstorage/_version.py")
version_ns = {}
with open(path, encoding="utf8") as f:
exec(f.read(), {}, version_ns)
Expand All @@ -15,14 +15,14 @@
requirements = f.read().splitlines()

setuptools.setup(
name="ndtiff",
name="ndstorage",
version=version,
author="Henry Pinkard",
author_email="[email protected]",
description="Python libraries for NDTiff datasets",
description="Python libraries for N-dimensional datasets, including NDTiff",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/micro-manager/NDTiffStorage",
url="https://github.com/micro-manager/NDStorage",
packages=setuptools.find_packages(),
install_requires=requirements,
python_requires=">=3.6",
Expand Down
Loading