Skip to content

Commit

Permalink
Adding and updating __init__ files for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalatino committed Feb 14, 2024
1 parent 5f8b103 commit b83f882
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ndsl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
from .constants import ConstantVersions
from .exceptions import OutOfBoundsError
from .logging import ndsl_log
from .optional_imports import RaiseWhenAccessed
from .types import Allocator, AsyncRequest, NumpyModule
from .units import UnitsError
from .utils import MetaEnumStr
3 changes: 2 additions & 1 deletion ndsl/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
from numpy.lib.index_tricks import IndexExpression

from ndsl.performance.timer import NullTimer, Timer
from ndsl.types import Allocator
from ndsl.utils import (
device_synchronize,
Expand All @@ -13,6 +12,8 @@
safe_mpi_allocate,
)

from .performance.timer import NullTimer, Timer


BufferKey = Tuple[Callable, Iterable[int], type]
BUFFER_CACHE: Dict[BufferKey, List["Buffer"]] = {}
Expand Down
15 changes: 15 additions & 0 deletions ndsl/comm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from .boundary import SimpleBoundary
from .caching_comm import (
CachingCommData,
CachingCommReader,
CachingCommWriter,
CachingRequestReader,
CachingRequestWriter,
NullRequest,
)
from .comm_abc import Comm, Request
from .communicator import CubedSphereCommunicator, TileCommunicator
from .local_comm import AsyncResult, ConcurrencyError, LocalComm
from .mpi import MPIComm
from .null_comm import NullAsyncResult, NullComm
from .partitioner import CubedSpherePartitioner, TilePartitioner
5 changes: 3 additions & 2 deletions ndsl/dsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
from .dace.dace_config import DaceConfig, DaCeOrchestration
from .dace.orchestration import orchestrate, orchestrate_function
from .stencil import (
CompilationConfig,
CompareToNumpyStencil,
FrozenStencil,
GridIndexing,
StencilConfig,
StencilFactory,
TimingCollector,
)
from .stencil_config import CompilationConfig, RunMode, StencilConfig


if MPI is not None:
Expand Down
1 change: 1 addition & 0 deletions ndsl/dsl/caches/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .codepath import FV3CodePath
4 changes: 2 additions & 2 deletions ndsl/dsl/dace/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from ndsl.dsl.dace.dace_config import DaceConfig
from ndsl.dsl.dace.orchestration import orchestrate
from .dace_config import DaceConfig
from .orchestration import orchestrate
6 changes: 6 additions & 0 deletions ndsl/halo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from .data_transformer import (
HaloDataTransformerCPU,
HaloDataTransformerGPU,
HaloExchangeSpec,
)
from .updater import HaloUpdater, HaloUpdateRequest, VectorInterfaceHaloUpdater
7 changes: 7 additions & 0 deletions ndsl/performance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
from .collector import (
AbstractPerformanceCollector,
NullPerformanceCollector,
PerformanceCollector,
)
from .config import PerformanceConfig
from .profiler import NullProfiler, Profiler
from .report import Experiment, Report, TimeReport
from .timer import NullTimer, Timer
4 changes: 4 additions & 0 deletions ndsl/stencils/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
from .c2l_ord import CubedToLatLon
from .corners import CopyCorners, CopyCornersXY, FillCornersBGrid


__version__ = "0.2.0"
1 change: 1 addition & 0 deletions ndsl/stencils/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ParallelTranslate2Py,
ParallelTranslate2PyState,
ParallelTranslateBaseSlicing,
ParallelTranslateGrid,
)
from .savepoint import SavepointCase, Translate, dataset_to_dict
from .temporaries import assert_same_temporaries, copy_temporaries
Expand Down
Empty file added tests/checkpointer/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions tests/dsl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .test_stencil_wrapper import MockFieldInfo
from .test_caches import OrchestratedProgam
Empty file added tests/mpi/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion tests/mpi/test_mpi_halo_update.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import copy

import pytest
from mpi_comm import MPI

from ndsl.comm._boundary_utils import get_boundary_slice
from ndsl.comm.communicator import CubedSphereCommunicator
Expand All @@ -25,6 +24,8 @@
)
from ndsl.quantity import Quantity

from .mpi_comm import MPI


@pytest.fixture
def dtype(numpy):
Expand Down
3 changes: 2 additions & 1 deletion tests/mpi/test_mpi_mock.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import numpy as np
import pytest
from mpi_comm import MPI

from ndsl.comm.communicator import recv_buffer
from ndsl.testing import ConcurrencyError, DummyComm

from .mpi_comm import MPI


worker_function_list = []

Expand Down
Empty file added tests/quantity/__init__.py
Empty file.

0 comments on commit b83f882

Please sign in to comment.