Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Commits
2633b7d3
Commit
2633b7d3
authored
3 years ago
by
Loraine Gueguen
Browse files
Options
Downloads
Patches
Plain Diff
fix picture_path
parent
b16675ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
Release v2.1.0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gga_init.py
+9
-9
9 additions, 9 deletions
gga_init.py
speciesData.py
+0
-1
0 additions, 1 deletion
speciesData.py
templates/gspecies_compose.yml.j2
+1
-1
1 addition, 1 deletion
templates/gspecies_compose.yml.j2
with
10 additions
and
11 deletions
gga_init.py
+
9
−
9
View file @
2633b7d3
...
@@ -38,7 +38,7 @@ class DeploySpeciesStack(speciesData.SpeciesData):
...
@@ -38,7 +38,7 @@ class DeploySpeciesStack(speciesData.SpeciesData):
"""
"""
def
make_directory_tree
(
self
,
picture_path
):
def
make_directory_tree
(
self
):
"""
"""
Generate the directory tree for an organism
Generate the directory tree for an organism
...
@@ -77,18 +77,18 @@ class DeploySpeciesStack(speciesData.SpeciesData):
...
@@ -77,18 +77,18 @@ class DeploySpeciesStack(speciesData.SpeciesData):
self
.
config
.
pop
(
constants
.
CONF_TRIPAL_BANNER_PATH
,
None
)
self
.
config
.
pop
(
constants
.
CONF_TRIPAL_BANNER_PATH
,
None
)
# Copy the organism picture for tripal
# Copy the organism picture for tripal
if
picture_path
is
not
None
:
if
self
.
picture_path
is
not
None
:
if
os
.
path
.
isfile
(
picture_path
):
if
os
.
path
.
isfile
(
self
.
picture_path
):
picture_path_basename
=
os
.
path
.
basename
(
picture_path
)
picture_path_basename
=
os
.
path
.
basename
(
self
.
picture_path
)
picture_path_filename
,
picture_path_extension
=
os
.
path
.
splitext
(
picture_path_basename
)
picture_path_filename
,
picture_path_extension
=
os
.
path
.
splitext
(
picture_path_basename
)
if
picture_path_extension
==
"
.png
"
or
picture_path_extension
==
"
.jpg
"
:
if
picture_path_extension
==
"
.png
"
or
picture_path_extension
==
"
.jpg
"
:
picture_dest_name
=
"
species%s
"
%
picture_path_extension
picture_dest_name
=
"
species%s
"
%
picture_path_extension
picture_dest_path
=
os
.
path
.
join
(
self
.
species_dir
,
picture_dest_name
)
picture_dest_path
=
os
.
path
.
join
(
self
.
species_dir
,
picture_dest_name
)
shutil
.
copy
(
picture_path
,
picture_dest_path
)
shutil
.
copy
(
self
.
picture_path
,
picture_dest_path
)
else
:
else
:
logging
.
error
(
"
Specified organism picture has wrong extension (must be
'
.png
'
or
'
.jpg
'
): {0}
"
.
format
(
picture_path
))
logging
.
error
(
"
Specified organism picture has wrong extension (must be
'
.png
'
or
'
.jpg
'
): {0}
"
.
format
(
self
.
picture_path
))
else
:
else
:
logging
.
error
(
"
Specified organism picture not found {0} for {1}
"
.
format
(
picture_path
,
self
.
genus_uppercase
+
"
"
+
self
.
species
))
logging
.
error
(
"
Specified organism picture not found {0} for {1}
"
.
format
(
self
.
picture_path
,
self
.
genus_uppercase
+
"
"
+
self
.
species
))
# Create nginx dirs and write/re-write nginx conf
# Create nginx dirs and write/re-write nginx conf
make_dirs
(
dir_paths_li
=
[
"
./nginx
"
,
"
./nginx/conf
"
])
make_dirs
(
dir_paths_li
=
[
"
./nginx
"
,
"
./nginx/conf
"
])
...
@@ -423,8 +423,8 @@ if __name__ == "__main__":
...
@@ -423,8 +423,8 @@ if __name__ == "__main__":
logging
.
info
(
"
gga_init.py called for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
logging
.
info
(
"
gga_init.py called for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
# Make/update directory tree
# Make/update directory tree
picture_path
=
sp_picture_dict
[
deploy_stack_for_current_organism
.
genus_species
]
deploy_stack_for_current_organism
.
picture_path
=
sp_picture_dict
[
deploy_stack_for_current_organism
.
genus_species
]
deploy_stack_for_current_organism
.
make_directory_tree
(
picture_path
)
deploy_stack_for_current_organism
.
make_directory_tree
()
logging
.
info
(
"
Successfully generated the directory tree for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
logging
.
info
(
"
Successfully generated the directory tree for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
# Make compose files
# Make compose files
...
...
This diff is collapsed.
Click to expand it.
speciesData.py
+
0
−
1
View file @
2633b7d3
...
@@ -69,7 +69,6 @@ class SpeciesData:
...
@@ -69,7 +69,6 @@ class SpeciesData:
self
.
date
=
datetime
.
today
().
strftime
(
"
%Y-%m-%d
"
)
self
.
date
=
datetime
.
today
().
strftime
(
"
%Y-%m-%d
"
)
self
.
origin
=
parameters_dictionary_description
[
constants
.
ORG_PARAM_DESC_ORIGIN
]
self
.
origin
=
parameters_dictionary_description
[
constants
.
ORG_PARAM_DESC_ORIGIN
]
self
.
performed
=
parameters_dictionary_data
[
constants
.
ORG_PARAM_DATA_PERFORMED_BY
]
self
.
performed
=
parameters_dictionary_data
[
constants
.
ORG_PARAM_DATA_PERFORMED_BY
]
self
.
picture_path
=
parameters_dictionary_description
[
constants
.
ORG_PARAM_DESC_PICTURE_PATH
]
if
parameters_dictionary_data
[
constants
.
ORG_PARAM_DATA_GENOME_VERSION
]
==
""
:
if
parameters_dictionary_data
[
constants
.
ORG_PARAM_DATA_GENOME_VERSION
]
==
""
:
self
.
genome_version
=
"
1.0
"
self
.
genome_version
=
"
1.0
"
...
...
This diff is collapsed.
Click to expand it.
templates/gspecies_compose.yml.j2
+
1
−
1
View file @
2633b7d3
...
@@ -42,7 +42,7 @@ services:
...
@@ -42,7 +42,7 @@ services:
- ./banner.png:/var/www/html/banner.png:ro
- ./banner.png:/var/www/html/banner.png:ro
{% endif %}
{% endif %}
#- /groups/XXX/:/groups/XXX/:ro # We do this when we have symlinks in src_data pointing to /groups/XXX/...
#- /groups/XXX/:/groups/XXX/:ro # We do this when we have symlinks in src_data pointing to /groups/XXX/...
{% if 'picture_path' is defined
and 'picture_path' != ''
%}
{% if 'picture_path' is defined %}
{% if 'png' in picture_path %}
{% if 'png' in picture_path %}
- ./species.png:/var/www/html/species.png:ro
- ./species.png:/var/www/html/species.png:ro
{% endif %}
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment