-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added general PPMS plugin #133
Conversation
FYI @budschi |
few points:
|
Updated `merge_sections` util function to work with the latest nomad-lab version
* Added breaking test for boolean array * Added more breaking test cases * Added fix for comparing non numpy arrays * Ruff * Enhance test_merge_sections to capture output and validate float_array values * Refine warning message for merging sections with differing quantity values * Refactor merge_sections to improve warning logic for differing quantity values
* Added breaking test for float array with units * Added fix for comparison of pint quantity arrays * Added test for multi dimensional array * Ruff
* Add fixture to capture error from logs * Add nomad-lab infrastructure deps required by caplog fixture * Ruff * Refactoring fixtures; parameterize caplog to allow capturing different log levels * Removing the formatter from nomad.utils * testing: add logger.error in normalize * testing: adding the formatter from nomad.utils * Add logstash dep; cleaning * Cleaning * Specify caplog as an arg (from review)
Hey @ka-sarthak, any hint why this is failing? https://github.com/FAIRmat-NFDI/nomad-measurements/actions/runs/12356184054/job/34481491564?pr=133 it says it doesn't find mongoengine |
It seems to be coming when using _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/nomad/client/processing.py:46: in parse
from nomad.parsing import parsers
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/nomad/parsing/parsers.py:248: in <module>
instance = entry_point.load()
src/nomad_measurements/ppms/__init__.py:10: in load
from nomad_measurements.ppms.parser import PPMSParser
src/nomad_measurements/ppms/parser.py:33: in <module>
from nomad.search import search
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/nomad/search.py:59: in <module>
from nomad import datamodel, infrastructure, utils
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD. See https://nomad-lab.eu/ for further info.
#
# 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.
#
"""
This module provides function to establish connections to the database, searchengine, etc.
infrastructure services. Usually everything is setup at once with :func:`setup`. This
is run once for each *api* and *worker* process. Individual functions for partial setups
exist to facilitate testing, aspects of :py:mod:`nomad.cli`, etc.
"""
import os.path
import os
import shutil
from elasticsearch_dsl import connections
> from mongoengine import connect, disconnect
E ModuleNotFoundError: No module named 'mongoengine' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonathanNoky tell me if some point is not clear
If you see in this branch, I moved the test file for XRD in a dedicated folder. I will need to change the paths in the test. IS it okay for you to organize the test files in subfolders @ka-sarthak ? |
@aalbino2 Sure, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sequence file leads to a failure.
Probably the way we pass the class to be instantiated must be modified:
The other .dat file is not matched.
Added call of set_entrydata_definition to parse
I will merge this PR and open new issues for further development @JonathanNoky |
Added the PPMS plugin. Up to now, it can deal with ETO and ACT measurements. More types like magnetization measurement will follow soon.