Skip to content

SOF-7849: allow material context for python, deepmd and lammps#101

Open
pranabdas wants to merge 15 commits intomainfrom
feat/SOF-7849
Open

SOF-7849: allow material context for python, deepmd and lammps#101
pranabdas wants to merge 15 commits intomainfrom
feat/SOF-7849

Conversation

@pranabdas
Copy link
Copy Markdown
Member

No description provided.

Comment thread src/py/mat3ra/ade/application.py Outdated
esse = ESSE()
schema = esse.get_schema_by_id(APPLICATION_SCHEMA_ID)
allowed_keys = _collect_schema_property_names(schema)
config = {k: v for k, v in self.to_dict().items() if k in allowed_keys}
Copy link
Copy Markdown
Member Author

@pranabdas pranabdas Apr 19, 2026

Choose a reason for hiding this comment

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

A better approach could be to implement Python validate_and_clean method in esse, keeping parity with JavaScript validateAndClean.

Comment thread src/py/mat3ra/ade/application.py Outdated
"nwchem",
"python",
"vasp",
]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way to get this from standata instead?

# attached by standata) at construction time, so `calculate_hash` stays
# aligned with the JS side, which performs the same schema-driven filtering
# inside `Application.toJSON()`.
model_config = ConfigDict(extra="ignore")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's add into the comment that build_config will be stripped

@github-actions
Copy link
Copy Markdown

Coverage after merging feat/SOF-7849 into main will be

89.30%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/js
   ApplicationRegistry.ts93.33%91.53%100%92.77%137, 147–149, 152–154, 73–74, 78, 94
   application.ts100%100%100%100%
   applicationMixin.ts100%100%100%100%
   executable.ts100%100%100%100%
   executableMixin.ts100%100%100%100%
   flavor.ts100%100%100%100%
   flavorMixin.ts100%100%100%100%
   index.ts0%100%0%0%1, 10–11, 13, 16–19, 2, 20–29, 3–9
   template.ts100%100%100%100%
   templateMixin.ts98.13%90.91%100%100%103, 103
src/js/context
   ContextProvider.ts96.83%83.33%100%100%117, 81
   ContextProviderRegistryContainer.ts100%100%100%100%
   JSONSchemaDataProvider.ts100%100%100%100%
   JSONSchemaFormDataProvider.ts100%100%100%100%
   JinjaContextProvider.ts100%100%100%100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants