Skip to content

Commit

Permalink
Changed folder layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepe-Marquez committed May 17, 2024
1 parent d8a621b commit 819126b
Show file tree
Hide file tree
Showing 37 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ where = ["src"]

[project.entry-points.'nomad.plugin']

perovskite_solar_cell_database = "perovskite_solar_cell_database.schema_packages:perovskite_solar_cell_database"
perovskite_solar_cell_database = "perovskite_solar_cell_database:schema"

# myapp = "nomad_solar_cells_efficiency_tables.apps:myapp"
19 changes: 19 additions & 0 deletions src/perovskite_solar_cell_database/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from nomad.config.models.plugins import SchemaPackageEntryPoint
from pydantic import Field


class PerovskiteDatabasePackageEntryPoint(SchemaPackageEntryPoint):
# parameter: int = Field(0, description='Custom configuration parameter')

def load(self):
from perovskite_solar_cell_database.schema import (
m_package,
)

return m_package


schema = PerovskiteDatabasePackageEntryPoint(
name='PerovskiteSolarCell',
description='Schema package defined for the perovskite solar cells database.',
)
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
)
from nomad.metainfo import Package, Section, SubSection, SchemaPackage

configuration = config.get_plugin_entry_point(
'perovskite_solar_cell_database.schema_packages:perovskite_solar_cell_database'
)
configuration = config.get_plugin_entry_point('perovskite_solar_cell_database:schema')

m_package = SchemaPackage()

Expand Down
19 changes: 0 additions & 19 deletions src/perovskite_solar_cell_database/schema_packages/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/data/example.archive.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"data": {
"m_def": "perovskite_solar_cell_database.schema_packages.perovskite_solar_cell_database.PerovskiteSolarCell",
"m_def": "perovskite_solar_cell_database.schema.PerovskiteSolarCell",
"ref": {
"ID": 36709,
"ID_temp": 36709,
Expand Down

0 comments on commit 819126b

Please sign in to comment.