Skip to content

Commit

Permalink
Created optional dev dependencies (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
hampusnasstrom authored Dec 14, 2023
1 parent f382201 commit 55263ed
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 22 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
]
dependencies = [
"nomad-lab==1.2.1",
"nomad-lab>=1.2.1",
]
[project.optional-dependencies]
dev = [
"pytest",
"structlog==22.3.0",
"structlog>=22.3.0",
]

[project.license]
Expand Down
17 changes: 12 additions & 5 deletions src/nomad_material_processing/crystal_growth.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from structlog.stdlib import (
BoundLogger,
from typing import (
TYPE_CHECKING,
)
from nomad.metainfo import (
Package,
Expand All @@ -27,6 +26,14 @@
SampleDeposition,
)

if TYPE_CHECKING:
from nomad.datamodel.datamodel import (
EntryArchive,
)
from structlog.stdlib import (
BoundLogger,
)

m_package = Package(name='Crystal Growth')


Expand All @@ -40,7 +47,7 @@ class CrystalGrowth(SampleDeposition):
"http://purl.obolibrary.org/obo/CHMO_0002224"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `CrystalGrowth` class.
Expand All @@ -64,7 +71,7 @@ class CzochralskiProcess(CrystalGrowth):
"http://purl.obolibrary.org/obo/CHMO_0002158"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `CzochralskiProcess` class.
Expand Down
21 changes: 14 additions & 7 deletions src/nomad_material_processing/epitaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from structlog.stdlib import (
BoundLogger,
from typing import (
TYPE_CHECKING,
)
from nomad.metainfo import (
Package,
Expand All @@ -27,6 +26,14 @@
SampleDeposition,
)

if TYPE_CHECKING:
from nomad.datamodel.datamodel import (
EntryArchive,
)
from structlog.stdlib import (
BoundLogger,
)

m_package = Package(name='Epitaxy')


Expand All @@ -41,7 +48,7 @@ class Epitaxy(SampleDeposition):
"http://purl.obolibrary.org/obo/CHMO_0001336"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `Epitaxy` class.
Expand Down Expand Up @@ -69,7 +76,7 @@ class MolecularBeamEpitaxy(Epitaxy):
"http://purl.obolibrary.org/obo/CHMO_0001341"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `MolecularBeamEpitaxy` class.
Expand Down Expand Up @@ -99,7 +106,7 @@ class VaporPhaseEpitaxy(Epitaxy):
"http://purl.obolibrary.org/obo/CHMO_0001346"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `VaporPhaseEpitaxy` class.
Expand Down Expand Up @@ -134,7 +141,7 @@ class MetalOrganicVaporPhaseEpitaxy(VaporPhaseEpitaxy):
"http://purl.obolibrary.org/obo/CHMO_0001348"
],)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `MetalOrganicVaporPhaseEpitaxy` class.
Expand Down
23 changes: 15 additions & 8 deletions src/nomad_material_processing/physical_vapor_deposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from structlog.stdlib import (
BoundLogger,
from typing import (
TYPE_CHECKING,
)
from nomad.metainfo import (
Package,
Expand All @@ -44,6 +43,14 @@
ThinFilmStack,
)

if TYPE_CHECKING:
from nomad.datamodel.datamodel import (
EntryArchive,
)
from structlog.stdlib import (
BoundLogger,
)

m_package = Package(name='Physical Vapor Deposition')


Expand Down Expand Up @@ -320,7 +327,7 @@ class PVDStep(ActivityStep):
section_def=PVDChamberEnvironment,
)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `PVDStep` class.
Expand Down Expand Up @@ -363,7 +370,7 @@ class PhysicalVaporDeposition(SampleDeposition):
repeats=True,
)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `PhysicalVaporDeposition` class.
Expand Down Expand Up @@ -471,7 +478,7 @@ class PulsedLaserDeposition(PhysicalVaporDeposition):
repeats=True,
)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `PulsedLaserDeposition` class.
Expand Down Expand Up @@ -502,7 +509,7 @@ class SputterDeposition(PhysicalVaporDeposition):
default='Sputter Deposition'
)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `SputterDeposition` class.
Expand Down Expand Up @@ -671,7 +678,7 @@ class ThermalEvaporation(PhysicalVaporDeposition):
default='Thermal Evaporation'
)

def normalize(self, archive, logger: BoundLogger) -> None:
def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
'''
The normalizer for the `ThermalEvaporation` class.
Expand Down

0 comments on commit 55263ed

Please sign in to comment.