Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bugfix of version crash when pipeline runs over several days #490

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ from hydra_genetics.utils.software_versions import touch_software_version_file
from hydra_genetics.utils.software_versions import use_container


hydra_min_version("1.14.0")
hydra_min_version("3.0.0")

min_version("7.13.0")

Expand Down Expand Up @@ -74,20 +74,24 @@ with open(config["output"]) as output:

validate(output_spec, schema="../schemas/output_files.schema.yaml")

date_string = datetime.now().strftime("%Y%m%d")
pipeline_version = get_pipeline_version(workflow, pipeline_name="Twist_Solid")
version_files = touch_pipeline_version_file_name(pipeline_version, date_string=date_string, directory="results/versions/software")
## get version information on pipeline, containers and software

pipeline_name = "Twist_Solid"
pipeline_version = get_pipeline_version(workflow, pipeline_name=pipeline_name)
version_files = touch_pipeline_version_file_name(
pipeline_version, date_string=pipeline_name, directory="results/versions/software"
)
if use_container(workflow):
version_files.append(touch_software_version_file(config, date_string=date_string, directory="results/versions/software"))
version_files.append(touch_software_version_file(config, date_string=pipeline_name, directory="results/versions/software"))
add_version_files_to_multiqc(config, version_files)


onstart:
export_pipeline_version_as_file(pipeline_version, date_string=date_string, directory="results/versions/software")
export_pipeline_version_as_file(pipeline_version, date_string=pipeline_name, directory="results/versions/software")
if use_container(workflow):
update_config, software_info = add_software_version_to_config(config, workflow, False)
export_software_version_as_file(software_info, date_string=date_string, directory="results/versions/software")
export_config_as_file(update_config, date_string=date_string, directory="results/versions")
export_software_version_as_file(software_info, date_string=pipeline_name, directory="results/versions/software")
export_config_as_file(update_config, date_string=pipeline_name, directory="results/versions")


### Set wildcard constraints
Expand Down
Loading