Skip to content

Commit

Permalink
Merge pull request #3265 from antgonza/minor-fixes-2023.03
Browse files Browse the repository at this point in the history
fix #3264 + processing_job email subject
  • Loading branch information
charles-cowart authored Mar 8, 2023
2 parents 8c25dfb + 7bfcf25 commit ea0b4bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion qiita_db/processing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ def _generate_notification_message(self, value, error_msg):
return None

# generate subject line
subject = 'Job status change: %s (%s)' % (self.command.name, self.id)
subject = '%s: %s (%s)' % (self.command.name, value, self.id)

# generate message line
message = ''
Expand Down Expand Up @@ -1386,6 +1386,8 @@ def _complete_artifact_transformation(self, artifacts_data):

# Submit m validator jobs as n lists of jobs
n = qiita_config.job_scheduler_dependency_q_cnt
if n is None:
n = 2

# taken from:
# https://www.geeksforgeeks.org/break-list-chunks-size-n-python/
Expand Down
10 changes: 5 additions & 5 deletions qiita_db/test/test_processing_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def test_notification_mail_generation(self):
# messages of type 'error'.
obs = self.tester1._generate_notification_message('error', None)

exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: error '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1'
Expand All @@ -880,7 +880,7 @@ def test_notification_mail_generation(self):

obs = self.tester1._generate_notification_message('error',
'An Error Message')
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: error '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -891,7 +891,7 @@ def test_notification_mail_generation(self):
# The inclusion of an error message has no effect on other valid
# status types e.g. 'running'.
obs = self.tester1._generate_notification_message('running', None)
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: running '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -900,7 +900,7 @@ def test_notification_mail_generation(self):
self.assertDictEqual(obs, exp)

obs = self.tester1._generate_notification_message('running', 'Yahoo!')
exp = {'subject': ('Job status change: Split libraries FASTQ '
exp = {'subject': ('Split libraries FASTQ: running '
'(063e553b-327c-4818-ab4a-adfe58e49860)'),
'message': ('Processing Job: Split libraries FASTQ\n'
f'{qiita_config.base_url}/study/description/1\n'
Expand All @@ -912,7 +912,7 @@ def test_notification_mail_generation(self):
jid = '8a7a8461-e8a1-4b4e-a428-1bc2f4d3ebd0'
pj = qdb.processing_job.ProcessingJob(jid)
obs = pj._generate_notification_message('running', 'Yahoo!')
exp = {'subject': 'Job status change: Single Rarefaction '
exp = {'subject': 'Single Rarefaction: running '
'(8a7a8461-e8a1-4b4e-a428-1bc2f4d3ebd0)',
'message': 'Analysis Job Single Rarefaction\n'
f'{qiita_config.base_url}/analysis/description/1/\n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ wetlab processing and we provide the following host references for your convenie
- auto-detect adapters and `cow <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/003/205/GCA_000003205.6_Btau_5.0.1/GCA_000003205.6_Btau_5.0.1_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `hamster <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/017/639/785/GCF_017639785.1_BCM_Maur_2.0/GCF_017639785.1_BCM_Maur_2.0_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `horse <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/002/305/GCA_000002305.1_EquCab2.0/GCA_000002305.1_EquCab2.0_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and merge_genomes + phix filtering : is the combined genomes of a cheetah, cow, hamster, horse, human, mouse, pig, rabbit, and rat
- auto-detect adapters and `mouse <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/635/GCF_000001635.27_GRCm39/GCF_000001635.27_GRCm39_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `pig <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/003/025/GCF_000003025.6_Sscrofa11.1/GCF_000003025.6_Sscrofa11.1_genomic.fna.gz>`_ + phix filtering
- auto-detect adapters and `rabbit <https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/003/625/GCF_000003625.3_OryCun2.0/GCF_000003625.3_OryCun2.0_genomic.fna.gz>`_ + phix filtering
Expand Down

0 comments on commit ea0b4bd

Please sign in to comment.