Skip to content

Commit

Permalink
update release notes && remove tiny files
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangs18 committed Sep 13, 2024
1 parent 71670bc commit 0cbe155
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
1 change: 0 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.7] - TBD
- Genomes are now saved in batches to the workspace
- Unusable `export_genome_features_protein_to_fasta` function was removed
- The `genbanks_to_genomes` method was added to allow users to upload multiple
genome objects at once
Expand Down
1 change: 0 additions & 1 deletion test/data/metagenomes/toy/features_handle_ref

This file was deleted.

1 change: 0 additions & 1 deletion test/data/metagenomes/toy/protein_handle_ref

This file was deleted.

19 changes: 16 additions & 3 deletions test/problematic_tests/save_genome_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json # noqa: F401
import os # noqa: F401
import shutil
import tempfile
import time
import unittest
import urllib.error
Expand Down Expand Up @@ -149,12 +150,20 @@ def prepare_data(cls):
cls.test_metagenome_data = json.load(open('data/metagenomes/toy/metagenome.json'))
cls.test_metagenome_data['assembly_ref'] = assembly_refs[1]["upa"]

# Move files to the share folder
# Set taregt paths in the share folder
fhr_path = os.path.join(cls.scratch,'features_handle_ref')
phr_path = os.path.join(cls.scratch,'protein_handle_ref')

shutil.copy('data/metagenomes/toy/features_handle_ref', fhr_path)
shutil.copy('data/metagenomes/toy/protein_handle_ref', phr_path)
# Create temp files
with tempfile.NamedTemporaryFile(delete=False, mode='w', encoding='utf-8') as temp_features_file:
temp_features_file.write("test features_handle_ref")

with tempfile.NamedTemporaryFile(delete=False, mode='w', encoding='utf-8') as temp_protein_file:
temp_protein_file.write("test protein_handle_ref")

# Move files to the share folder
shutil.copy(temp_features_file.name, fhr_path)
shutil.copy(temp_protein_file.name, phr_path)

# Upload files to the blobstore
handle_service_outputs = cls.dfu.file_to_shock_mass(
Expand All @@ -172,6 +181,10 @@ def prepare_data(cls):
cls.nodes_to_delete.append(handle_service_outputs[0]["shock_id"])
cls.nodes_to_delete.append(handle_service_outputs[1]["shock_id"])

# Remove temp files
os.remove(temp_features_file.name)
os.remove(temp_protein_file.name)

def getWsClient(self):
return self.__class__.wsClient

Expand Down

0 comments on commit 0cbe155

Please sign in to comment.