Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

generate_tapestries_test.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. from common import initialize_test_yml_list_measurement
  2. from view import create_tapestry
  3. from view.python_core.flags import FlagsManager
  4. import pathlib as pl
  5. import platform
  6. def test_non_default():
  7. """
  8. Generating tapestries with non-default tapestry configs
  9. """
  10. test_yml, test_animal, test_measu = initialize_test_yml_list_measurement()
  11. flags_dummy = FlagsManager()
  12. flags_dummy.read_flags_from_yml(test_yml)
  13. def text_below(row):
  14. return f"{row['Odour']}_{row['OConc']}_{row['Pharma']}"
  15. progs_path = pl.Path(flags_dummy["STG_MotherOfAllFolders"]) / "IDLprogs" / "tapestry_configs"
  16. for child in progs_path.iterdir():
  17. if child.suffix == ".yml" and child.name != "defult.yml":
  18. # if child.name.lower().find("linux") >= 0 and platform.system() != "Linux":
  19. # continue
  20. # elif child.name.lower().find("windows") >= 0 and platform.system() != "Windows":
  21. # continue
  22. create_tapestry.description = f"Generating tapestry with {child.name}"
  23. yield create_tapestry, str(child), test_yml, text_below
  24. def run_with_yml_name(yml_name):
  25. test_yml, test_animal, test_measu = initialize_test_yml_list_measurement()
  26. flags_dummy = FlagsManager()
  27. flags_dummy.read_flags_from_yml(test_yml)
  28. def text_below(row):
  29. return f"{row['Odour']}_{row['OConc']}_{row['Pharma']}"
  30. tapestry_config = pl.Path(flags_dummy["STG_MotherOfAllFolders"]) / "IDLprogs" / "tapestry_configs" / f"{yml_name}.yml"
  31. create_tapestry(init_yml_flags_file=test_yml, tapestry_config_file=str(tapestry_config),
  32. text_below_func=text_below)
  33. def test_default():
  34. """
  35. Generating tapestries with default tapestry configs
  36. """
  37. run_with_yml_name("default")
  38. if __name__ == '__main__':
  39. # test_default()
  40. # run_with_yml_name("different_animals")
  41. # run_with_yml_name("with_movies_stack_tif")
  42. # run_with_yml_name("with_movies_libx264")
  43. # run_with_yml_name("custom_csv_linux")
  44. run_with_yml_name("custom_csv_windows")
  45. # run_with_yml_name("different_flags")