Skip to content

Commit

Permalink
Fix GenBank date format (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
atc3 authored Jun 21, 2024
1 parent d40d998 commit 45a6c7c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
4 changes: 1 addition & 3 deletions workflow_flu_genbank_ingest/scripts/download_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down
4 changes: 1 addition & 3 deletions workflow_flu_genbank_ingest/scripts/download_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down
4 changes: 1 addition & 3 deletions workflow_rsv_genbank_ingest/scripts/download_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down
4 changes: 1 addition & 3 deletions workflow_rsv_genbank_ingest/scripts/download_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down
4 changes: 1 addition & 3 deletions workflow_sars2_genbank_ingest/scripts/download_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down
4 changes: 1 addition & 3 deletions workflow_sars2_genbank_ingest/scripts/download_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def main():
)
args = parser.parse_args()

# NCBI doesn't like an end date even close to today
# so set the maximum end date to today minus 14 days
max_date = (datetime.datetime.now() - datetime.timedelta(days=14)).isoformat()
max_date = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.00Z")
if args.end_time > max_date:
args.end_time = max_date

Expand Down

0 comments on commit 45a6c7c

Please sign in to comment.