From f063c3d8ec40c167dbaed0dd1e1b62ff4efb79a5 Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Tue, 28 Jan 2025 15:44:53 -0500 Subject: [PATCH 1/4] Solution for #541 --- looper/conductor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/looper/conductor.py b/looper/conductor.py index 231a2366..952e48b2 100644 --- a/looper/conductor.py +++ b/looper/conductor.py @@ -18,7 +18,7 @@ from eido.const import INPUT_FILE_SIZE_KEY, MISSING_KEY from jinja2.exceptions import UndefinedError -from peppy.const import CONFIG_KEY, SAMPLE_NAME_ATTR, SAMPLE_YAML_EXT +from peppy.const import CONFIG_KEY, SAMPLE_YAML_EXT from peppy.exceptions import RemoteYAMLError from pipestat import PipestatError from ubiquerg import expandpath @@ -77,7 +77,7 @@ def _get_yaml_path(namespaces, template_key, default_name_appendix="", filename= # default YAML location f = ( filename - or f"{namespaces['sample'][SAMPLE_NAME_ATTR]}" + or f"{namespaces['sample'][namespaces['sample']['_project'].sample_table_index]}" f"{default_name_appendix}" f"{SAMPLE_YAML_EXT[0]}" ) From ffed13f2b50465600aa8b744618b961b741b0d66 Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:41:46 -0500 Subject: [PATCH 2/4] update ubiquerg req and update looper to v2.0.1 --- docs/changelog.md | 5 +++++ looper/_version.py | 2 +- looper/cli_pydantic.py | 2 +- requirements/requirements-all.txt | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 986d8550..6b11b8c9 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format. +## [2.0.1] -- 2025-03-05 + +### Changed +- update ubiquerg>=0.8.1 + ## [2.0.0] -- 2025-01-16 This release breaks backwards compatibility for Looper versions < 2.0.0 diff --git a/looper/_version.py b/looper/_version.py index 0ac2c675..ad44a781 100644 --- a/looper/_version.py +++ b/looper/_version.py @@ -1,2 +1,2 @@ -__version__ = "2.0.0" +__version__ = "2.0.1" # You must change the version in parser = pydantic_argparse.ArgumentParser in cli_pydantic.py!!! diff --git a/looper/cli_pydantic.py b/looper/cli_pydantic.py index 1bef39f3..0ede9dfa 100644 --- a/looper/cli_pydantic.py +++ b/looper/cli_pydantic.py @@ -340,7 +340,7 @@ def main(test_args=None) -> dict: prog="looper", description="Looper: A job submitter for Portable Encapsulated Projects", add_help=True, - version="2.0.0", + version="2.0.1", ) parser = add_short_arguments(parser, ArgumentEnum) diff --git a/requirements/requirements-all.txt b/requirements/requirements-all.txt index 6533040a..88af67d8 100644 --- a/requirements/requirements-all.txt +++ b/requirements/requirements-all.txt @@ -8,7 +8,7 @@ pipestat>=0.12.0a1 peppy>=0.40.6 pyyaml>=3.12 rich>=9.10.0 -ubiquerg>=0.8.1a1 +ubiquerg>=0.8.1 yacman==0.9.3 pydantic-argparse>=0.9.0 psutil \ No newline at end of file From 2bdf2b8cdccf74978b6d9c5eebcd76efd0f80b1d Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:46:08 -0500 Subject: [PATCH 3/4] lint with newer version --- looper/command_models/__init__.py | 2 +- looper/conductor.py | 2 +- looper/const.py | 2 +- looper/divvy.py | 2 +- looper/exceptions.py | 2 +- looper/parser_types.py | 2 +- looper/pipeline_interface.py | 2 +- looper/project.py | 2 +- looper/utils.py | 4 +--- tests/divvytests/divvy_tests/test_divvy.py | 2 +- tests/divvytests/helpers.py | 2 +- tests/divvytests/regression/test_write_script.py | 2 +- 12 files changed, 12 insertions(+), 14 deletions(-) diff --git a/looper/command_models/__init__.py b/looper/command_models/__init__.py index 4258506b..46d1c396 100644 --- a/looper/command_models/__init__.py +++ b/looper/command_models/__init__.py @@ -1,6 +1,6 @@ """ This package holds `pydantic` models that describe commands and their arguments. -These can be used either by an HTTP API or with the `pydantic-argparse` +These can be used either by an HTTP API or with the `pydantic-argparse` library to build a CLI. """ diff --git a/looper/conductor.py b/looper/conductor.py index 952e48b2..5f24ebfb 100644 --- a/looper/conductor.py +++ b/looper/conductor.py @@ -1,4 +1,4 @@ -""" Pipeline job submission orchestration """ +"""Pipeline job submission orchestration""" import importlib import logging diff --git a/looper/const.py b/looper/const.py index de080260..bfa51309 100644 --- a/looper/const.py +++ b/looper/const.py @@ -1,4 +1,4 @@ -""" Shared project constants """ +"""Shared project constants""" import os from enum import Enum diff --git a/looper/divvy.py b/looper/divvy.py index e458bad6..84e66ed7 100644 --- a/looper/divvy.py +++ b/looper/divvy.py @@ -1,4 +1,4 @@ -""" Computing configuration representation """ +"""Computing configuration representation""" import logging import os diff --git a/looper/exceptions.py b/looper/exceptions.py index 7d478feb..62b9e041 100644 --- a/looper/exceptions.py +++ b/looper/exceptions.py @@ -1,4 +1,4 @@ -""" Exceptions for specific looper issues. """ +"""Exceptions for specific looper issues.""" from abc import ABCMeta from collections.abc import Iterable diff --git a/looper/parser_types.py b/looper/parser_types.py index 2afc2c4a..98404965 100644 --- a/looper/parser_types.py +++ b/looper/parser_types.py @@ -1,4 +1,4 @@ -""" Definitions of the parser argument types """ +"""Definitions of the parser argument types""" from yacman import YAMLConfigManager diff --git a/looper/pipeline_interface.py b/looper/pipeline_interface.py index 387c6d49..f7f0793e 100644 --- a/looper/pipeline_interface.py +++ b/looper/pipeline_interface.py @@ -1,4 +1,4 @@ -""" Model the connection between a pipeline and a project or executor. """ +"""Model the connection between a pipeline and a project or executor.""" import os from collections.abc import Mapping diff --git a/looper/project.py b/looper/project.py index d77dc368..df69ac5a 100644 --- a/looper/project.py +++ b/looper/project.py @@ -1,4 +1,4 @@ -""" Looper version of NGS project model. """ +"""Looper version of NGS project model.""" import itertools import os diff --git a/looper/utils.py b/looper/utils.py index 5a8279bd..b5d904c5 100644 --- a/looper/utils.py +++ b/looper/utils.py @@ -1,4 +1,4 @@ -""" Helpers without an obvious logical home. """ +"""Helpers without an obvious logical home.""" import argparse from collections import defaultdict @@ -1112,7 +1112,6 @@ def inspect_looper_config_file(looper_config_dict) -> None: def expand_nested_var_templates(var_templates_dict, namespaces): - "Takes all var_templates as a dict and recursively expands any paths." result = {} @@ -1127,7 +1126,6 @@ def expand_nested_var_templates(var_templates_dict, namespaces): def render_nested_var_templates(var_templates_dict, namespaces): - "Takes all var_templates as a dict and recursively renders the jinja templates." result = {} diff --git a/tests/divvytests/divvy_tests/test_divvy.py b/tests/divvytests/divvy_tests/test_divvy.py index da9ce7c8..a67e489d 100644 --- a/tests/divvytests/divvy_tests/test_divvy.py +++ b/tests/divvytests/divvy_tests/test_divvy.py @@ -1,4 +1,4 @@ -""" Assorted divvy tests """ +"""Assorted divvy tests""" import pytest from yacman import YacAttMap, load_yaml diff --git a/tests/divvytests/helpers.py b/tests/divvytests/helpers.py index e2e9d35c..be4b1104 100644 --- a/tests/divvytests/helpers.py +++ b/tests/divvytests/helpers.py @@ -1,4 +1,4 @@ -""" Test helpers """ +"""Test helpers""" import random import string diff --git a/tests/divvytests/regression/test_write_script.py b/tests/divvytests/regression/test_write_script.py index 1159ee46..0a82753c 100644 --- a/tests/divvytests/regression/test_write_script.py +++ b/tests/divvytests/regression/test_write_script.py @@ -1,4 +1,4 @@ -""" Specific case tests for writing submission script """ +"""Specific case tests for writing submission script""" from copy import deepcopy import random From 5b78e4b4a178d2349e1109da8d9c701d9c7de850 Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:52:50 -0500 Subject: [PATCH 4/4] update changelog with fixed issues --- docs/changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 6b11b8c9..9f5680d0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed - update ubiquerg>=0.8.1 +### Fixed +- [#541](https://github.com/pepkit/looper/issues/541) + ## [2.0.0] -- 2025-01-16 This release breaks backwards compatibility for Looper versions < 2.0.0