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

Remove unused modules #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 2 additions & 6 deletions dedalus/core/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

"""

from functools import reduce
import numpy as np
from scipy import sparse
import itertools
import operator
import numbers
import numexpr as ne
from collections import defaultdict
from math import prod

from .domain import Domain
Expand All @@ -19,12 +16,11 @@
from .basis import Basis
from .operators import convert
from ..tools.array import kron
from ..tools.cache import CachedAttribute, CachedMethod
from ..tools.cache import CachedMethod
from ..tools.dispatch import MultiClass
from ..tools.exceptions import NonlinearOperatorError
from ..tools.exceptions import SymbolicParsingError
from ..tools.exceptions import SkipDispatchException
from ..tools.general import unify_attributes, DeferredTuple
from ..tools.general import unify_attributes

# Public interface
__all__ = ['Add',
Expand Down
1 change: 0 additions & 1 deletion dedalus/core/coords.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Coordinates and coordinate sytems."""

import numpy as np
from ..libraries.dedalus_sphere import jacobi
from ..libraries import dedalus_sphere

from ..tools.array import nkron, sparse_block_diag
Expand Down
2 changes: 0 additions & 2 deletions dedalus/core/distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import numbers

from .coords import CoordinateSystem, DirectProduct
from ..tools.array import reshape_vector
from ..tools.cache import CachedMethod, CachedAttribute
from ..tools.config import config
from ..tools.general import OrderedSet
Expand All @@ -26,7 +25,6 @@
from .transposes import FFTWTranspose as TransposePlanner
elif TRANSPOSE_LIBRARY.upper() == 'MPI':
from .transposes import AlltoallvTranspose as TransposePlanner
from .transposes import RowDistributor, ColDistributor

# Public interface
__all__ = ['Distributor']
Expand Down
14 changes: 2 additions & 12 deletions dedalus/core/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,16 @@

"""

import weakref
from functools import partial, reduce
from collections import defaultdict
import numpy as np
from mpi4py import MPI
from scipy import sparse
from scipy.sparse import linalg as splinalg
from numbers import Number
import h5py
from math import prod


from ..libraries.fftw import fftw_wrappers as fftw
from ..tools.config import config
from ..tools.cache import CachedMethod, CachedAttribute
from ..tools.exceptions import UndefinedParityError
from ..tools.exceptions import SymbolicParsingError
from ..tools.exceptions import NonlinearOperatorError
from ..tools.exceptions import DependentOperatorError
from ..tools.general import unify, unify_attributes, DeferredTuple, OrderedSet
from ..tools.cache import CachedAttribute
from ..tools.general import OrderedSet
from ..tools.random_arrays import ChunkedRandomArray

import logging
Expand Down
6 changes: 1 addition & 5 deletions dedalus/core/future.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@

"""

import numpy as np
from functools import partial

from .field import Operand, Field, LockedField
from .domain import Domain
#from .domain import Domain
from ..tools.general import OrderedSet, unify_attributes
from ..tools.cache import CachedAttribute, CachedMethod
from ..tools.cache import CachedAttribute

import logging
logger = logging.getLogger(__name__.split('.')[-1])
Expand Down
11 changes: 3 additions & 8 deletions dedalus/core/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

"""

from collections import defaultdict
from functools import partial, reduce
from functools import reduce
import numpy as np
import scipy.special as scp
from scipy import sparse
from numbers import Number
from inspect import isclass
from operator import add
from math import prod
from ..libraries import dedalus_sphere
import logging
Expand All @@ -20,14 +17,12 @@
from . import coords
from .field import Operand, Field
from .future import Future, FutureField, FutureLockedField
from ..tools.array import reshape_vector, apply_matrix, add_sparse, axindex, axslice, perm_matrix, copyto, sparse_block_diag, interleave_matrices
from ..tools.array import apply_matrix, axslice, perm_matrix, copyto, sparse_block_diag, interleave_matrices
from ..tools.cache import CachedAttribute, CachedMethod
from ..tools.dispatch import MultiClass
from ..tools.exceptions import NonlinearOperatorError
from ..tools.exceptions import SymbolicParsingError
from ..tools.exceptions import UndefinedParityError
from ..tools.exceptions import SkipDispatchException
from ..tools.general import unify, unify_attributes, is_complex_dtype
from ..tools.general import unify_attributes, is_complex_dtype

# Public interface
__all__ = ['GeneralFunction',
Expand Down
10 changes: 2 additions & 8 deletions dedalus/core/subsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
Classes for manipulating pencils.

"""

from functools import partial, reduce
from itertools import product
from collections import defaultdict
import numpy as np
from scipy import sparse
from mpi4py import MPI
import uuid
from math import prod

from .domain import Domain
from ..tools.array import zeros_with_pattern, expand_pattern, sparse_block_diag, copyto, perm_matrix, drop_empty_rows, apply_sparse, assert_sparse_pinv
from ..tools.array import zeros_with_pattern, expand_pattern, copyto, perm_matrix, drop_empty_rows, apply_sparse, assert_sparse_pinv
from ..tools.cache import CachedAttribute, CachedMethod
from ..tools.general import replace, OrderedSet
from ..tools.general import OrderedSet
from ..tools.progress import log_progress

import logging
Expand Down
3 changes: 0 additions & 3 deletions dedalus/core/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import numpy as np
from math import prod

