Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Packages
chemical_checker
Commits
903a19a5
Commit
903a19a5
authored
Dec 28, 2021
by
Martino Bertoni
🌋
Browse files
added symlink and metadata generation task
parent
a2705fad
Pipeline
#2600
passed with stages
in 77 minutes and 29 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
pipelines/cc_update.py
View file @
903a19a5
...
...
@@ -530,12 +530,12 @@ def main(args):
#############################################
#############################################
# TASK: Create sym links for exemplary plots
def
create_exemplary_links_fn
(
cc
,
sign_ref
):
# TASK: Create sym links for exemplary signatures
def
create_symlinks_fn
(
cc
,
sign_ref
):
# link to exmplary signatures
target_path
=
os
.
path
.
join
(
args
.
cc_root
,
"exemplary"
)
if
not
os
.
path
.
isdir
(
target_path
):
os
.
mkdir
(
target_path
)
for
ds
in
Dataset
.
get
(
exemplary
=
True
):
signature_path
=
cc
.
get_signature_path
(
sign_ref
,
"full"
,
ds
.
code
)
source_path
=
signature_path
[:
-
6
]
...
...
@@ -544,12 +544,16 @@ def main(args):
os
.
mkdir
(
target_dir
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
target_dir
,
ds
.
code
[:
2
])):
os
.
symlink
(
source_path
,
os
.
path
.
join
(
target_dir
,
ds
.
code
[:
2
]))
links_task
=
PythonCallable
(
name
=
"exemplary_links"
,
python_callable
=
create_exemplary_links_fn
,
# link to single folder for all signatures
cc
.
export_symlinks
()
# add metadata to signatures
cc
.
add_sign_metadata
()
symlinks_task
=
PythonCallable
(
name
=
"symlinks"
,
python_callable
=
create_symlinks_fn
,
op_args
=
[
cc
,
'sign1'
])
pp
.
add_task
(
links_task
)
pp
.
add_task
(
sym
links_task
)
# END TASK
#############################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment