Skip to content

Commit

Permalink
Fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePizarro3 committed Aug 15, 2024
1 parent 2efe6e1 commit a80641f
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nomad_simulations/schema_packages/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def multiplicity(self):
@property
def degeneracy(self):
return factorial(int(self.multiplicity)) / (
factorial(int(self.multiplicity - self.occupation)) * factorial(self.occupation)
factorial(int(self.multiplicity - self.occupation))
* factorial(self.occupation)
)


Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import pytest
from nomad.datamodel import EntryArchive
from nomad.units import ureg

from nomad_simulations.schema_packages.atoms_state import AtomsState, OrbitalsState
from nomad_simulations.schema_packages.general import Simulation
from nomad_simulations.schema_packages.model_method import ModelMethod
Expand Down
1 change: 1 addition & 0 deletions tests/test_atoms_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pytest
from nomad.datamodel import EntryArchive
from nomad.units import ureg

from nomad_simulations.schema_packages.atoms_state import (
AtomsState,
CoreHole,
Expand Down
1 change: 1 addition & 0 deletions tests/test_band_gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pytest
from nomad.datamodel import EntryArchive
from nomad.units import ureg

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

Expand Down
1 change: 1 addition & 0 deletions tests/test_band_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy as np
import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.properties import ElectronicEigenvalues

from . import logger
Expand Down
1 change: 1 addition & 0 deletions tests/test_fermi_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from typing import Optional

import pytest

from nomad_simulations.schema_packages.properties import FermiSurface


Expand Down
1 change: 1 addition & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import numpy as np
import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.general import Simulation
from nomad_simulations.schema_packages.model_system import (
AtomicCell,
Expand Down
1 change: 1 addition & 0 deletions tests/test_hopping_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from typing import Optional

import pytest

from nomad_simulations.schema_packages.properties import (
CrystalFieldSplitting,
HoppingMatrix,
Expand Down
1 change: 1 addition & 0 deletions tests/test_model_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.atoms_state import AtomsState, OrbitalsState
from nomad_simulations.schema_packages.general import Simulation
from nomad_simulations.schema_packages.model_method import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_model_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy as np
import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.model_system import (
ChemicalFormula,
ModelSystem,
Expand Down
1 change: 1 addition & 0 deletions tests/test_numerical_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pytest
from nomad.datamodel import EntryArchive
from nomad.units import ureg

from nomad_simulations.schema_packages.numerical_settings import (
KLinePath,
KMesh,
Expand Down
1 change: 1 addition & 0 deletions tests/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.model_method import ModelMethod
from nomad_simulations.schema_packages.model_system import ModelSystem
from nomad_simulations.schema_packages.numerical_settings import SelfConsistency
Expand Down
1 change: 1 addition & 0 deletions tests/test_permittivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import numpy as np
import pytest

from nomad_simulations.schema_packages.properties import Permittivity
from nomad_simulations.schema_packages.variables import Frequency, KMesh, Variables

Expand Down
1 change: 1 addition & 0 deletions tests/test_physical_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from nomad.datamodel import EntryArchive
from nomad.metainfo import Quantity
from nomad.units import ureg

from nomad_simulations.schema_packages.physical_property import (
PhysicalProperty,
validate_quantity_wrt_value,
Expand Down
1 change: 1 addition & 0 deletions tests/test_spectral_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pytest
from nomad.datamodel import EntryArchive
from nomad.units import ureg

from nomad_simulations.schema_packages.atoms_state import AtomsState
from nomad_simulations.schema_packages.general import Simulation
from nomad_simulations.schema_packages.model_system import AtomicCell, ModelSystem
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#

import pytest

from nomad_simulations.schema_packages.model_system import (
AtomicCell,
ModelSystem,
Expand Down
1 change: 1 addition & 0 deletions tests/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import pytest
from nomad.datamodel import EntryArchive

from nomad_simulations.schema_packages.variables import Variables

from . import logger
Expand Down

1 comment on commit a80641f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/nomad_simulations
   __init__.py4250%3–4
   _version.py11282%5–6
src/nomad_simulations/schema_packages
   __init__.py14286%53–55
   atoms_state.py1902189%31–33, 219–222, 246, 301–302, 370–371, 373, 555, 567–568, 629–633, 648–652, 659
   general.py75791%29–30, 98, 162, 272–273, 283
   model_method.py2657771%28–30, 189–192, 195–202, 294–295, 315, 336–355, 371–397, 400–417, 771, 782, 824–831, 869, 888, 968, 1025, 1100, 1214
   model_system.py2612292%43–45, 512–515, 562–569, 743–744, 965–969, 975–976, 984–985, 990, 1013
   numerical_settings.py2636575%30–32, 164, 234, 236–237, 240–243, 247–248, 255–258, 267–270, 274–277, 279–282, 287–290, 296–299, 470–497, 572, 607–610, 634, 637, 682, 684–687, 691, 695, 742, 746–767, 822–823, 890, 899–901, 904
   outputs.py1151091%27–28, 247–250, 290–293, 318, 320, 357, 376
   physical_property.py102793%38–40, 220, 349–351
   variables.py651183%26–28, 116, 139, 159–160, 163, 185, 208, 228
src/nomad_simulations/schema_packages/properties
   band_gap.py51590%26–28, 153–154
   band_structure.py1112280%27–29, 249–282, 295, 302, 338–339, 342
   energies.py42979%25–27, 54, 75, 100, 121, 137, 152
   fermi_surface.py17476%25–27, 58
   forces.py22673%26–28, 55, 75, 98
   hopping_matrix.py29583%25–27, 75, 110
   permittivity.py48883%25–27, 115–123
   spectral_profile.py26012851%27–29, 75–78, 113–116, 217–318, 374–386, 411–414, 434, 439–442, 484–520, 544, 591–594, 610–611, 616–622
   thermodynamics.py752764%25–27, 53, 74, 90, 99, 108, 119, 128, 155, 165, 175, 190–192, 195, 211, 231–233, 236, 252, 272–274, 277
src/nomad_simulations/schema_packages/utils
   utils.py681479%26–29, 79–88, 97–98, 103, 106
TOTAL209845478% 

Tests Skipped Failures Errors Time
297 0 💤 0 ❌ 0 🔥 2.325s ⏱️

Please sign in to comment.