Skip to content

Commit

Permalink
Merge pull request #324 from gafusion/fix_test_machine_mapping
Browse files Browse the repository at this point in the history
test_machine_mapping_functions under each machine mappings
  • Loading branch information
AreWeDreaming authored Nov 14, 2024
2 parents 2fbe5ea + 1d663e9 commit 5416ea7
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions omas/machine_mappings/d3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1523,3 +1523,5 @@ def core_profiles_global_quantities_data(ods, pulse):


# ================================
if __name__ == '__main__':
test_machine_mapping_functions('d3d', ["core_profiles_profile_1d"], globals(), locals())
2 changes: 1 addition & 1 deletion omas/machine_mappings/east.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ def port_angle(port):


if __name__ == '__main__':
test_machine_mapping_functions(__all__, globals(), locals())
test_machine_mapping_functions("east", __all__, globals(), locals())
2 changes: 1 addition & 1 deletion omas/machine_mappings/mast.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,4 @@ def mse_data(ods, pulse, server=None, port=None):

# =====================
if __name__ == '__main__':
test_machine_mapping_functions(__all__, globals(), locals())
test_machine_mapping_functions("mast", __all__, globals(), locals())
2 changes: 1 addition & 1 deletion omas/machine_mappings/nstxu.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,4 +590,4 @@ def charge_exchange_data(ods, pulse, edition='CT1'):

# =====================
if __name__ == '__main__':
test_machine_mapping_functions(__all__, globals(), locals())
test_machine_mapping_functions("nstxu", __all__, globals(), locals())
2 changes: 1 addition & 1 deletion omas/machine_mappings/profiles_db_ccfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ def profile_db_to_ODS(ods, pulse, tok, db, ngrid):

# =====================
if __name__ == '__main__':
test_machine_mapping_functions(__all__, globals(), locals())
test_machine_mapping_functions("profiles_db_ccfe", __all__, globals(), locals())
2 changes: 1 addition & 1 deletion omas/machine_mappings/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def sample_function(ods, pulse, user_argument='this is a test'):

# =====================
if __name__ == '__main__':
test_machine_mapping_functions(__all__, globals(), locals())
test_machine_mapping_functions("sample", __all__, globals(), locals())
4 changes: 1 addition & 3 deletions omas/omas_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ def test_machine_mapping_functions(machine, __all__, global_namespace, local_nam
pprint(regression_kw)
print('=' * len(func_name))
ods = ODS() #consistency_check= not break_schema
func = eval(machine + "." + func_name, global_namespace, local_namespace)
func = eval(func_name, global_namespace, local_namespace)
try:
try:
regression_kw["update_callback"] = update_mapping
Expand Down Expand Up @@ -776,5 +776,3 @@ def load_omas_machine(
machine_to_omas(ods, machine, pulse, location, options, branch)
return ods

if __name__ == '__main__':
test_machine_mapping_functions('d3d', ["core_profiles_profile_1d"], globals(), locals())

0 comments on commit 5416ea7

Please sign in to comment.