Skip to content

Commit

Permalink
Moved utils to its own folder
Browse files Browse the repository at this point in the history
Fixed imports
  • Loading branch information
JosePizarro3 committed Jun 10, 2024
1 parent 360bea2 commit 5976b57
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pyssmf/hopping_pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np
import logging

from .schema import Model
from pyssmf.schema import Model


class Pruner:
Expand Down
4 changes: 2 additions & 2 deletions src/pyssmf/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from nomad.units import ureg

# NOMAD schema
from .schema import System, BravaisLattice, Model
from .utils import get_files
from pyssmf.schema import System, BravaisLattice, Model
from pyssmf.utils import get_files

re_n = r'[\n\r]'

Expand Down
12 changes: 6 additions & 6 deletions src/pyssmf/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import os
from scipy.stats import norm

from .input import ValidLatticeModels
from .schema import Model
from .parsing import MinimalWannier90Parser, ToyModels
from .hopping_pruning import Pruner
from .tb_hamiltonian import TBHamiltonian
from .visualization import plot_hopping_matrices, plot_band_structure, plot_dos
from pyssmf.input import ValidLatticeModels
from pyssmf.schema import Model
from pyssmf.parsing import MinimalWannier90Parser, ToyModels
from pyssmf.hopping_pruning import Pruner
from pyssmf.tb_hamiltonian import TBHamiltonian
from pyssmf.visualization import plot_hopping_matrices, plot_band_structure, plot_dos


class Runner(ValidLatticeModels):
Expand Down
3 changes: 2 additions & 1 deletion src/pyssmf/tb_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

from nomad.atomutils import Formula
from nomad.units import ureg
from .schema import Model

from pyssmf.schema import Model


class KSampling:
Expand Down
17 changes: 17 additions & 0 deletions src/pyssmf/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright: Dr. José M. Pizarro.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .utils import get_files, extract_hdf5_dataset
File renamed without changes.

1 comment on commit 5976b57

@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/pyssmf
   __init__.py220%17–18
   hopping_pruning.py36360%17–94
   input.py72720%17–188
   parsing.py1411410%17–267
   runner.py84840%17–210
   schema.py23230%17–163
   tb_hamiltonian.py77770%17–206
   visualization.py57570%17–153
src/pyssmf/utils
   __init__.py110%17
   utils.py21210%17–71
TOTAL5145140% 

Tests Skipped Failures Errors Time
5 0 💤 0 ❌ 0 🔥 0.290s ⏱️

Please sign in to comment.