From b1b8213885fe668e8c1f89b3edf21876e4779191 Mon Sep 17 00:00:00 2001 From: Lauri Himanen Date: Fri, 17 May 2024 13:31:59 +0300 Subject: [PATCH] Fixed formatting, trying to use latest develop version during tests. --- .github/workflows/actions.yml | 2 ++ .../data_tools/jv_parser.py | 16 ++++------------ src/perovskite_solar_cell_database/schema.py | 1 - 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 550317a..46fe046 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -15,6 +15,8 @@ jobs: run: | pip install --upgrade pip pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple + # we need the latest nomad version for testing + pip install nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop pip install coverage coveralls - name: Test with pytest run: | diff --git a/src/perovskite_solar_cell_database/data_tools/jv_parser.py b/src/perovskite_solar_cell_database/data_tools/jv_parser.py index 2216fad..fe4bd11 100644 --- a/src/perovskite_solar_cell_database/data_tools/jv_parser.py +++ b/src/perovskite_solar_cell_database/data_tools/jv_parser.py @@ -89,16 +89,12 @@ def jv_dict_generator(filename): for i in list_columns: if 'rev' in i: - jv_dict['reverse_scan_Jsc'].append( - float(f'{abs(df[i].iloc[0]):0.3e}') - ) + jv_dict['reverse_scan_Jsc'].append(float(f'{abs(df[i].iloc[0]):0.3e}')) jv_dict['reverse_scan_Voc'].append(float(f'{df[i].iloc[1]:0.3e}')) jv_dict['reverse_scan_FF'].append(float(f'{df[i].iloc[2]:0.3e}')) jv_dict['reverse_scan_PCE'].append(float(f'{df[i].iloc[3]:0.3e}')) jv_dict['reverse_scan_Vmp'].append(float(f'{df[i].iloc[6]:0.3e}')) - jv_dict['reverse_scan_Jmp'].append( - float(f'{abs(df[i].iloc[5]):0.3e}') - ) + jv_dict['reverse_scan_Jmp'].append(float(f'{abs(df[i].iloc[5]):0.3e}')) jv_dict['reverse_scan_series_resistance'].append( float(f'{df[i].iloc[7]:0.3e}') ) @@ -107,16 +103,12 @@ def jv_dict_generator(filename): ) elif 'for' in i: - jv_dict['forward_scan_Jsc'].append( - abs(float(f'{df[i].iloc[0]:0.3e}')) - ) + jv_dict['forward_scan_Jsc'].append(abs(float(f'{df[i].iloc[0]:0.3e}'))) jv_dict['forward_scan_Voc'].append(float(f'{df[i].iloc[1]:0.3e}')) jv_dict['forward_scan_FF'].append(float(f'{df[i].iloc[2]:0.3e}')) jv_dict['forward_scan_PCE'].append(float(f'{df[i].iloc[3]:0.3e}')) jv_dict['forward_scan_Vmp'].append(float(f'{df[i].iloc[6]:0.3e}')) - jv_dict['forward_scan_Jmp'].append( - float(f'{abs(df[i].iloc[5]):0.3e}') - ) + jv_dict['forward_scan_Jmp'].append(float(f'{abs(df[i].iloc[5]):0.3e}')) jv_dict['forward_scan_series_resistance'].append( float(f'{df[i].iloc[7]:0.3e}') ) diff --git a/src/perovskite_solar_cell_database/schema.py b/src/perovskite_solar_cell_database/schema.py index b2c5adc..ad916ea 100644 --- a/src/perovskite_solar_cell_database/schema.py +++ b/src/perovskite_solar_cell_database/schema.py @@ -5,7 +5,6 @@ if TYPE_CHECKING: pass -from nomad.config import config from nomad.datamodel.data import Schema, UseCaseElnCategory from nomad.metainfo import SchemaPackage, Section, SubSection