Skip to content

Commit

Permalink
Merge pull request #50 from apriltuesday/fix-hold-date
Browse files Browse the repository at this point in the history
only get hold date if we're about to accession and make files public
  • Loading branch information
apriltuesday authored Jun 21, 2021
2 parents 0719a7d + b3e47bb commit 4d9b24a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions eva_submission/eload_ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def ingest(
tasks=None
):
self.eload_cfg.set(self.config_section, 'ingestion_date', value=self.now)
self.update_config_with_hold_date(self.project_accession)
self.check_brokering_done()
self.check_variant_db(db_name)

Expand All @@ -69,6 +68,7 @@ def ingest(

if do_accession:
self.eload_cfg.set(self.config_section, 'accession', 'instance_id', value=instance_id)
self.update_config_with_hold_date(self.project_accession)
self.run_accession_workflow()
self.insert_browsable_files()
self.refresh_study_browser()
Expand All @@ -85,9 +85,6 @@ def check_brokering_done(self):
if self.project_accession is None:
self.error('No project accession in submission config, check that brokering to ENA is done. ')
raise ValueError('No project accession in submission config.')
if self.eload_cfg.query('brokering', 'ena', 'hold_date') is None:
self.error('No release date found, check that brokering to ENA is done.')
raise ValueError('No release date found in submission config.')
# check there are no vcfs in valid folder that aren't in brokering config
for valid_vcf in self.valid_vcf_filenames:
if not any(f.endswith(valid_vcf.name) for f in self.eload_cfg.query('brokering', 'vcf_files').keys()):
Expand Down Expand Up @@ -335,7 +332,6 @@ def insert_browsable_files(self):
execute_query(conn, insert_query)

# update loaded and release date
# TODO get release date from ENA directly
release_date = self.eload_cfg.query('brokering', 'ena', 'hold_date')
release_update = f"update evapro.browsable_file " \
f"set loaded = true, eva_release = '{release_date.strftime('%Y%m%d')}' " \
Expand Down

0 comments on commit 4d9b24a

Please sign in to comment.