From f579a28aad55074eacb48073d9799da965d32063 Mon Sep 17 00:00:00 2001 From: Arthur Le Bars <arthur.le-bars@sb-roscoff.fr> Date: Tue, 20 Apr 2021 18:14:45 +0200 Subject: [PATCH] fix typo, renamed files in 'files' dir, fix for jbrowee menu url --- ...lia_users_template.yml => authelia_users.yml} | 0 ...nx_apollo_template.conf => nginx_apollo.conf} | 0 ...ownload_template.conf => nginx_download.conf} | 0 gga_init.py | 16 ++++++++++------ run_workflow_phaeoexplorer.py | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) rename files/{authelia_users_template.yml => authelia_users.yml} (100%) rename files/{nginx_apollo_template.conf => nginx_apollo.conf} (100%) rename files/{nginx_download_template.conf => nginx_download.conf} (100%) diff --git a/files/authelia_users_template.yml b/files/authelia_users.yml similarity index 100% rename from files/authelia_users_template.yml rename to files/authelia_users.yml diff --git a/files/nginx_apollo_template.conf b/files/nginx_apollo.conf similarity index 100% rename from files/nginx_apollo_template.conf rename to files/nginx_apollo.conf diff --git a/files/nginx_download_template.conf b/files/nginx_download.conf similarity index 100% rename from files/nginx_download_template.conf rename to files/nginx_download.conf diff --git a/gga_init.py b/gga_init.py index dbe4745..46e104a 100755 --- a/gga_init.py +++ b/gga_init.py @@ -79,11 +79,15 @@ class DeploySpeciesStack(speciesData.SpeciesData): # Create nginx dirs and write/re-write nginx conf make_dirs(dir_paths_li=["./nginx", "./nginx/conf"]) try: - with open(os.path.abspath("./nginx/conf/default.conf"), 'w') as conf: - conf.write("server {\n\tlisten 80;\n\tserver_name ~.;\n\tlocation /download/ {\n\t\talias /project_data/; \n\t\tautoindex on;\n\t}\n}") # The species nginx conf - except OSError as exc: - logging.critical("Cannot write NginX conf file") - sys.exit(exc) + shutil.copy(os.path.join(self.script_dir, "files/nginx_download.conf"), os.path.abspath("./nginx/conf/default.conf")) + except Exception as exc: + logging.critical("Could not copy nginx configuration file for %s" % self.full_name) + logging.critical(exc) + # with open(os.path.abspath("./nginx/conf/default.conf"), 'w') as conf: + # conf.write("server {\n\tlisten 80;\n\tserver_name ~.;\n\tlocation /download/ {\n\t\talias /project_data/; \n\t\tautoindex on;\n\t}\n}") # The species nginx conf + # except OSError as exc: + # logging.critical("Cannot write NginX conf file") + # sys.exit(exc) # Return to main directory os.chdir(self.main_dir) @@ -128,7 +132,7 @@ class DeploySpeciesStack(speciesData.SpeciesData): gspecies_compose_file.write(gspecies_compose_output) - galaxy_nginx_conf_template = env.get_template("galaxy_nginx_conf.j2") + galaxy_nginx_conf_template = env.get_template("galaxy_nginx.conf.j2") galaxy_nginx_conf_output = galaxy_nginx_conf_template.render(render_vars) with open(os.path.join(self.main_dir, "galaxy_nginx.conf"), "w") as galaxy_nginx_conf_file: logging.debug("Writing the galaxy_nginx.conf file for %s" % self.genus_species) diff --git a/run_workflow_phaeoexplorer.py b/run_workflow_phaeoexplorer.py index fe77cef..49f3a2a 100755 --- a/run_workflow_phaeoexplorer.py +++ b/run_workflow_phaeoexplorer.py @@ -493,7 +493,7 @@ class RunWorkflow(speciesData.SpeciesData): # as runtime values, using runtime parameters makes the tool throw an internal critical error ("replace not found" error) # Scratchgmod test: need "http" (or "https"), the hostname (+ port) if "menu_url" not in self.config.keys(): - jbrowse_menu_url = "https://{hostname}/sp/{genus_sp}/feature/{Genus}/{species}/{id}".format(hostname=self.config["hostname"], genus_sp=self.genus_species, Genus=self.genus_uppercase, species=self.species, id="{id}") + jbrowse_menu_url = "https://{hostname}/sp/{genus_sp}/feature/{Genus}/{species}/mRNA/{id}".format(hostname=self.config["hostname"], genus_sp=self.genus_species, Genus=self.genus_uppercase, species=self.species, id="{id}") else: jbrowse_menu_url = self.config["menu_url"] if workflow_name == "Jbrowse": -- GitLab