CTADIRAC 2.2.71__tar.gz → 2.2.72__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ctadirac-2.2.71/src/CTADIRAC.egg-info → ctadirac-2.2.72}/PKG-INFO +1 -1
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CWLJob.py +28 -14
- ctadirac-2.2.72/src/CTADIRAC/Interfaces/Utilities/CWL_utils.py +248 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/_version.py +2 -2
- {ctadirac-2.2.71 → ctadirac-2.2.72/src/CTADIRAC.egg-info}/PKG-INFO +1 -1
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC.egg-info/SOURCES.txt +2 -0
- ctadirac-2.2.72/tests/resources/cwl/inputs_process_dl0_dl1.yaml +9 -0
- ctadirac-2.2.72/tests/resources/cwl/process_dl0_dl1.cwl +60 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/api/test_cwl_job.py +39 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/api/test_cwl_utils.py +26 -75
- ctadirac-2.2.71/src/CTADIRAC/Interfaces/Utilities/CWL_utils.py +0 -140
- {ctadirac-2.2.71 → ctadirac-2.2.72}/CODEOWNERS +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/LICENCE +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/MANIFEST.in +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/README.md +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/aiv-config.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/ctadirac_requirements_traceability_matrix.csv +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docker/dirac-client/Dockerfile +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docker/dirac-client/EGI-trustanchors.repo +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docker/dirac-client/Entrypoint.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/examples/dl0_to_dl2_example.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/examples/mc_example.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/examples/process_corsika_with_sim_telarray.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/examples/testJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/install_CTADIRAC.md +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/install_client.md +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/docs/install_site_desy.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/environment.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/pylint.log +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/pyproject.toml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/release.notes +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/releases.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/report/inspection.tex +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/report/performance_verification.tex +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/report/preamble.tex +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/setup.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/sonar-project.properties +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ConfigurationSystem/Agent/StorageMonitorAgent.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ConfigurationSystem/Agent/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ConfigurationSystem/ConfigTemplate.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ConfigurationSystem/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Utilities/SoftwareManager.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Utilities/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Utilities/return_values.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Utilities/tool_box.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Utilities/typer_callbacks.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Workflow/Modules/ProdDataManager.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Workflow/Modules/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/Workflow/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_dms_check_lfn.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_job_get_parameter.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_add_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_add_file.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_add_prov.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_check_replicas.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_create_dataset_description.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_create_evndisp_dataset_description.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_dump_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_failure_monitor.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_find_datasets.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_fix_nsb.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_file.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_file_by_query.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_file_size.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_merge_size.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_replicas.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_get_se_status.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_git_clone.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_init_prov.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_managedata.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_mark_corrupted_DL0.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_monitor.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_remove_corrupted_dl2.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_remove_corrupted_file.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_remove_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_remove_file.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_replicate_lfn.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_set_metadata.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_setup_software.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_show_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_split_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_split_dataset_bulk.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_unregister_file.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_unregister_replica.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_update_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_prod_verifysteps.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_rms_request.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_add_files.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_clean.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_delete.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_get_files.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_get_tasks.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_move_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_move_dataset_status.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_move_files.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_remove_dataset.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_remove_files.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_remove_replicas.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_select.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_show_progress.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_treat_done_tasks.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_treat_failed_tasks.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_treat_incomplete_transfers.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_transformation_treat_problematic_files.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Core/scripts/cta_user_managedata.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/Client/ProvBase.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/Client/ProvClient.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/Client/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/ConfigTemplate.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/DB/ProvenanceDB.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/DB/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/ProvenanceManagerHandler.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/private/JSONUtils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/DataManagementSystem/private/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CTAJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CtapipeApplyModelsJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CtapipeMergeJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CtapipeProcessJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CtapipeTrainClassifierJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/CtapipeTrainEnergyJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/EvnDispJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/MCPipeJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/MCSimTelProcessJob.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/API/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Interfaces/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/CWLUtils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/CWLWorkflow.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/CWLWorkflowStep.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/README.md +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/cta-user-managedata-processing.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/cta-user-managedata.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/cta-user-managedata.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/dirac_ctapipe-process_wrapper +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/dirac_ctapipe-process_wrapper.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/dirac_ctapipe-process_wrapper.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/dirac_prod_run.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/dirac_prod_run.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/setup-software-processing.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/setup-software.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/setup-software.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/simulation-run.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/simulation-run.png +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/CWL/simulation-run.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/Client/Utilities/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/Client/Utilities/production_utils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/Client/WorkflowElement.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/Client/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/DB/ProductionDB.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/DB/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/Service/ProductionManagerHandler.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/processing_config_from_meta_query.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alpha/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alpha/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alpha/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alpha/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alphanectarcam/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alphanectarcam/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alphanectarcam/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/paranal/alphanectarcam/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az000/apply_models.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az000/train_classifier.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az000/train_energy.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alpha/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az000/apply_models.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az000/train_classifier.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az000/train_energy.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az180/apply_models.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az180/train_classifier.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5/processing/alphanectarcam/az180/train_energy.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/lapalma/alpha/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/lapalma/alpha/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/lapalma/alpha/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/lapalma/alpha/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az000/apply_models.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az000/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az000/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az000/train_classifier.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az000/train_energy.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az180/apply_models.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az180/dl0_to_dl2.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az180/merge.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az180/train_classifier.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod5b/processing/lapalma/alpha/az180/train_energy.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/apply_models_all_div.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/dl0_to_dl2_div0.0022.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/dl0_to_dl2_div0.0043.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/dl0_to_dl2_div0.008.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/dl0_to_dl2_div0.01135.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/dl0_to_dl2_div0.01453.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/merge_div0.0022.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/merge_div0.0043.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/merge_div0.008.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/merge_div0.01135.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/merge_div0.01453.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/train_classifier_all_div.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/processing/az000/train_energy_all_div.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/config/prod6_divergent/simulation/sim_test.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_create_workflow_config.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_create_workflow_evndisp_config.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_get_all.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_submit.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_submit_from_cwl.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/scripts/cta_prod_submit_from_cwl_workflow.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/ProductionSystem/test/test_launcher_from_cwl.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Agent/TransformationFailoverAgent.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Agent/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/ConfigTemplate.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/DB/TransformationDB.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/DB/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Service/TornadoTransformationManagerHandler.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Service/TransformationManagerHandler.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Service/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/TransformationSystem/Utils/FailoverUtilities.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Workflow/Modules/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Workflow/Modules/cta_script.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Workflow/Modules/cta_update_ts.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/Workflow/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/WorkloadManagementSystem/Client/CTAODownloadInputData.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/WorkloadManagementSystem/Client/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/WorkloadManagementSystem/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/_dev/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC/version.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC.egg-info/dependency_links.txt +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC.egg-info/entry_points.txt +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC.egg-info/requires.txt +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/src/CTADIRAC.egg-info/top_level.txt +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/cta-prod-managedata-processing.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/cta-prod-managedata.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/cta-prod-managedata.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_ctapipe-process_wrapper +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_ctapipe-process_wrapper.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_ctapipe-process_wrapper.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_prod_run +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_prod_run.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/dirac_prod_run.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/setup-software-processing.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/setup-software.cwl +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/CWL/setup-software.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/config/full_production_config.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/config/processing_merging_config_from_dataset.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/config/production_config.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/datasets/Prod5b_LaPalma_AdvancedBaseline_NSB1x_electron_North_20deg_R1.json +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/datasets/Prod6_Paranal_gamma_South_20deg.json +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/runTestSuite.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testDMSDefinitions.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testFileCatalogDefinitions.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testJobDefinitions.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testJobUtils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testProdDefinitions.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testSuiteDefinition.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/system/testTransDefinitions.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/api/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/api/test_job.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/core/utilities/test_tool_box.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/production/__init__.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/production/test_prod_submit_utils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/production/test_workflow_element.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/scripts/core/test_cta_get_job_parameter.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/scripts/production_system/test_production_scripts.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/scripts/test_typer_callbacks.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/test_dummy.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/transformation/agent/test_transformation_agents.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/transformation/agent/test_transformation_failover_utils.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/tests/unit/workload_management/client/test_ctao_download_inputdata.py +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/ci/env/coverage.yml +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/cvmfs/build_corsika-77410-original.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/cvmfs/build_corsika-77410.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/README.md +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/bin/install-ctadirac-server.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/caUtilities/openssl_config_ca.cnf +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/caUtilities/openssl_config_host.cnf +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/caUtilities/openssl_config_user.cnf +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/caUtilities/utilities.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/EGI-trustanchors.repo +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/dirac_example.cfg +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/kill_runsv.sh +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/runsvdir-start +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/runsvdir-start.service +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/site.conf +0 -0
- {ctadirac-2.2.71 → ctadirac-2.2.72}/utils/deploy/files/web_app_example.cfg +0 -0
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import tempfile
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
from cwl_utils.parser import save
|
|
6
|
+
from cwl_utils.parser import load_document, save
|
|
7
7
|
from DIRAC.Interfaces.API.Dirac import Dirac
|
|
8
8
|
from DIRAC.Interfaces.API.Job import Job
|
|
9
|
+
from cwl_utils.parser.utils import load_inputfile
|
|
9
10
|
from ruamel.yaml import YAML
|
|
10
11
|
|
|
11
12
|
from CTADIRAC.Interfaces.Utilities.CWL_utils import (
|
|
@@ -33,20 +34,33 @@ class CWLJob(Job):
|
|
|
33
34
|
apptainer_options: list | None = None,
|
|
34
35
|
) -> None:
|
|
35
36
|
super().__init__()
|
|
36
|
-
|
|
37
|
-
self.
|
|
37
|
+
|
|
38
|
+
self.cwl_workflow_path = Path(cwl_workflow)
|
|
39
|
+
self.cwl_inputs_path = Path(cwl_inputs)
|
|
40
|
+
|
|
41
|
+
self.original_cwl = load_document(self.cwl_workflow_path.read_text())
|
|
42
|
+
self.original_inputs = load_inputfile(
|
|
43
|
+
self.original_cwl.cwlVersion, self.cwl_inputs_path.read_text()
|
|
44
|
+
)
|
|
45
|
+
|
|
38
46
|
self.cvmfs_base_path = cvmfs_base_path
|
|
39
47
|
self.apptainer_options = apptainer_options if apptainer_options else []
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
self.
|
|
49
|
+
cwl_dict = translate_cwl_workflow(
|
|
50
|
+
self.original_cwl,
|
|
51
|
+
self.original_inputs,
|
|
52
|
+
self.cvmfs_base_path,
|
|
53
|
+
self.apptainer_options,
|
|
43
54
|
)
|
|
44
|
-
self.output_sandbox = self.cwl_dict.get("OutputSandbox", [])
|
|
45
|
-
self.output_data = self.cwl_dict.get("OutputData", [])
|
|
46
55
|
|
|
47
|
-
self.
|
|
48
|
-
self.
|
|
49
|
-
self.
|
|
56
|
+
self.transformed_cwl = cwl_dict["CWLDesc"]
|
|
57
|
+
self.output_sandbox = cwl_dict.get("OutputSandbox", [])
|
|
58
|
+
self.output_data = cwl_dict.get("OutputData", [])
|
|
59
|
+
|
|
60
|
+
input_cwl_dict = extract_and_translate_input_files(self.original_inputs)
|
|
61
|
+
self.transformed_inputs = input_cwl_dict["InputDesc"]
|
|
62
|
+
self.input_data = input_cwl_dict.get("InputData", [])
|
|
63
|
+
self.input_sandbox = input_cwl_dict.get("InputSandbox", [])
|
|
50
64
|
|
|
51
65
|
def submit(self):
|
|
52
66
|
"""Submit the CWL job to DIRAC.
|
|
@@ -60,15 +74,15 @@ class CWLJob(Job):
|
|
|
60
74
|
|
|
61
75
|
# Create the modified Dirac compliant CWL workflow and inputs files to submit
|
|
62
76
|
with tempfile.NamedTemporaryFile(
|
|
63
|
-
suffix=f"_{self.
|
|
77
|
+
suffix=f"_{self.cwl_workflow_path.name}"
|
|
64
78
|
) as temp_workflow:
|
|
65
|
-
yaml.dump(save(self.
|
|
79
|
+
yaml.dump(save(self.transformed_cwl), temp_workflow)
|
|
66
80
|
temp_workflow.flush()
|
|
67
81
|
|
|
68
82
|
with tempfile.NamedTemporaryFile(
|
|
69
|
-
suffix=f"_{self.
|
|
83
|
+
suffix=f"_{self.cwl_inputs_path.name}"
|
|
70
84
|
) as temp_inputs:
|
|
71
|
-
yaml.dump(save(self.
|
|
85
|
+
yaml.dump(save(self.transformed_inputs), temp_inputs)
|
|
72
86
|
temp_inputs.flush()
|
|
73
87
|
|
|
74
88
|
self.setInputSandbox(
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"""Utilities to handle CWL."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
5
|
+
from copy import deepcopy
|
|
6
|
+
|
|
7
|
+
from cwl_utils.parser import OutputArraySchema, File
|
|
8
|
+
from cwl_utils.expression import do_eval
|
|
9
|
+
|
|
10
|
+
LFN_PREFIX = "lfn://"
|
|
11
|
+
LFN_DIRAC_PREFIX = "LFN:"
|
|
12
|
+
LOCAL_PREFIX = "file://"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def fill_defaults(cwl, inputs):
|
|
16
|
+
"""Fill in defaults into inputs.
|
|
17
|
+
|
|
18
|
+
This is needed for evaluating expressions later on.
|
|
19
|
+
|
|
20
|
+
Parameters
|
|
21
|
+
----------
|
|
22
|
+
cwl: dict
|
|
23
|
+
The CWL definition
|
|
24
|
+
inputs: dict
|
|
25
|
+
user provided inputs.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
inputs: dict
|
|
30
|
+
inputs with additional values filled from CWL defaults
|
|
31
|
+
"""
|
|
32
|
+
inputs_new = deepcopy(inputs)
|
|
33
|
+
|
|
34
|
+
if cwl.inputs is None:
|
|
35
|
+
return inputs_new
|
|
36
|
+
|
|
37
|
+
for inp in cwl.inputs:
|
|
38
|
+
key = inp.id.rpartition("#")[2]
|
|
39
|
+
if key not in inputs and inp.default is not None:
|
|
40
|
+
inputs_new[key] = inp.default
|
|
41
|
+
return inputs_new
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def translate_cwl_workflow(
|
|
45
|
+
cwl_obj,
|
|
46
|
+
cwl_inputs,
|
|
47
|
+
cvmfs_base_path: Path,
|
|
48
|
+
apptainer_options: list[Any],
|
|
49
|
+
) -> dict[str, Any]:
|
|
50
|
+
"""Translate the CWL workflow description into Dirac compliant execution."""
|
|
51
|
+
output_dict = {"CWLDesc": cwl_obj, "OutputSandbox": [], "OutputData": []}
|
|
52
|
+
|
|
53
|
+
if cwl_obj.class_ != "CommandLineTool":
|
|
54
|
+
return output_dict
|
|
55
|
+
|
|
56
|
+
if cwl_obj.hints:
|
|
57
|
+
cwl_obj = translate_docker_hints(cwl_obj, cvmfs_base_path, apptainer_options)
|
|
58
|
+
|
|
59
|
+
return extract_and_translate_output_files(cwl_obj, cwl_inputs)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def translate_docker_hints(
|
|
63
|
+
cwl_obj, cvmfs_base_path: Path, apptainer_options: list[Any]
|
|
64
|
+
):
|
|
65
|
+
"""Translate CWL DockerRequirement into Dirac compliant execution."""
|
|
66
|
+
for index, hints in enumerate(cwl_obj.hints):
|
|
67
|
+
if hints.class_ == "DockerRequirement":
|
|
68
|
+
image = hints.dockerPull
|
|
69
|
+
cmd = [
|
|
70
|
+
"apptainer",
|
|
71
|
+
"run",
|
|
72
|
+
*apptainer_options,
|
|
73
|
+
str(cvmfs_base_path / f"{image}"),
|
|
74
|
+
]
|
|
75
|
+
if isinstance(cwl_obj.baseCommand, str):
|
|
76
|
+
cmd += [cwl_obj.baseCommand]
|
|
77
|
+
else:
|
|
78
|
+
cmd += cwl_obj.baseCommand
|
|
79
|
+
cwl_obj.baseCommand = cmd
|
|
80
|
+
del cwl_obj.hints[index]
|
|
81
|
+
return cwl_obj
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def collect_outputs(cwl, inputs) -> list[str]:
|
|
85
|
+
"""Collect evaluated output filenames.
|
|
86
|
+
|
|
87
|
+
Parameters
|
|
88
|
+
----------
|
|
89
|
+
cwl: dict
|
|
90
|
+
The CWL definition
|
|
91
|
+
inputs: dict
|
|
92
|
+
user provided inputs.
|
|
93
|
+
|
|
94
|
+
Returns
|
|
95
|
+
-------
|
|
96
|
+
outputs: list[str]
|
|
97
|
+
The output filenames of this workflow given
|
|
98
|
+
the provided inputs and defaults.
|
|
99
|
+
"""
|
|
100
|
+
outputs = []
|
|
101
|
+
|
|
102
|
+
if cwl.outputs is None:
|
|
103
|
+
return outputs
|
|
104
|
+
|
|
105
|
+
for output in cwl.outputs:
|
|
106
|
+
if glob := output.outputBinding.glob:
|
|
107
|
+
result = do_eval(
|
|
108
|
+
glob,
|
|
109
|
+
inputs,
|
|
110
|
+
outdir=None,
|
|
111
|
+
requirements=[],
|
|
112
|
+
tmpdir=None,
|
|
113
|
+
resources={},
|
|
114
|
+
)
|
|
115
|
+
outputs.append(result)
|
|
116
|
+
|
|
117
|
+
return outputs
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def extract_and_translate_output_files(cwl_obj, inputs) -> dict[str, Any]:
|
|
121
|
+
"""Translate output files into a DIRAC compliant usage.
|
|
122
|
+
|
|
123
|
+
Extract local outputs and lfns.
|
|
124
|
+
Remove outputs path prefix.
|
|
125
|
+
"""
|
|
126
|
+
output_lfns = []
|
|
127
|
+
output_sandboxes = []
|
|
128
|
+
|
|
129
|
+
inputs = fill_defaults(cwl_obj, inputs)
|
|
130
|
+
|
|
131
|
+
for outputs in cwl_obj.outputs or []:
|
|
132
|
+
if not verify_cwl_output_type(outputs.type_):
|
|
133
|
+
continue
|
|
134
|
+
|
|
135
|
+
glob = outputs.outputBinding.glob
|
|
136
|
+
|
|
137
|
+
if isinstance(glob, str):
|
|
138
|
+
glob = do_eval(
|
|
139
|
+
glob,
|
|
140
|
+
inputs,
|
|
141
|
+
outdir=None,
|
|
142
|
+
requirements=[],
|
|
143
|
+
tmpdir=None,
|
|
144
|
+
resources={},
|
|
145
|
+
)
|
|
146
|
+
if glob.startswith(LFN_PREFIX):
|
|
147
|
+
output_lfns.append(glob.replace(LFN_PREFIX, LFN_DIRAC_PREFIX))
|
|
148
|
+
else:
|
|
149
|
+
output_sandboxes.append(glob)
|
|
150
|
+
|
|
151
|
+
if isinstance(glob, list):
|
|
152
|
+
for glob_item in glob:
|
|
153
|
+
glob_item = do_eval(
|
|
154
|
+
glob_item,
|
|
155
|
+
inputs,
|
|
156
|
+
outdir=None,
|
|
157
|
+
requirements=[],
|
|
158
|
+
tmpdir=None,
|
|
159
|
+
resources={},
|
|
160
|
+
)
|
|
161
|
+
if glob_item.startswith(LFN_PREFIX):
|
|
162
|
+
output_lfns.append(glob_item.replace(LFN_PREFIX, LFN_DIRAC_PREFIX))
|
|
163
|
+
else:
|
|
164
|
+
output_sandboxes.append(glob_item)
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
"CWLDesc": cwl_obj,
|
|
168
|
+
"OutputSandbox": output_sandboxes,
|
|
169
|
+
"OutputData": output_lfns,
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def verify_cwl_output_type(output_type) -> bool:
|
|
174
|
+
"""Verify the cwl output type.
|
|
175
|
+
|
|
176
|
+
True if the type is File or OutputArraySchema
|
|
177
|
+
or a list of 'null' and File/OutputArraySchema
|
|
178
|
+
else False.
|
|
179
|
+
"""
|
|
180
|
+
if isinstance(output_type, list):
|
|
181
|
+
for type_ in output_type:
|
|
182
|
+
if type_ == "File" or isinstance(type_, OutputArraySchema):
|
|
183
|
+
return True
|
|
184
|
+
if output_type == "File" or isinstance(output_type, OutputArraySchema):
|
|
185
|
+
return True
|
|
186
|
+
return False
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
# TODO: how to deal with default values not present in the input file but in the cwl?
|
|
190
|
+
def extract_and_translate_input_files(cwl_inputs) -> dict[str, Any]:
|
|
191
|
+
"""Extract input files from CWL inputs, rewrite file prefix.
|
|
192
|
+
|
|
193
|
+
If the file is a Sandbox, ensure there is no absolute path,
|
|
194
|
+
and store it in the input sandbox list.
|
|
195
|
+
If the file is a LFN, remove the lfn prefix and store it in the lfns list.
|
|
196
|
+
"""
|
|
197
|
+
input_sandboxes = []
|
|
198
|
+
input_lfns = []
|
|
199
|
+
cwl_inputs = deepcopy(cwl_inputs)
|
|
200
|
+
|
|
201
|
+
for key, input_value in cwl_inputs.items():
|
|
202
|
+
if isinstance(input_value, list):
|
|
203
|
+
for file in input_value:
|
|
204
|
+
if isinstance(file, File):
|
|
205
|
+
original = file.path
|
|
206
|
+
file.path, lfn = translate_sandboxes_and_lfns(file)
|
|
207
|
+
if lfn:
|
|
208
|
+
input_lfns.append(
|
|
209
|
+
original.replace(LFN_PREFIX, LFN_DIRAC_PREFIX)
|
|
210
|
+
)
|
|
211
|
+
else:
|
|
212
|
+
input_sandboxes.append(file.path)
|
|
213
|
+
|
|
214
|
+
elif isinstance(input_value, File):
|
|
215
|
+
path = input_value.path
|
|
216
|
+
input_value.path, lfn = translate_sandboxes_and_lfns(path)
|
|
217
|
+
if lfn:
|
|
218
|
+
input_lfns.append(path.replace(LFN_PREFIX, LFN_DIRAC_PREFIX))
|
|
219
|
+
else:
|
|
220
|
+
input_sandboxes.append(input_value.path)
|
|
221
|
+
|
|
222
|
+
# assume that an LFN in the inputs as string is an output filename
|
|
223
|
+
elif isinstance(input_value, str) and input_value.startswith(LFN_PREFIX):
|
|
224
|
+
cwl_inputs[key], _ = translate_sandboxes_and_lfns(input_value)
|
|
225
|
+
|
|
226
|
+
return {
|
|
227
|
+
"InputDesc": cwl_inputs,
|
|
228
|
+
"InputSandbox": input_sandboxes,
|
|
229
|
+
"InputData": input_lfns,
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def translate_sandboxes_and_lfns(file: File | str) -> tuple[str, bool]:
|
|
234
|
+
"""Extract local files as sandboxes and lfns as input data."""
|
|
235
|
+
if isinstance(file, File):
|
|
236
|
+
if not file.path:
|
|
237
|
+
raise KeyError("File path is not defined.")
|
|
238
|
+
path = file.path
|
|
239
|
+
elif isinstance(file, str):
|
|
240
|
+
path = file
|
|
241
|
+
|
|
242
|
+
lfn = False
|
|
243
|
+
if path.startswith(LFN_PREFIX):
|
|
244
|
+
path = path.removeprefix(LFN_PREFIX)
|
|
245
|
+
lfn = True
|
|
246
|
+
|
|
247
|
+
path = path.removeprefix(LOCAL_PREFIX)
|
|
248
|
+
return Path(path).name, lfn
|
|
@@ -232,6 +232,8 @@ src/CTADIRAC/WorkloadManagementSystem/__init__.py
|
|
|
232
232
|
src/CTADIRAC/WorkloadManagementSystem/Client/CTAODownloadInputData.py
|
|
233
233
|
src/CTADIRAC/WorkloadManagementSystem/Client/__init__.py
|
|
234
234
|
src/CTADIRAC/_dev/__init__.py
|
|
235
|
+
tests/resources/cwl/inputs_process_dl0_dl1.yaml
|
|
236
|
+
tests/resources/cwl/process_dl0_dl1.cwl
|
|
235
237
|
tests/system/runTestSuite.py
|
|
236
238
|
tests/system/testDMSDefinitions.py
|
|
237
239
|
tests/system/testFileCatalogDefinitions.py
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
---
|
|
3
|
+
cwlVersion: v1.2
|
|
4
|
+
class: CommandLineTool
|
|
5
|
+
baseCommand:
|
|
6
|
+
- ctapipe-process
|
|
7
|
+
- --DataWriter.write_dl1_parameters=True
|
|
8
|
+
- --DataWriter.write_dl2=False
|
|
9
|
+
doc: |
|
|
10
|
+
Processes a single file from DL0 to DL1 using the ctapipe-process tool.
|
|
11
|
+
(DPPS-UC-130-1.2.1)
|
|
12
|
+
label: process single dl0 to dl1
|
|
13
|
+
inputs:
|
|
14
|
+
processing_config:
|
|
15
|
+
type: File?
|
|
16
|
+
inputBinding:
|
|
17
|
+
prefix: --config
|
|
18
|
+
doc: |
|
|
19
|
+
Sets the reconstruction parameters that apply to DL0 to DL1.
|
|
20
|
+
See `ctapipe-process --help-all` for a list of all options, or the output
|
|
21
|
+
of `ctapipe-quickstart` for sample configuration files.
|
|
22
|
+
|
|
23
|
+
dl0:
|
|
24
|
+
type: [File, string]
|
|
25
|
+
doc: |
|
|
26
|
+
path to input file, which can be at any data level transformable to DL1
|
|
27
|
+
that is supported by the installed ctapipe io plugins. I can also be a
|
|
28
|
+
URL.
|
|
29
|
+
inputBinding:
|
|
30
|
+
prefix: --input
|
|
31
|
+
|
|
32
|
+
dl1_filename:
|
|
33
|
+
type: string
|
|
34
|
+
doc: name of the DL1 output file
|
|
35
|
+
inputBinding:
|
|
36
|
+
prefix: --output
|
|
37
|
+
|
|
38
|
+
provenance_log_filename:
|
|
39
|
+
type: string
|
|
40
|
+
doc: file in which to write the local ctapipe-process provenance.
|
|
41
|
+
default: ctapipe-process_dl0_dl1.provenance.log
|
|
42
|
+
inputBinding:
|
|
43
|
+
prefix: --provenance-log
|
|
44
|
+
|
|
45
|
+
outputs:
|
|
46
|
+
dl1:
|
|
47
|
+
type: File
|
|
48
|
+
doc: HDF5 format output file.
|
|
49
|
+
outputBinding:
|
|
50
|
+
glob: $(inputs.dl1_filename)
|
|
51
|
+
|
|
52
|
+
provenance_log:
|
|
53
|
+
type: File
|
|
54
|
+
doc: ctapipe format provenance log for this step.
|
|
55
|
+
outputBinding:
|
|
56
|
+
glob: $(inputs.provenance_log_filename)
|
|
57
|
+
|
|
58
|
+
hints:
|
|
59
|
+
DockerRequirement:
|
|
60
|
+
dockerPull: harbor.cta-observatory.org/dpps/datapipe:dev
|
|
@@ -198,3 +198,42 @@ def test_cwl_job_submit(
|
|
|
198
198
|
):
|
|
199
199
|
executable = executable.text
|
|
200
200
|
assert executable == "cwltool"
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
def test_datapipe_cwl_job(mock_submit_job):
|
|
204
|
+
job = CWLJob(
|
|
205
|
+
"tests/resources/cwl/process_dl0_dl1.cwl",
|
|
206
|
+
"tests/resources/cwl/inputs_process_dl0_dl1.yaml",
|
|
207
|
+
cvmfs_base_path=Path("/cvmfs/ctao.dpps.test/"),
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
# these are set via inputs
|
|
211
|
+
assert len(job.input_data) == 1
|
|
212
|
+
assert (
|
|
213
|
+
job.input_data[0]
|
|
214
|
+
== "LFN:/ctao/simpipe/prod6/gamma-diffuse/010xxx/gamma_cone10_run010000.simtel.zst"
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
result = job.submit()
|
|
218
|
+
mock_submit_job.assert_called_once_with(job)
|
|
219
|
+
result_xml = ET.fromstring(result)
|
|
220
|
+
|
|
221
|
+
if input_data := result_xml.find(".//Parameter[@name='InputData']/value"):
|
|
222
|
+
input_data = input_data.text.split(";")
|
|
223
|
+
assert len(input_data) == 1
|
|
224
|
+
assert input_data[0] == "gamma_cone10_run010000.simtel.zst"
|
|
225
|
+
|
|
226
|
+
if input_sandbox := result_xml.find(".//Parameter[@name='InputSandbox']/value"):
|
|
227
|
+
input_sandbox = input_sandbox.text.split(";")
|
|
228
|
+
assert len(input_sandbox) == 1
|
|
229
|
+
assert input_sandbox[0] == "process_config.yaml"
|
|
230
|
+
|
|
231
|
+
if output_data := result_xml.find(".//Parameter[@name='OutputData']/value"):
|
|
232
|
+
output_data = output_data.text.split(";")
|
|
233
|
+
assert len(output_data) == 1
|
|
234
|
+
assert output_data[0] == "LFN:/ctao/datapipe/test.dl1.h5"
|
|
235
|
+
|
|
236
|
+
if output_sandbox := result_xml.find(".//Parameter[@name='OutputSandbox']/value"):
|
|
237
|
+
output_sandbox = output_sandbox.text.split(";")
|
|
238
|
+
assert len(job.output_sandbox) == 1
|
|
239
|
+
assert job.output_sandbox[0] == "ctapipe-process_dl0_dl1.provenance.log"
|
|
@@ -26,74 +26,40 @@ from CTADIRAC.Interfaces.Utilities.CWL_utils import (
|
|
|
26
26
|
CVMFS_BASE_PATH = Path("/cvmfs/ctao.dpps.test")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
@pytest.fixture
|
|
30
|
-
def mock_load_inputfile(mocker):
|
|
31
|
-
return mocker.patch("CTADIRAC.Interfaces.Utilities.CWL_utils.load_inputfile")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@pytest.fixture
|
|
35
|
-
def mock_load_document_by_uri(mocker):
|
|
36
|
-
return mocker.patch("CTADIRAC.Interfaces.Utilities.CWL_utils.load_document_by_uri")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@pytest.fixture
|
|
40
|
-
def mock_translate_docker_hints(mocker):
|
|
41
|
-
return mocker.patch(
|
|
42
|
-
"CTADIRAC.Interfaces.Utilities.CWL_utils.translate_docker_hints"
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
@pytest.fixture
|
|
47
|
-
def mock_extract_and_translate_output_files(mocker):
|
|
48
|
-
return mocker.patch(
|
|
49
|
-
"CTADIRAC.Interfaces.Utilities.CWL_utils.extract_and_translate_output_files"
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
29
|
@pytest.mark.parametrize(
|
|
54
|
-
("file_input", "expected_result", "
|
|
30
|
+
("file_input", "expected_result", "expected_lfn"),
|
|
55
31
|
[
|
|
56
32
|
(
|
|
57
33
|
File(path=LFN_PREFIX + "test_lfn_file.txt"),
|
|
58
34
|
"test_lfn_file.txt",
|
|
59
|
-
|
|
60
|
-
[LFN_DIRAC_PREFIX + "test_lfn_file.txt"],
|
|
35
|
+
True,
|
|
61
36
|
),
|
|
62
37
|
(
|
|
63
38
|
File(path=LOCAL_PREFIX + "test_local_file.txt"),
|
|
64
39
|
"test_local_file.txt",
|
|
65
|
-
|
|
66
|
-
[],
|
|
40
|
+
False,
|
|
67
41
|
),
|
|
68
42
|
(
|
|
69
43
|
LFN_PREFIX + "test_lfn_str.txt",
|
|
70
44
|
"test_lfn_str.txt",
|
|
71
|
-
|
|
72
|
-
[LFN_DIRAC_PREFIX + "test_lfn_str.txt"],
|
|
45
|
+
True,
|
|
73
46
|
),
|
|
74
47
|
(
|
|
75
48
|
LOCAL_PREFIX + "test_local_str.txt",
|
|
76
49
|
"test_local_str.txt",
|
|
77
|
-
|
|
78
|
-
[],
|
|
50
|
+
False,
|
|
79
51
|
),
|
|
80
|
-
(File(), None,
|
|
52
|
+
(File(), None, False), # This will raise an exception
|
|
81
53
|
],
|
|
82
54
|
)
|
|
83
|
-
def test_translate_sandboxes_and_lfns(
|
|
84
|
-
file_input, expected_result, expected_sandboxes, expected_lfns
|
|
85
|
-
):
|
|
86
|
-
sandboxes = []
|
|
87
|
-
lfns = []
|
|
88
|
-
|
|
55
|
+
def test_translate_sandboxes_and_lfns(file_input, expected_result, expected_lfn):
|
|
89
56
|
if expected_result is None:
|
|
90
|
-
with pytest.raises(
|
|
91
|
-
translate_sandboxes_and_lfns(file_input
|
|
57
|
+
with pytest.raises(KeyError, match="File path is not defined."):
|
|
58
|
+
translate_sandboxes_and_lfns(file_input)
|
|
92
59
|
else:
|
|
93
|
-
result = translate_sandboxes_and_lfns(file_input
|
|
60
|
+
result, is_lfn = translate_sandboxes_and_lfns(file_input)
|
|
94
61
|
assert result == expected_result
|
|
95
|
-
assert
|
|
96
|
-
assert lfns == expected_lfns
|
|
62
|
+
assert is_lfn == expected_lfn
|
|
97
63
|
|
|
98
64
|
|
|
99
65
|
@pytest.mark.parametrize(
|
|
@@ -160,11 +126,8 @@ def test_translate_sandboxes_and_lfns(
|
|
|
160
126
|
),
|
|
161
127
|
],
|
|
162
128
|
)
|
|
163
|
-
def test_extract_and_translate_input_files(
|
|
164
|
-
|
|
165
|
-
):
|
|
166
|
-
mock_load_inputfile.return_value = input_data
|
|
167
|
-
result = extract_and_translate_input_files(Path("dummy_path"))
|
|
129
|
+
def test_extract_and_translate_input_files(input_data, expected_result):
|
|
130
|
+
result = extract_and_translate_input_files(input_data)
|
|
168
131
|
assert result == expected_result
|
|
169
132
|
|
|
170
133
|
|
|
@@ -246,7 +209,8 @@ def test_verify_cwl_output_type(output_type, expected_result):
|
|
|
246
209
|
)
|
|
247
210
|
def test_extract_and_translate_output_files(outputs, expected_result):
|
|
248
211
|
cwl_obj = CommandLineTool(inputs=None, outputs=outputs)
|
|
249
|
-
result = extract_and_translate_output_files(cwl_obj)
|
|
212
|
+
result = extract_and_translate_output_files(cwl_obj, {})
|
|
213
|
+
|
|
250
214
|
assert result["OutputSandbox"] == expected_result["OutputSandbox"]
|
|
251
215
|
assert result["OutputData"] == expected_result["OutputData"]
|
|
252
216
|
assert isinstance(result["CWLDesc"], CommandLineTool)
|
|
@@ -274,32 +238,19 @@ def test_translate_docker_hints(
|
|
|
274
238
|
assert result.baseCommand == expected_base_command
|
|
275
239
|
|
|
276
240
|
|
|
277
|
-
|
|
278
|
-
("hints"),
|
|
279
|
-
[
|
|
280
|
-
([DockerRequirement(dockerPull="harbor/python:tag")],),
|
|
281
|
-
],
|
|
282
|
-
)
|
|
283
|
-
def test_translate_cwl_workflow(
|
|
284
|
-
mock_load_document_by_uri,
|
|
285
|
-
mock_translate_docker_hints,
|
|
286
|
-
mock_extract_and_translate_output_files,
|
|
287
|
-
hints,
|
|
288
|
-
):
|
|
241
|
+
def test_translate_cwl_workflow():
|
|
289
242
|
cwl_obj = CommandLineTool(
|
|
290
|
-
inputs=None,
|
|
243
|
+
inputs=None,
|
|
244
|
+
outputs=None,
|
|
245
|
+
hints=[DockerRequirement(dockerPull="harbor/python:tag")],
|
|
246
|
+
baseCommand="python",
|
|
291
247
|
)
|
|
292
|
-
mock_load_document_by_uri.return_value = cwl_obj
|
|
293
|
-
mock_translate_docker_hints.return_value = cwl_obj
|
|
294
|
-
mock_extract_and_translate_output_files.return_value = {
|
|
295
|
-
"CWLDesc": cwl_obj,
|
|
296
|
-
"OutputSandbox": [],
|
|
297
|
-
"OutputData": [],
|
|
298
|
-
}
|
|
299
248
|
|
|
300
|
-
result = translate_cwl_workflow(
|
|
249
|
+
result = translate_cwl_workflow(
|
|
250
|
+
cwl_obj=cwl_obj,
|
|
251
|
+
cwl_inputs={},
|
|
252
|
+
cvmfs_base_path=CVMFS_BASE_PATH,
|
|
253
|
+
apptainer_options=[],
|
|
254
|
+
)
|
|
301
255
|
|
|
302
|
-
mock_load_document_by_uri.assert_called_once_with(Path("workflow.cwl"))
|
|
303
|
-
mock_translate_docker_hints.assert_called_once_with(cwl_obj, CVMFS_BASE_PATH, [])
|
|
304
|
-
mock_extract_and_translate_output_files.assert_called_once_with(cwl_obj)
|
|
305
256
|
assert result == {"CWLDesc": cwl_obj, "OutputSandbox": [], "OutputData": []}
|