Commit 50ea9045 authored by Thomas Van Parys's avatar Thomas Van Parys
Browse files

Make the linter happy

parent 02f9348c
......@@ -8,7 +8,6 @@ def get_plaza_data():
'''
Download the full json object from Plaza.
'''
api_url = "https://bioinformatics.psb.ugent.be/plaza/api/get_species_data"
response = urllib.request.urlopen(api_url)
......@@ -37,8 +36,6 @@ def get_ftp_url(species, data_type):
return None
def find_species(needle):
'''
Find species by (part of) a full name or Plaza id.
......@@ -55,6 +52,7 @@ def find_species(needle):
return hits
def get_all_species():
'''
Retrieve all species available in Plaza.
......@@ -63,15 +61,15 @@ def get_all_species():
'''
j = get_plaza_data()
hits = {}
for entry in j:
hits[entry['species']] = entry['common_name']
return hits
###
### Commandline interface.
# Commandline interface.
###
......@@ -81,6 +79,7 @@ def cli():
A command line interface to the Plaza API.
'''
@cli.command()
@click.argument('needle')
def find(needle):
......@@ -125,16 +124,13 @@ def ftp(species, data_type):
https://bioinformatics.psb.ugent.be/plaza/documentation/data_warehouse
'''
ftp_url = get_ftp_url(species, data_type)
if not ftp_url:
print("Error: Species abbrevation unknown: {}".format(species), file=sys.stderr)
sys.exit(1)
print(ftp_url)
if __name__ == '__main__':
cli()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment