Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libworkflows
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Blaise LI
libworkflows
Commits
dfee2e90
Commit
dfee2e90
authored
8 months ago
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Trying to fix infinite recursion error.
parent
e7c9e8fd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libworkflows/__init__.py
+1
-1
1 addition, 1 deletion
libworkflows/__init__.py
libworkflows/libworkflows.py
+6
-10
6 additions, 10 deletions
libworkflows/libworkflows.py
with
7 additions
and
11 deletions
libworkflows/__init__.py
+
1
−
1
View file @
dfee2e90
__copyright__
=
"
Copyright (C) 2020 Blaise Li
"
__licence__
=
"
GNU GPLv3
"
__version__
=
0.6
__version__
=
0.6
.
1
from
.libworkflows
import
(
SHELL_FUNCTIONS
,
cleanup_and_backup
,
column_converter
,
ensure_relative
,
envmods
,
...
...
This diff is collapsed.
Click to expand it.
libworkflows/libworkflows.py
+
6
−
10
View file @
dfee2e90
...
...
@@ -221,26 +221,22 @@ def run_with_modules(
def
envmods
(
mod_name
,
module_versions
,
dependency
=
None
):
module_versions
):
"""
Generate a list of string representing the modules to be loaded.
*mod_name* will be used as a key in the *module_versions*
dictionary in order to get the associated version number.
If *dependency* is set, it is assumed that the dictionary
entry for *mod_name* is actually a sub-dictionary of dependencies
for module *mod_name* (including *mod_name* itself) where
*dependency* will be found as a key.
If the dictionary entry for *mod_name* is actually a sub-dictionary
of dependencies for module *mod_name* (including *mod_name* itself),
the list of modules will be those in this sub-dictionary.
"""
if
isinstance
(
module_versions
[
mod_name
],
Mapping
):
return
list
(
chain
.
from_iterable
(
envmods
(
mod_name
,
module_versions
,
dependency
=
dependency
)
envmods
(
dependency
,
module_versions
[
mod_name
]
)
for
dependency
in
module_versions
[
mod_name
]))
if
dependency
is
None
:
return
[
f
"
{
mod_name
}
/
{
module_versions
[
mod_name
]
}
"
]
return
[
f
"
{
dependency
}
/
{
module_versions
[
mod_name
][
dependency
]
}
"
]
return
[
f
"
{
mod_name
}
/
{
module_versions
[
mod_name
]
}
"
]
def
run_and_write_methods
(
...
...
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