Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/broadinstitute/seqr into sho…
Browse files Browse the repository at this point in the history
…w-all-consequence-terms
  • Loading branch information
hanars committed Oct 10, 2024
2 parents f17dc29 + 7deebf1 commit 3f094cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ def handle(self, *args, **options):
success_runs = {path: re.match(path_regex, path).groupdict() for path in list_files(path, user=None)}
if not success_runs:
user_args = [f'{k}={options[k]}' for k in RUN_PATH_FIELDS if options[k]]
raise CommandError(f'No successful runs found for {", ".join(user_args)}')
if user_args:
raise CommandError(f'No successful runs found for {", ".join(user_args)}')
else:
logger.info('No loaded data available')
return

loaded_runs = set(Sample.objects.filter(data_source__isnull=False).values_list('data_source', flat=True))
new_runs = {path: run for path, run in success_runs.items() if run['run_version'] not in loaded_runs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ def test_command(self, mock_email, mock_airtable_utils):
self.mock_glob.assert_called_with('/seqr/seqr-hail-search-data/GRCh37/MITO/runs/*/_SUCCESS')
self.mock_subprocess.assert_not_called()

call_command('check_for_new_samples_from_pipeline')
self.mock_logger.info.assert_called_with('No loaded data available')
self.mock_subprocess.assert_not_called()
mock_email.assert_not_called()
self.mock_send_slack.assert_not_called()

local_files = [
'/seqr/seqr-hail-search-data/GRCh38/SNV_INDEL/runs/auto__2023-08-09/_SUCCESS',
'/seqr/seqr-hail-search-data/GRCh37/SNV_INDEL/runs/manual__2023-11-02/_SUCCESS',
Expand Down

0 comments on commit 3f094cb

Please sign in to comment.