Skip to content
Snippets Groups Projects
Commit 596b855b authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

replace call() with run(). Factorize run_command() and...

replace call() with run(). Factorize run_command() and run_docker_stack_deploy(service, working_dir)
parent 491ae1fa
No related branches found
No related tags found
2 merge requests!12Release_2.0 next,!9Release 2.0 (merge dev to master)
...@@ -113,6 +113,8 @@ class DeploySpeciesStack(speciesData.SpeciesData): ...@@ -113,6 +113,8 @@ class DeploySpeciesStack(speciesData.SpeciesData):
"genus_species": self.genus_species, "genus_species_strain_sex": self.species_folder_name, "genus_species": self.genus_species, "genus_species_strain_sex": self.species_folder_name,
"genus_species_sex": "{0}_{1}_{2}".format(self.genus_lowercase, self.species.lower(), self.sex), "genus_species_sex": "{0}_{1}_{2}".format(self.genus_lowercase, self.species.lower(), self.sex),
"strain": self.strain, "sex": self.sex, "Genus_species": self.genus_species[0].upper() + self.genus_species[1:]} "strain": self.strain, "sex": self.sex, "Genus_species": self.genus_species[0].upper() + self.genus_species[1:]}
if (len(self.config.keys()) == 0):
logging.error("Empty config dictionary")
# Merge the two dicts # Merge the two dicts
render_vars = {**self.config, **input_vars} render_vars = {**self.config, **input_vars}
...@@ -131,6 +133,8 @@ class DeploySpeciesStack(speciesData.SpeciesData): ...@@ -131,6 +133,8 @@ class DeploySpeciesStack(speciesData.SpeciesData):
logging.debug("Writing the galaxy_nginx.conf file for %s" % self.genus_species) logging.debug("Writing the galaxy_nginx.conf file for %s" % self.genus_species)
galaxy_nginx_conf_file.truncate(0) galaxy_nginx_conf_file.truncate(0)
galaxy_nginx_conf_file.write(galaxy_nginx_conf_output) galaxy_nginx_conf_file.write(galaxy_nginx_conf_output)
else:
logging.debug("galaxy_nginx.conf alredy exists")
# Create the volumes (directory) of the species docker-compose file # Create the volumes (directory) of the species docker-compose file
create_mounts(working_dir=".", main_dir=self.main_dir) create_mounts(working_dir=".", main_dir=self.main_dir)
...@@ -364,6 +368,8 @@ if __name__ == "__main__": ...@@ -364,6 +368,8 @@ if __name__ == "__main__":
else: else:
config_file = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), constants.DEFAULT_CONFIG) config_file = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), constants.DEFAULT_CONFIG)
config = utilities.parse_config(config_file) config = utilities.parse_config(config_file)
if (len(config.keys()) == 0):
logging.error("Empty config dictionary")
main_dir = None main_dir = None
if not args.main_directory: if not args.main_directory:
......
...@@ -53,10 +53,10 @@ services: ...@@ -53,10 +53,10 @@ services:
SITE_NAME: "{{ Genus_species }}" SITE_NAME: "{{ Genus_species }}"
ELASTICSEARCH_HOST: elasticsearch.{{ genus_species }} ELASTICSEARCH_HOST: elasticsearch.{{ genus_species }}
ENABLE_JBROWSE: /jbrowse/?data=data/{{ genus_species_strain_sex }} ENABLE_JBROWSE: /jbrowse/?data=data/{{ genus_species_strain_sex }}
ENABLE_APOLLO: {{ apollo }} ENABLE_APOLLO: 0
ENABLE_BLAST: {{ blast }} ENABLE_BLAST: {{ blast }}
ENABLE_DOWNLOAD: {{ download }} ENABLE_DOWNLOAD: 1
ENABLE_WIKI: {{ wiki }} ENABLE_WIKI: 0
ENABLE_GO: 0 ENABLE_GO: 0
ENABLE_ORTHOLOGY: 0 ENABLE_ORTHOLOGY: 0
ENABLE_ORTHOLOGY_LINKS: 0 ENABLE_ORTHOLOGY_LINKS: 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment