Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #55 suppress_output for create_or_update_organism.py and delete_organism.py, version bump to 4.2.9 #57

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
10 changes: 7 additions & 3 deletions tools/apollo/create_or_update_organism.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def zip_data_dir(dataset_data_dir, tar):
species=args.species,
public=args.public,
blatdb=blat_db,
no_reload_sequences=args.no_reload_sequences
no_reload_sequences=args.no_reload_sequences,
suppress_output=True
)
time.sleep(2)

Expand Down Expand Up @@ -219,7 +220,8 @@ def zip_data_dir(dataset_data_dir, tar):
genus=args.genus,
species=args.species,
public=args.public,
metadata=None
metadata=None,
suppress_output=True
)

# Must sleep before we're ready to handle
Expand All @@ -239,5 +241,7 @@ def zip_data_dir(dataset_data_dir, tar):
res = wa.groups.update_organism_permissions(group['name'], org_cn,
administrate=False, write=True, read=True,
export=True)
# Get expected metadata for organism since AllOrganism output is suppressed from add_organism
data = wa.organisms.show_organism(org_cn)

print(json.dumps(data, indent=2))
print(json.dumps([data], indent=2))
3 changes: 2 additions & 1 deletion tools/apollo/delete_organism.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ def IsRemote():
if IsRemote():
print(wa.remote.delete_organism(org['commonName']))
else:
print(wa.organisms.delete_organism(org['id']))
wa.organisms.delete_organism(org['id'], suppress_output=True)
print(org)
4 changes: 2 additions & 2 deletions tools/apollo/macros.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<macros>
<token name="@WRAPPER_VERSION@">4.2.5</token>
<token name="@WRAPPER_VERSION@">4.2.9</token>

<xml name="requirements">
<requirements>
<requirement type="package" version="4.2.5">apollo</requirement>
<requirement type="package" version="4.2.9">apollo</requirement>
<yield/>
</requirements>
</xml>
Expand Down