Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
MPSD Computational Science
mpsd-software-manager
Commits
3e8b3882
Commit
3e8b3882
authored
1 year ago
by
Hans Fangohr
Browse files
Options
Downloads
Patches
Plain Diff
complete suggestion to separate available_releases
from available package sets
parent
7314507f
No related branches found
Branches containing commit
No related tags found
1 merge request
!110
return available (i.e. released!) release versions
Pipeline
#375689
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mpsd_software_manager/mpsd_software.py
+8
-15
8 additions, 15 deletions
src/mpsd_software_manager/mpsd_software.py
with
8 additions
and
15 deletions
src/mpsd_software_manager/mpsd_software.py
+
8
−
15
View file @
3e8b3882
...
...
@@ -471,7 +471,7 @@ def set_up_logging(loglevel="warning", file_path=None):
)
def
get_available_package_sets
(
mpsd_release
:
Union
[
str
,
None
]
)
->
List
[
str
]:
def
get_available_package_sets
(
mpsd_release
:
str
)
->
List
[
str
]:
"""
Given a release, return the available package_sets.
This is based on the spack-environment
'
s repository [1]. For this function
...
...
@@ -480,8 +480,6 @@ def get_available_package_sets(mpsd_release: Union[str, None]) -> List[str]:
We use a temporary directory to clone the repository locally, which is
deleted upon successful completion of the function.
If `mpsd_release` is None, display the available release versions, and exit.
[1] https://gitlab.gwdg.de/mpsd-cs/spack-environments.git
Returns
...
...
@@ -504,14 +502,6 @@ def get_available_package_sets(mpsd_release: Union[str, None]) -> List[str]:
logging
.
debug
(
f
"
get_available_package_sets(
{
mpsd_release
=
}
)
"
)
print_log
=
logging
.
getLogger
(
"
print
"
)
# display available releases if no release is specified:
if
mpsd_release
is
None
:
releases
=
get_available_releases
()
print
(
"
Available MPSD software releases:
"
)
for
release
in
releases
:
print
(
f
"
{
release
}
"
)
sys
.
exit
(
0
)
logging
.
info
(
f
"
Retrieving available package_sets for release
{
mpsd_release
}
"
)
# create temporary directory
...
...
@@ -806,13 +796,12 @@ def get_available_releases(print_result: bool = False) -> List[str]:
releases
=
[
"
dev-23a
"
]
print_log
=
logging
.
getLogger
(
"
print
"
)
if
print_result
:
print_log
(
"
Available MPSD software releases:
"
)
print_log
.
info
(
"
Available MPSD software releases:
"
)
for
release
in
releases
:
print
(
f
"
{
release
}
"
)
print
_log
.
info
(
f
"
{
release
}
"
)
return
releases
def
get_release_info
(
mpsd_release
:
str
,
root_dir
:
Path
)
->
Tuple
[
str
,
str
,
List
[
str
]]:
"""
Get information about the specified release.
...
...
@@ -1457,7 +1446,11 @@ def main():
elif
args
.
action
==
"
prepare
"
:
prepare_environment
(
args
.
release
,
root_dir
)
elif
args
.
action
==
"
available
"
:
get_available_package_sets
(
args
.
release
)
if
args
.
release
:
get_available_package_sets
(
args
.
release
)
else
:
get_available_releases
(
print_result
=
True
)
sys
.
exit
(
0
)
else
:
message
=
(
f
"
No known action found (
{
args
.
action
=
}
). Should probably never happen.
"
...
...
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