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
9c499bcd
Commit
9c499bcd
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
Add support for allowing unreleased branches in get_available_package_sets function
parent
80315a1a
No related branches found
No related tags found
1 merge request
!142
Resolve "Allow arbitrary branch deployment for development."
Pipeline
#444249
failed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mpsd_software_manager/cmds/available.py
+7
-2
7 additions, 2 deletions
src/mpsd_software_manager/cmds/available.py
src/mpsd_software_manager/mpsd_software.py
+8
-1
8 additions, 1 deletion
src/mpsd_software_manager/mpsd_software.py
with
15 additions
and
3 deletions
src/mpsd_software_manager/cmds/available.py
+
7
−
2
View file @
9c499bcd
...
...
@@ -10,7 +10,7 @@ from mpsd_software_manager import config_vars
from
mpsd_software_manager.utils.filesystem_utils
import
clone_repo
def
get_available_package_sets
(
mpsd_release
:
str
)
->
List
[
str
]:
def
get_available_package_sets
(
mpsd_release
:
str
,
allow_unreleased_branch
:
bool
=
False
)
->
List
[
str
]:
"""
Given a release, return the available package_sets.
This is based on the spack-environment
'
s repository [1]. For this function
...
...
@@ -48,10 +48,15 @@ def get_available_package_sets(mpsd_release: str) -> List[str]:
tmp_dir_path
=
Path
(
tmp_dir
.
name
)
# find package_sets by cloning repository and checking out right branch
if
allow_unreleased_branch
:
spe_branch
=
mpsd_release
else
:
spe_branch
=
f
"
releases/
{
mpsd_release
}
"
clone_repo
(
tmp_dir_path
,
config_vars
.
spack_environments_repo
,
branch
=
f
"
releases/
{
mpsd_release
}
"
,
branch
=
spe_branch
,
)
# look for directories defining the package_sets
...
...
This diff is collapsed.
Click to expand it.
src/mpsd_software_manager/mpsd_software.py
+
8
−
1
View file @
9c499bcd
...
...
@@ -99,6 +99,13 @@ def main():
parser
.
add_argument
(
"
--version
"
,
action
=
"
version
"
,
version
=
__version__
)
parser
.
add_argument
(
"
--develop
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
Use the develop release version
"
,
)
subparsers
=
parser
.
add_subparsers
(
dest
=
"
action
"
,
title
=
"
actions
"
,
...
...
@@ -249,7 +256,7 @@ def main():
prepare_environment
(
args
.
release
,
root_dir
)
elif
args
.
action
==
"
available
"
:
if
args
.
release
:
get_available_package_sets
(
args
.
release
)
get_available_package_sets
(
args
.
release
,
args
.
develop
)
else
:
get_available_releases
(
print_result
=
True
)
sys
.
exit
(
0
)
...
...
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