from ..tools.cache import CachedMethod
from ..tools.general import unify


class CoeffSystem:
"""
Expand Down
1 change: 0 additions & 1 deletion dedalus/libraries/dedalus_sphere/ball_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from dedalus.tools.cache import CachedMethod
from dedalus.tools.array import reshape_vector
from . import clenshaw
from . import jacobi128 as jacobi
import time

from dedalus.tools.config import config
Expand Down
5 changes: 2 additions & 3 deletions dedalus/libraries/dedalus_sphere/shell.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
from . import jacobi as Jacobi
from .operators import Operator, Codomain, infinite_csr
from . import jacobi as Jacobi
from .operators import Operator, Codomain


# The defalut configuration for the base Jacobi parameter.
Expand Down
2 changes: 1 addition & 1 deletion dedalus/libraries/dedalus_sphere/zernike.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from . import jacobi as Jacobi
from .operators import Operator, infinite_csr
from .operators import Operator


# The defalut configuration for the base Jacobi parameter.
Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_cylinder_calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic
from dedalus.core import coords, distributor, basis, field, operators
from dedalus.tools.cache import CachedFunction


Expand Down
4 changes: 1 addition & 3 deletions dedalus/tests/test_cylinder_ncc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers, arithmetic
from dedalus.core import future
from dedalus.tools.array import apply_matrix
from dedalus.core import coords, distributor, basis, operators, problems, solvers, arithmetic
from dedalus.tools.cache import CachedFunction


Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_cylinder_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic, problems, solvers
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers
from dedalus.tools.cache import CachedFunction
from dedalus.core.basis import DiskBasis

Expand Down
1 change: 0 additions & 1 deletion dedalus/tests/test_nlbvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pytest
import numpy as np
import dedalus.public as d3
from dedalus.tools.cache import CachedFunction


@pytest.mark.parametrize('N', [12])
Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_polar_calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic
from dedalus.core import coords, distributor, basis, field, operators
from dedalus.tools.cache import CachedFunction


Expand Down
2 changes: 0 additions & 2 deletions dedalus/tests/test_polar_ncc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers, arithmetic
from dedalus.core import future
from dedalus.tools.array import apply_matrix
from dedalus.tools.cache import CachedFunction

# TODO: add in alpha and k
Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_polar_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic, problems, solvers
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers
from dedalus.tools.cache import CachedFunction
from dedalus.core.basis import DiskBasis

Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_sphere_calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic, problems, solvers
from dedalus.core import coords, distributor, basis, field, operators, problems
from dedalus.tools.cache import CachedFunction
from scipy.special import sph_harm

Expand Down
4 changes: 1 addition & 3 deletions dedalus/tests/test_sphere_ncc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers, arithmetic
from dedalus.core import future
from dedalus.tools.array import apply_matrix
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers
from dedalus.tools.cache import CachedFunction
from dedalus.core.arithmetic import DotProduct as dot

Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_spherical_calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic
from dedalus.core import coords, distributor, basis, field, operators
from dedalus.tools.cache import CachedFunction


Expand Down
4 changes: 2 additions & 2 deletions dedalus/tests/test_spherical_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic, problems, solvers
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers
from dedalus.tools.cache import CachedFunction
from dedalus.core.basis import BallBasis, ShellBasis
from dedalus.core.basis import BallBasis


Nphi_range = [8]
Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests/test_transforms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators
from dedalus.core import coords, distributor, basis, field
from dedalus.tools.cache import CachedFunction
from mpi4py import MPI

Expand Down
2 changes: 1 addition & 1 deletion dedalus/tests_parallel/test_output_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers, timesteppers, arithmetic
from dedalus.core import coords, distributor, basis, field, operators, problems, solvers, timesteppers
from dedalus.tools.parallel import Sync
from dedalus.tools import post
import shutil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import pytest
import numpy as np
from dedalus.core import coords, distributor, basis, field, operators, arithmetic
from dedalus.core import coords, distributor, basis, field
from dedalus.tools.cache import CachedMethod
from mpi4py import MPI

Expand Down
1 change: 0 additions & 1 deletion dedalus/tools/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import scipy.sparse as sp
from scipy.sparse import _sparsetools
from scipy.sparse import linalg as spla
from math import prod

from .config import config
from . import linalg as cython_linalg
Expand Down
1 change: 0 additions & 1 deletion examples/ivp_2d_rayleigh_benard/plot_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"""

import h5py
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
Expand Down
1 change: 0 additions & 1 deletion examples/ivp_2d_shear_flow/plot_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"""

import h5py
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import numpy as np
import matplotlib.pyplot as plt
import h5py
import pathlib
from docopt import docopt

# Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D


def build_s2_vertices(phi, theta):
Expand Down
1 change: 0 additions & 1 deletion examples/ivp_disk_libration/plot_scalars.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import numpy as np
import matplotlib.pyplot as plt
import h5py
import pathlib
from docopt import docopt

# Parameters
Expand Down
1 change: 0 additions & 1 deletion examples/ivp_shell_convection/plot_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D


def build_s2_vertices(phi, theta):
Expand Down
1 change: 0 additions & 1 deletion examples/ivp_sphere_shallow_water/plot_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D


def build_s2_coord_vertices(phi, theta):
Expand Down