Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 21, 2023
1 parent 04168d5 commit 61a945c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
3 changes: 0 additions & 3 deletions pynxtools/dataconverter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def convert(input_file: Tuple[str],
generate_template: bool = False,
fair: bool = False,
undocumented: bool = False,
temp_data_dict=None, # pre generated empty template from nxdl name.
**kwargs):
"""The conversion routine that takes the input parameters and calls the necessary functions."""

Expand All @@ -181,8 +180,6 @@ def convert(input_file: Tuple[str],
**kwargs)
if undocumented:
logger.setLevel(UNDOCUMENTED)
# This is mainly if the filled template data is needed out of this function
temp_data_dict['data'] = temp_data
if fair and temp_data.undocumented.keys():
logger.warning("There are undocumented paths in the template. This is not acceptable!")
return
Expand Down
8 changes: 3 additions & 5 deletions pynxtools/dataconverter/readers/sts/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@

from typing import Tuple
import copy
import json
import numpy as np
from pynxtools.dataconverter.helpers import (convert_data_dict_path_to_hdf5_path,
transform_to_intended_dt,
nested_dict_to_slash_separated_path
)


Expand Down Expand Up @@ -101,9 +99,9 @@ def overwrite_fields(template, data_dict,
else None)
if unit in data_path:
path_to_data = data_path[unit]
template[new_temp_key + "/@units"] = transform_to_intended_dt(data_dict[path_to_data]
if path_to_data in data_dict
else None)
unit = transform_to_intended_dt(data_dict[path_to_data] if path_to_data in data_dict
else None)
template[new_temp_key + "/@units"] =


def nested_path_to_slash_separated_path(nested_dict: dict,
Expand Down
4 changes: 2 additions & 2 deletions pynxtools/dataconverter/readers/sts/stm_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ def from_sxm_file_into_template(self, template, config_dict, eln_data_dict):
c_key,
nxdl_key_to_modified_key)
else:
template[c_key] = transform_to_intended_dt(data_dict[c_val]) if c_val in data_dict \
else None
template[c_key] = transform_to_intended_dt(data_dict[c_val]) \
if c_val in data_dict else None
# The following function can be used later it link come true in application def.
# link_implementation(template, nxdl_key_to_modified_key)
link_seperation_from_hard_code(template, nxdl_key_to_modified_key)
Expand Down
2 changes: 1 addition & 1 deletion pynxtools/dataconverter/readers/xrd/xrd_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def parse(self):
ValueError: If the file format is unsupported.
'''
file_format = self.get_file_format()

slash_sep_dict = {}
if file_format == ".xrdml":
slash_sep_dict = self.parse_xrdml()
# elif file_format == ".udf":
Expand Down
2 changes: 1 addition & 1 deletion pynxtools/definitions
Submodule definitions updated 297 files
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies = [
"tzlocal<=4.3",
"scipy>=1.7.1",
"lark>=1.1.5",
"xrayutilities>=1.7.4",
"requests",
"requests_cache",
"nanonispy@git+https://github.com/ramav87/nanonispy.git@a0da87c58482d29624a2bf5deecb763dd1274212"
Expand Down

0 comments on commit 61a945c

Please sign in to comment.