Skip to content

Commit

Permalink
Fix imports in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Jun 3, 2024
1 parent e5b97f1 commit 0618a89
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 34 deletions.
16 changes: 8 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@

from . import logger

from nomad_simulations import Simulation
from nomad_simulations.model_system import ModelSystem, AtomicCell
from nomad_simulations.atoms_state import AtomsState, OrbitalsState
from nomad_simulations.model_method import ModelMethod
from nomad_simulations.numerical_settings import (
from nomad_simulations.schema import Simulation
from nomad_simulations.schema_sections.model_system import ModelSystem, AtomicCell
from nomad_simulations.schema_sections.atoms_state import AtomsState, OrbitalsState
from nomad_simulations.schema_sections.model_method import ModelMethod
from nomad_simulations.schema_sections.numerical_settings import (
SelfConsistency,
KSpace,
KMesh as KMeshSettings,
KLinePath as KLinePathSettings,
)
from nomad_simulations.outputs import Outputs, SCFOutputs
from nomad_simulations.variables import Energy2 as Energy
from nomad_simulations.properties import (
from nomad_simulations.schema_sections.outputs import Outputs, SCFOutputs
from nomad_simulations.schema_sections.variables import Energy2 as Energy
from nomad_simulations.schema_sections.properties import (
ElectronicBandGap,
DOSProfile,
ElectronicDensityOfStates,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_atoms_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from . import logger

from nomad_simulations.atoms_state import (
from nomad_simulations.schema_sections.atoms_state import (
OrbitalsState,
CoreHole,
HubbardInteractions,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_band_gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

from . import logger

from nomad_simulations.properties import ElectronicBandGap
from nomad_simulations.variables import Temperature
from nomad_simulations.schema_sections.properties import ElectronicBandGap
from nomad_simulations.schema_sections.variables import Temperature


class TestElectronicBandGap:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_energies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.
#

from nomad_simulations.properties import FermiLevel, ChemicalPotential
from nomad_simulations.schema_sections.properties import FermiLevel, ChemicalPotential


class TestFermiLevel:
Expand Down
5 changes: 4 additions & 1 deletion tests/test_hopping_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
import pytest
import numpy as np

from nomad_simulations.properties import HoppingMatrix, CrystalFieldSplitting
from nomad_simulations.schema_sections.properties import (
HoppingMatrix,
CrystalFieldSplitting,
)


class TestHoppingMatrix:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_model_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from . import logger
from .conftest import generate_atomic_cell

from nomad_simulations.model_system import (
from nomad_simulations.schema_sections.model_system import (
Symmetry,
ChemicalFormula,
ModelSystem,
Expand Down
6 changes: 5 additions & 1 deletion tests/test_numerical_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
from nomad.units import ureg
from nomad.datamodel import EntryArchive

from nomad_simulations.numerical_settings import KMesh, KLinePath, KSpaceFunctionalities
from nomad_simulations.schema_sections.numerical_settings import (
KMesh,
KLinePath,
KSpaceFunctionalities,
)

from . import logger
from .conftest import generate_k_line_path, generate_k_space_simulation
Expand Down
2 changes: 1 addition & 1 deletion tests/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from . import logger
from .conftest import generate_scf_electronic_band_gap_template

from nomad_simulations.outputs import Outputs, ElectronicBandGap
from nomad_simulations.schema_sections.outputs import Outputs, ElectronicBandGap


class TestOutputs:
Expand Down
12 changes: 6 additions & 6 deletions tests/test_permittivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

from . import logger

from nomad_simulations import Simulation
from nomad_simulations.model_system import ModelSystem, AtomicCell
from nomad_simulations.atoms_state import AtomsState
from nomad_simulations.outputs import Outputs
from nomad_simulations.properties import Permittivity
from nomad_simulations.variables import Variables, KMesh, Frequency
from nomad_simulations.schema import Simulation
from nomad_simulations.schema_sections.model_system import ModelSystem, AtomicCell
from nomad_simulations.schema_sections.atoms_state import AtomsState
from nomad_simulations.schema_sections.outputs import Outputs
from nomad_simulations.schema_sections.properties import Permittivity
from nomad_simulations.schema_sections.variables import Variables, KMesh, Frequency

from .conftest import generate_k_space_simulation

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

from . import logger

from nomad_simulations.variables import Variables
from nomad_simulations.physical_property import PhysicalProperty
from nomad_simulations.schema_sections.variables import Variables
from nomad_simulations.schema_sections.physical_property import PhysicalProperty


class DummyPhysicalProperty(PhysicalProperty):
Expand Down
12 changes: 6 additions & 6 deletions tests/test_spectral_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@

from . import logger

from nomad_simulations import Simulation
from nomad_simulations.model_system import ModelSystem, AtomicCell
from nomad_simulations.atoms_state import AtomsState
from nomad_simulations.outputs import Outputs
from nomad_simulations.properties import (
from nomad_simulations.schema import Simulation
from nomad_simulations.schema_sections.model_system import ModelSystem, AtomicCell
from nomad_simulations.schema_sections.atoms_state import AtomsState
from nomad_simulations.schema_sections.outputs import Outputs
from nomad_simulations.schema_sections.properties import (
SpectralProfile,
ElectronicDensityOfStates,
AbsorptionSpectrum,
XASSpectrum,
)
from nomad_simulations.variables import Energy2 as Energy
from nomad_simulations.schema_sections.variables import Energy2 as Energy


class TestSpectralProfile:
Expand Down
10 changes: 7 additions & 3 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@

from nomad.units import ureg

from nomad_simulations.utils import (
from nomad_simulations.schema_sections.utils import (
get_sibling_section,
is_not_representative,
get_variables,
)
from nomad_simulations.model_system import ModelSystem, AtomicCell, Symmetry
from nomad_simulations.variables import Temperature, Energy2 as Energy
from nomad_simulations.schema_sections.model_system import (
ModelSystem,
AtomicCell,
Symmetry,
)
from nomad_simulations.schema_sections.variables import Temperature, Energy2 as Energy

from . import logger

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

from . import logger

from nomad_simulations.variables import Variables
from nomad_simulations.schema_sections.variables import Variables


class TestVariables:
Expand Down

0 comments on commit 0618a89

Please sign in to comment.