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
e6e1939c
Commit
e6e1939c
authored
1 year ago
by
Hans Fangohr
Browse files
Options
Downloads
Plain Diff
Merge branch 'handle-errors-in-release-input' into 'main'
Remove trailing slash in mpsd_release input Closes
#22
See merge request
!92
parents
103653cd
385d6547
No related branches found
No related tags found
1 merge request
!92
Remove trailing slash in mpsd_release input
Pipeline
#374637
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mpsd_software_manager/mpsd_software.py
+5
-8
5 additions, 8 deletions
src/mpsd_software_manager/mpsd_software.py
tests/test_mpsd_software.py
+1
-0
1 addition, 0 deletions
tests/test_mpsd_software.py
with
6 additions
and
8 deletions
src/mpsd_software_manager/mpsd_software.py
+
5
−
8
View file @
e6e1939c
...
...
@@ -1261,6 +1261,11 @@ def main():
initialise_environment
(
Path
(
os
.
getcwd
()))
sys
.
exit
(
0
)
# sanity check for common mistakes in command line arguments
if
args
.
release
.
endswith
(
"
/
"
):
# happens easily with autocompletion
args
.
release
=
args
.
release
.
removesuffix
(
"
/
"
)
logging
.
warning
(
f
"
Removed trailing slash from release:
{
args
.
release
}
"
)
# root_dir is the place where this MPSD software instance has its root
root_dir
=
get_root_dir
()
...
...
@@ -1275,14 +1280,6 @@ def main():
log_file
,
)
# sanity check for common mistakes in command line arguments
if
args
.
release
.
endswith
(
"
/
"
):
# happens easily with autocompletion
logging
.
error
(
f
"
You provided mpsd-release=
'
{
args
.
release
}
'
.
"
f
"
Did you mean
'
{
args
.
release
.
removesuffix
(
'
/
'
)
}
'
?
"
)
sys
.
exit
(
1
)
# Check the command and run related function
if
args
.
action
==
"
remove
"
:
remove_environment
(
args
.
release
,
root_dir
,
args
.
package_set
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_mpsd_software.py
+
1
−
0
View file @
e6e1939c
...
...
@@ -575,6 +575,7 @@ def test_interface(tmp_path):
# check that the help message is printed when no arguments are provided
# check that the help message is printed when -h is provided
# check that the error messages are also logged to the log file
# check that `/` in release is handled correctly
# other tests to add (ideally)
...
...
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