-
Notifications
You must be signed in to change notification settings - Fork 176
Remove star imports from __init__.py
#4722
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
3face9f
3166f59
da7582b
d7bcf00
f00bd88
595c669
5c7bc7d
562b51f
a5611b6
4b8976d
ccf2288
4539fa7
50cbf12
15d94e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,8 +45,8 @@ def init_petsc(): | |
| del atexit | ||
| del petsc | ||
|
|
||
| from ufl import * | ||
| from finat.ufl import * | ||
| from ufl import * # noqa: F401 | ||
| from finat.ufl import * # noqa: F401 | ||
|
|
||
| from pyop2 import op2 # noqa: F401 | ||
| from pyop2.mpi import COMM_WORLD, COMM_SELF # noqa: F401 | ||
|
|
@@ -56,41 +56,110 @@ def init_petsc(): | |
| petsctools.cite("FiredrakeUserManual") | ||
| del petsctools | ||
|
|
||
| from firedrake.assemble import * | ||
| from firedrake.bcs import * | ||
| from firedrake.checkpointing import * | ||
| from firedrake.cofunction import * | ||
| from firedrake.constant import * | ||
| from firedrake.deflation import * | ||
| from firedrake.exceptions import * | ||
| from firedrake.function import * | ||
| from firedrake.functionspace import * | ||
| from firedrake.interpolation import * | ||
| from firedrake.linear_solver import * | ||
| from firedrake.preconditioners import * | ||
| from firedrake.mesh import * | ||
| from firedrake.mg.mesh import * | ||
| from firedrake.mg.interface import * | ||
| from firedrake.mg.embedded import * | ||
| from firedrake.mg.opencascade_mh import * | ||
| from firedrake.norms import * | ||
| from firedrake.nullspace import * | ||
| from firedrake.parameters import * | ||
| from firedrake.parloops import * | ||
| from firedrake.projection import * | ||
| from firedrake.slate import * | ||
| from firedrake.slope_limiter import * | ||
| from firedrake.solving import * | ||
| from firedrake.ufl_expr import * | ||
| from firedrake.utility_meshes import * | ||
| from firedrake.variational_solver import * | ||
| from firedrake.eigensolver import * | ||
| from firedrake.ensemble import * | ||
| from firedrake.randomfunctiongen import * | ||
| from firedrake.external_operators import * | ||
| from firedrake.assemble import assemble # noqa: F401 | ||
| from firedrake.bcs import DirichletBC, homogenize, EquationBC # noqa: F401 | ||
| from firedrake.checkpointing import ( # noqa: F401 | ||
| DumbCheckpoint, HDF5File, FILE_READ, FILE_CREATE, | ||
| FILE_UPDATE, CheckpointFile | ||
| ) | ||
| from firedrake.cofunction import Cofunction, RieszMap # noqa: F401 | ||
| from firedrake.constant import Constant # noqa: F401 | ||
| from firedrake.deflation import DeflatedSNES, Deflation # noqa: F401 | ||
| from firedrake.exceptions import ConvergenceError # noqa: F401 | ||
| from firedrake.function import ( # noqa: F401 | ||
| Function, PointNotInDomainError, | ||
| CoordinatelessFunction, PointEvaluator | ||
| ) | ||
| from firedrake.functionspace import ( # noqa: F401 | ||
| MixedFunctionSpace, FunctionSpace, VectorFunctionSpace, | ||
| TensorFunctionSpace, RestrictedFunctionSpace | ||
| ) | ||
| from firedrake.interpolation import ( # noqa: F401 | ||
| interpolate, Interpolate, Interpolator, DofNotDefinedError, | ||
| CrossMeshInterpolator, SameMeshInterpolator | ||
| ) | ||
| from firedrake.linear_solver import LinearSolver # noqa: F401 | ||
| from firedrake.preconditioners import ( # noqa: F401 | ||
| PCBase, SNESBase, PCSNESBase, ASMPatchPC, ASMStarPC, ASMVankaPC, | ||
| ASMLinesmoothPC, ASMExtrudedStarPC, AssembledPC, AuxiliaryOperatorPC, | ||
| MassInvPC, PCDPC, PatchPC, PlaneSmoother, PatchSNES, P1PC, P1SNES, | ||
| LORPC, GTMGPC, PMGPC, PMGSNES, HypreAMS, HypreADS, FDMPC, | ||
| PoissonFDMPC, TwoLevelPC, HiptmairPC, FacetSplitPC, BDDCPC | ||
| ) | ||
| from firedrake.mesh import ( # noqa: F401 | ||
| Mesh, ExtrudedMesh, VertexOnlyMesh, RelabeledMesh, | ||
| SubDomainData, unmarked, DistributedMeshOverlapType, | ||
| DEFAULT_MESH_NAME, MeshGeometry, MeshTopology, | ||
| AbstractMeshTopology, ExtrudedMeshTopology, Submesh, | ||
| VertexOnlyMeshTopology, VertexOnlyMeshMissingPointsError, | ||
| MeshSequenceGeometry, MeshSequenceTopology | ||
| ) | ||
| from firedrake.mg import ( # noqa: F401 | ||
| HierarchyBase, MeshHierarchy, ExtrudedMeshHierarchy, | ||
| NonNestedHierarchy, SemiCoarsenedExtrudedHierarchy, | ||
| prolong, restrict, inject, TransferManager, | ||
| OpenCascadeMeshHierarchy | ||
| ) | ||
| from firedrake.norms import errornorm, norm # noqa: F401 | ||
| from firedrake.nullspace import VectorSpaceBasis, MixedVectorSpaceBasis # noqa: F401 | ||
| from firedrake.parameters import ( # noqa: F401 | ||
| Parameters, parameters, disable_performance_optimisations | ||
| ) | ||
| from firedrake.parloops import ( # noqa: F401 | ||
| par_loop, direct, READ, WRITE, RW, INC, MIN, MAX | ||
| ) | ||
| from firedrake.projection import ( # noqa: F401 | ||
| project, Projector | ||
| ) | ||
| from firedrake.slate import ( # noqa: F401 | ||
| AssembledVector, Block, Factorization, Tensor, Inverse, | ||
| Transpose, Negative, Add, Mul, Solve, BlockAssembledVector, | ||
| DiagonalTensor, Reciprocal, HybridizationPC, SchurComplementBuilder, | ||
| SCPC, TensorOp | ||
| ) | ||
| from firedrake.slope_limiter import ( # noqa: F401 | ||
| Limiter, VertexBasedLimiter | ||
| ) | ||
| from firedrake.solving import solve # noqa: F401 | ||
| from firedrake.ufl_expr import ( # noqa: F401 | ||
| Argument, Coargument, TestFunction, TrialFunction, | ||
| TestFunctions, TrialFunctions, derivative, adjoint, | ||
| action, CellSize, FacetNormal | ||
| ) | ||
| from firedrake.utility_meshes import ( # noqa: F401 | ||
| IntervalMesh, UnitIntervalMesh, PeriodicIntervalMesh, | ||
| PeriodicUnitIntervalMesh, UnitTriangleMesh, RectangleMesh, | ||
| TensorRectangleMesh, SquareMesh, UnitSquareMesh, PeriodicRectangleMesh, | ||
| PeriodicSquareMesh, PeriodicUnitSquareMesh, CircleManifoldMesh, | ||
| UnitDiskMesh, UnitBallMesh, UnitTetrahedronMesh, TensorBoxMesh, | ||
| BoxMesh, CubeMesh, UnitCubeMesh, PeriodicBoxMesh, PeriodicUnitCubeMesh, | ||
| IcosahedralSphereMesh, UnitIcosahedralSphereMesh, OctahedralSphereMesh, | ||
| UnitOctahedralSphereMesh, CubedSphereMesh, UnitCubedSphereMesh, | ||
| TorusMesh, AnnulusMesh, SolidTorusMesh, CylinderMesh | ||
| ) | ||
| from firedrake.variational_solver import ( # noqa: F401 | ||
| LinearVariationalProblem, LinearVariationalSolver, | ||
| NonlinearVariationalProblem, NonlinearVariationalSolver | ||
| ) | ||
| from firedrake.eigensolver import ( # noqa: F401 | ||
| LinearEigenproblem, LinearEigensolver | ||
| ) | ||
| from firedrake.ensemble import ( # noqa: F401 | ||
| Ensemble, EnsembleFunction, EnsembleCofunction, | ||
| EnsembleFunctionSpace, EnsembleDualSpace | ||
| ) | ||
| from firedrake.randomfunctiongen import * # noqa: F401 | ||
| from firedrake.external_operators import ( # noqa: F401 | ||
| AbstractExternalOperator, assemble_method, | ||
| PointexprOperator, point_expr, MLOperator | ||
| ) | ||
| from firedrake.progress_bar import ProgressBar # noqa: F401 | ||
|
|
||
| from firedrake.logging import * | ||
| from firedrake.logging import ( # noqa: F401 | ||
| set_level, set_log_handlers, set_log_level, DEBUG, INFO, | ||
| WARNING, ERROR, CRITICAL, log, debug, info, warning, error, | ||
| critical, info_red, info_green, info_blue, RED, GREEN, BLUE | ||
| ) | ||
| # Set default log level | ||
| set_log_level(WARNING) | ||
| set_log_handlers(comm=COMM_WORLD) | ||
|
|
@@ -100,10 +169,10 @@ def init_petsc(): | |
| # Once `File` is deprecated update the above line removing `File` and add | ||
| # from firedrake._deprecation import output | ||
| # sys.modules["firedrake.output"] = output | ||
| from firedrake.output import * | ||
| from firedrake.output import * # noqa: F401 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah good idea |
||
| import sys | ||
| sys.modules["firedrake.plot"] = plot | ||
| from firedrake.plot import * | ||
| from firedrake.plot import * # noqa: F401 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
|
|
||
| del sys | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| from .assembly import AssembleBlock # NOQA F401 | ||
| from .solving import GenericSolveBlock, SolveLinearSystemBlock, \ | ||
| ProjectBlock, SupermeshProjectBlock, SolveVarFormBlock, \ | ||
| NonlinearVariationalSolveBlock # NOQA F401 | ||
| from .function import FunctionAssignBlock, FunctionMergeBlock, \ | ||
| SubfunctionBlock # NOQA F401 | ||
| from .dirichlet_bc import DirichletBCBlock # NOQA F401 | ||
| from .constant import ConstantAssignBlock # NOQA F401 | ||
| from .mesh import MeshInputBlock, MeshOutputBlock # NOQA F401 | ||
| from firedrake.adjoint_utils.blocks.assembly import AssembleBlock # noqa F401 | ||
| from firedrake.adjoint_utils.blocks.solving import ( # noqa F401 | ||
| GenericSolveBlock, SolveLinearSystemBlock, ProjectBlock, | ||
| SupermeshProjectBlock, SolveVarFormBlock, | ||
| NonlinearVariationalSolveBlock | ||
| ) | ||
| from firedrake.adjoint_utils.blocks.function import ( # noqa F401 | ||
| FunctionAssignBlock, FunctionMergeBlock, SubfunctionBlock | ||
| ) | ||
| from firedrake.adjoint_utils.blocks.dirichlet_bc import DirichletBCBlock # noqa F401 | ||
| from firedrake.adjoint_utils.blocks.constant import ConstantAssignBlock # noqa F401 | ||
| from firedrake.adjoint_utils.blocks.mesh import MeshInputBlock, MeshOutputBlock # noqa F401 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| from firedrake.ensemble.ensemble import * # noqa: F401 | ||
| from firedrake.ensemble.ensemble_function import * # noqa: F401 | ||
| from firedrake.ensemble.ensemble_functionspace import * # noqa: F401 | ||
| from firedrake.ensemble.ensemble import Ensemble # noqa F401 | ||
| from firedrake.ensemble.ensemble_function import ( # noqa F401 | ||
| EnsembleFunction, EnsembleCofunction | ||
| ) | ||
| from firedrake.ensemble.ensemble_functionspace import ( # noqa F401 | ||
| EnsembleFunctionSpace, EnsembleDualSpace | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| from firedrake.external_operators.abstract_external_operators import * # noqa: F401 | ||
| from firedrake.external_operators.point_expr_operator import * # noqa: F401 | ||
| from firedrake.external_operators.ml_operator import * # noqa: F401 | ||
| from firedrake.external_operators.abstract_external_operators import ( # noqa F401 | ||
| AbstractExternalOperator, assemble_method | ||
| ) | ||
| from firedrake.external_operators.point_expr_operator import ( # noqa F401 | ||
| PointexprOperator, point_expr | ||
| ) | ||
| from firedrake.external_operators.ml_operator import MLOperator # noqa F401 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| from firedrake.fml.form_manipulation_language import * # noqa | ||
| from firedrake.fml.replacement import * # noqa | ||
| from firedrake.fml.form_manipulation_language import ( # noqa F401 | ||
| Label, Term, LabelledForm, identity, drop, all_terms, | ||
| keep, subject, name_label | ||
| ) | ||
| from firedrake.fml.replacement import ( # noqa F401 | ||
| replace_test_function, replace_trial_function, replace_subject | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| from .mesh import * # noqa: F401 | ||
| from .interface import * # noqa: F401 | ||
| from .embedded import * # noqa: F401 | ||
| from .opencascade_mh import * # noqa: F401 | ||
| from firedrake.mg.mesh import ( # noqa F401 | ||
| HierarchyBase, MeshHierarchy, ExtrudedMeshHierarchy, | ||
| NonNestedHierarchy, SemiCoarsenedExtrudedHierarchy | ||
| ) | ||
| from firedrake.mg.interface import ( # noqa F401 | ||
| prolong, restrict, inject | ||
| ) | ||
| from firedrake.mg.embedded import TransferManager # noqa F401 | ||
| from firedrake.mg.opencascade_mh import OpenCascadeMeshHierarchy # noqa F401 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| try: | ||
| import vtkmodules.vtkCommonDataModel # noqa: F401 | ||
| from .vtk_output import VTKFile # noqa: F401 | ||
| from firedrake.output.vtk_output import VTKFile # noqa: F401 | ||
| except ModuleNotFoundError: | ||
| from .vtk_unavailable import VTKFile # noqa: F401 | ||
| from firedrake.output.vtk_unavailable import VTKFile # noqa: F401 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,26 @@ | ||
| from firedrake.preconditioners.base import * # noqa: F401 | ||
| from firedrake.preconditioners.asm import * # noqa: F401 | ||
| from firedrake.preconditioners.assembled import * # noqa: F401 | ||
| from firedrake.preconditioners.massinv import * # noqa: F401 | ||
| from firedrake.preconditioners.pcd import * # noqa: F401 | ||
| from firedrake.preconditioners.patch import * # noqa: F401 | ||
| from firedrake.preconditioners.low_order import * # noqa: F401 | ||
| from firedrake.preconditioners.gtmg import * # noqa: F401 | ||
| from firedrake.preconditioners.pmg import * # noqa: F401 | ||
| from firedrake.preconditioners.hypre_ams import * # noqa: F401 | ||
| from firedrake.preconditioners.hypre_ads import * # noqa: F401 | ||
| from firedrake.preconditioners.fdm import * # noqa: F401 | ||
| from firedrake.preconditioners.hiptmair import * # noqa: F401 | ||
| from firedrake.preconditioners.facet_split import * # noqa: F401 | ||
| from firedrake.preconditioners.bddc import * # noqa: F401 | ||
| from firedrake.preconditioners.base import ( # noqa: F401 | ||
| PCBase, SNESBase, PCSNESBase | ||
| ) | ||
| from firedrake.preconditioners.asm import ( # noqa: F401 | ||
| ASMPatchPC, ASMStarPC, ASMVankaPC, | ||
| ASMLinesmoothPC, ASMExtrudedStarPC | ||
| ) | ||
| from firedrake.preconditioners.assembled import ( # noqa: F401 | ||
| AssembledPC, AuxiliaryOperatorPC | ||
| ) | ||
| from firedrake.preconditioners.massinv import MassInvPC # noqa: F401 | ||
| from firedrake.preconditioners.pcd import PCDPC # noqa: F401 | ||
| from firedrake.preconditioners.patch import ( # noqa: F401 | ||
| PatchPC, PlaneSmoother, PatchSNES | ||
| ) | ||
| from firedrake.preconditioners.low_order import ( # noqa: F401 | ||
| P1PC, P1SNES, LORPC | ||
| ) | ||
| from firedrake.preconditioners.gtmg import GTMGPC # noqa: F401 | ||
| from firedrake.preconditioners.pmg import PMGPC, PMGSNES # noqa: F401 | ||
| from firedrake.preconditioners.hypre_ams import HypreAMS # noqa: F401 | ||
| from firedrake.preconditioners.hypre_ads import HypreADS # noqa: F401 | ||
| from firedrake.preconditioners.fdm import FDMPC, PoissonFDMPC # noqa: F401 | ||
| from firedrake.preconditioners.hiptmair import TwoLevelPC, HiptmairPC # noqa: F401 | ||
| from firedrake.preconditioners.facet_split import FacetSplitPC # noqa: F401 | ||
| from firedrake.preconditioners.bddc import BDDCPC # noqa: F401 |
Uh oh!
There was an error while loading. Please reload this page.