def test_valid_component(file_path): validator.validate_file('component', file_path)
def test_valid_reffile(): ''' Test to make sure the references file is valid ''' file_path = os.path.join(data_dir, "REFERENCES.json") validator.validate_file('references', file_path)
def test_valid_table(file_path): validator.validate_file('table', file_path)
def test_valid_element(file_path): validator.validate_file('element', file_path)
def test_valid_meta(file_path): validator.validate_file('metadata', file_path)
'ecp_potentials': scalar_pots, 'references': list(refs) } if len(so_pots) > 0: compso_file['elements'][el] = { 'ecp_electrons': nelec, 'ecp_potentials': so_pots, 'references': list(refs) } comp_file['notes'] = comment compso_file['notes'] = comment bse.fileio.write_json_basis(comp_file_path, comp_file) all_comp_files.append(comp_file_path) if len(compso_file['elements']) > 0: bse.fileio.write_json_basis(compso_file_path, compso_file) all_comp_files.append(compso_file_path) print("Created " + str(len(all_comp_files)) + " files") # Validate the created files for fp in all_comp_files: print('Validating ' + fp) try: validator.validate_file('component', fp) except Exception as ex: print(' **** ' + str(ex))
def test_valid_component(file_path): full_path = os.path.join(data_dir, file_path) validator.validate_file('component', full_path)
def test_valid_table(file_path): full_path = os.path.join(data_dir, file_path) validator.validate_file('table', full_path)
def test_valid_meta(file_path): full_path = os.path.join(data_dir, file_path) validator.validate_file('metadata', full_path)