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

Remove duplicate logging #57

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
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
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
[![semantic-release: conventional commits](https://img.shields.io/badge/semantic--release-conventional%20commits-Æ1A7DBD?logo=semantic-release&color=1E7FBF)](https://github.com/semantic-release/semantic-release)
[![GitHub license](https://img.shields.io/github/license/populationgenomics/cpg-flow.svg)](https://github.com/populationgenomics/cpg-flow/blob/main/LICENSE)

![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2FSET-362-abbreviate-multicohort-name%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)
![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2FSET-362-abbreviate-multicohort-name%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
<<<<<<< Updated upstream
![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)
![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
=======
![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)
![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
>>>>>>> Stashed changes

[![Technical Debt](https://sonarqube.populationgenomics.org.au/api/project_badges/measure?project=populationgenomics_cpg-flow&metric=sqale_index&token=sqb_bd2c5ce00628492c0af714f727ef6f8e939d235c)](https://sonarqube.populationgenomics.org.au/dashboard?id=populationgenomics_cpg-flow)
[![Duplicated Lines (%)](https://sonarqube.populationgenomics.org.au/api/project_badges/measure?project=populationgenomics_cpg-flow&metric=duplicated_lines_density&token=sqb_bd2c5ce00628492c0af714f727ef6f8e939d235c)](https://sonarqube.populationgenomics.org.au/dashboard?id=populationgenomics_cpg-flow)
Expand Down Expand Up @@ -160,9 +165,15 @@ Ensure you have the necessary permissions and are authenticated with Google Clou

#### Unit Tests

![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2FSET-362-abbreviate-multicohort-name%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)
<<<<<<< Updated upstream
![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)

![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2FSET-362-abbreviate-multicohort-name%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
=======
![Tests](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.test-badge.status&label=Tests&color=%24.test-badge.color)

![Coverage](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fpopulationgenomics%2Fcpg-flow%2Frefs%2Fheads%2Fremove-duplicate-logging%2Fdocs%2Fbadges.yaml&query=%24.coverage-badge.status&label=Coverage&color=%24.coverage-badge.color)
>>>>>>> Stashed changes


#### E2E Test
Expand Down
2 changes: 1 addition & 1 deletion docs/badges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ test-badge:
status: 43 / 43 passed
color: green
coverage-badge:
status: 79.84%
status: 79.82%
color: orange
9 changes: 4 additions & 5 deletions src/cpg_flow/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def _get(
f'decorator? Available: {self._outputs_by_target_by_stage}',
)
if not self._outputs_by_target_by_stage[stage.__name__].get(target.target_id):
LOGGER.error(f'Available: {self._outputs_by_target_by_stage[stage.__name__]}, trying to find {target.target_id}')
LOGGER.error(
f'Available: {self._outputs_by_target_by_stage[stage.__name__]}, trying to find {target.target_id}',
)
raise StageInputNotFoundError(
f'Not found output for {target} from stage {stage.__name__}, required for stage {self.stage.name}',
)
Expand Down Expand Up @@ -857,9 +859,8 @@ def queue_for_multicohort(
"""
output_by_target: dict[str, StageOutput | None] = dict()
# iterate directly over the datasets in this multicohort
for dataset_i, dataset in enumerate(multicohort.get_datasets()):
for dataset in multicohort.get_datasets():
action = self._get_action(dataset)
LOGGER.info(f'{self.name}: #{dataset_i + 1}/{dataset} [{action.name}]')
output_by_target[dataset.target_id] = self._queue_jobs_with_checks(
dataset,
action,
Expand Down Expand Up @@ -894,7 +895,6 @@ def queue_for_multicohort(
output_by_target: dict[str, StageOutput | None] = dict()
for cohort in multicohort.get_cohorts():
action = self._get_action(cohort)
LOGGER.info(f'{self.name}: {cohort} [{action.name}]')
output_by_target[cohort.target_id] = self._queue_jobs_with_checks(
cohort,
action,
Expand Down Expand Up @@ -932,7 +932,6 @@ def queue_for_multicohort(
"""
output_by_target: dict[str, StageOutput | None] = dict()
action = self._get_action(multicohort)
LOGGER.info(f'{self.name}: {multicohort} [{action.name}]')
output_by_target[multicohort.target_id] = self._queue_jobs_with_checks(
multicohort,
action,
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading