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
5a9659e9
Commit
5a9659e9
authored
1 year ago
by
Hans Fangohr
Browse files
Options
Downloads
Plain Diff
Merge branch 'use-mpsd-microarch-consistently' into 'main'
Use mpsd microarch consistently Closes
#33
See merge request
!108
parents
6d46478e
b7a8b507
No related branches found
No related tags found
1 merge request
!108
Use mpsd microarch consistently
Pipeline
#375547
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
+1
-10
1 addition, 10 deletions
src/mpsd_software_manager/mpsd_software.py
tests/test_mpsd_software.py
+1
-4
1 addition, 4 deletions
tests/test_mpsd_software.py
with
2 additions
and
14 deletions
src/mpsd_software_manager/mpsd_software.py
+
1
−
10
View file @
5a9659e9
...
@@ -132,7 +132,6 @@ def read_metadata_from_logfile(logfile: Union[str, Path]) -> dict:
...
@@ -132,7 +132,6 @@ def read_metadata_from_logfile(logfile: Union[str, Path]) -> dict:
def
create_log_file_name
(
def
create_log_file_name
(
mpsd_release
:
str
,
mpsd_release
:
str
,
microarch
:
str
,
action
:
str
,
action
:
str
,
date
:
str
=
call_date_iso
,
date
:
str
=
call_date_iso
,
package_set
:
Union
[
str
,
None
]
=
None
,
package_set
:
Union
[
str
,
None
]
=
None
,
...
@@ -152,8 +151,6 @@ def create_log_file_name(
...
@@ -152,8 +151,6 @@ def create_log_file_name(
----------
----------
mpsd_release : str
mpsd_release : str
MPSD software stack version
MPSD software stack version
microarch : str
system architecture
date : str
date : str
date of the call ins iso format
date of the call ins iso format
action : str
action : str
...
@@ -176,7 +173,6 @@ def create_log_file_name(
...
@@ -176,7 +173,6 @@ def create_log_file_name(
# installer log file name for `mpsd-software install dev-23a foss2021a-mpi`
# installer log file name for `mpsd-software install dev-23a foss2021a-mpi`
>>>
create_log_file_name
(
>>>
create_log_file_name
(
...
"
dev-23a
"
,
...
"
dev-23a
"
,
...
"
sandybridge
"
,
...
"
install
"
,
...
"
install
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
2023-07-03T12-27-52
"
,
...
)
...
)
...
@@ -185,7 +181,6 @@ def create_log_file_name(
...
@@ -185,7 +181,6 @@ def create_log_file_name(
# build log file name for `mpsd-software install dev-23a foss2021a-mpi`
# build log file name for `mpsd-software install dev-23a foss2021a-mpi`
>>>
create_log_file_name
(
>>>
create_log_file_name
(
...
"
dev-23a
"
,
...
"
dev-23a
"
,
...
"
sandybridge
"
,
...
"
install
"
,
...
"
install
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
foss2021a-mpi
"
,
...
"
foss2021a-mpi
"
,
...
@@ -195,7 +190,6 @@ def create_log_file_name(
...
@@ -195,7 +190,6 @@ def create_log_file_name(
# installer log file name for `mpsd-software status dev-23a`
# installer log file name for `mpsd-software status dev-23a`
>>>
create_log_file_name
(
>>>
create_log_file_name
(
...
"
dev-23a
"
,
...
"
dev-23a
"
,
...
"
sandybridge
"
,
...
"
status
"
,
...
"
status
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
2023-07-03T12-27-52
"
,
...
)
...
)
...
@@ -204,13 +198,13 @@ def create_log_file_name(
...
@@ -204,13 +198,13 @@ def create_log_file_name(
# build log file name for `mpsd-software status dev-23a` (no log file is created)
# build log file name for `mpsd-software status dev-23a` (no log file is created)
>>>
create_log_file_name
(
>>>
create_log_file_name
(
...
"
dev-23a
"
,
...
"
dev-23a
"
,
...
"
sandybridge
"
,
...
"
status
"
,
...
"
status
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
2023-07-03T12-27-52
"
,
...
"
foss2021a-mpi
"
,
...
"
foss2021a-mpi
"
,
...
)
...
)
(
None
)
(
None
)
"""
"""
microarch
=
get_native_microarchitecture
()
if
package_set
:
if
package_set
:
# if package_set is given, then we build the build_log_file_name
# if package_set is given, then we build the build_log_file_name
if
action
in
[
"
install
"
,
"
remove
"
]:
if
action
in
[
"
install
"
,
"
remove
"
]:
...
@@ -301,11 +295,8 @@ def get_log_file_path(
...
@@ -301,11 +295,8 @@ def get_log_file_path(
...
)
...
)
(
None
)
(
None
)
"""
"""
# Get machine configs
microarch
=
get_native_microarchitecture
()
log_file_name
=
create_log_file_name
(
log_file_name
=
create_log_file_name
(
mpsd_release
=
mpsd_release
,
mpsd_release
=
mpsd_release
,
microarch
=
microarch
,
action
=
cmd
,
action
=
cmd
,
package_set
=
package_set
,
package_set
=
package_set
,
)
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_mpsd_software.py
+
1
−
4
View file @
5a9659e9
...
@@ -421,13 +421,12 @@ def test_create_log_file_name():
...
@@ -421,13 +421,12 @@ def test_create_log_file_name():
"""
Test that the log file names are created correctly.
"""
"""
Test that the log file names are created correctly.
"""
create_log_file_name
=
mod
.
create_log_file_name
create_log_file_name
=
mod
.
create_log_file_name
mpsd_release
=
"
dev-23a
"
mpsd_release
=
"
dev-23a
"
microarch
=
"
sandybridge
"
microarch
=
mod
.
get_native_microarchitecture
()
date
=
datetime
.
datetime
.
now
().
replace
(
microsecond
=
0
).
isoformat
()
date
=
datetime
.
datetime
.
now
().
replace
(
microsecond
=
0
).
isoformat
()
action
=
"
install
"
action
=
"
install
"
package_set
=
"
foss2021a
"
package_set
=
"
foss2021a
"
# test build_log_file_name generation
# test build_log_file_name generation
build_log_file_name
=
create_log_file_name
(
build_log_file_name
=
create_log_file_name
(
microarch
=
microarch
,
mpsd_release
=
mpsd_release
,
mpsd_release
=
mpsd_release
,
date
=
date
,
date
=
date
,
action
=
action
,
action
=
action
,
...
@@ -438,7 +437,6 @@ def test_create_log_file_name():
...
@@ -438,7 +437,6 @@ def test_create_log_file_name():
==
f
"
{
mpsd_release
}
_
{
microarch
}
_
{
date
}
_BUILD_
{
package_set
}
_
{
action
}
.log
"
==
f
"
{
mpsd_release
}
_
{
microarch
}
_
{
date
}
_BUILD_
{
package_set
}
_
{
action
}
.log
"
)
)
installer_log_file_name
=
create_log_file_name
(
installer_log_file_name
=
create_log_file_name
(
microarch
=
microarch
,
mpsd_release
=
mpsd_release
,
mpsd_release
=
mpsd_release
,
date
=
date
,
date
=
date
,
action
=
action
,
action
=
action
,
...
@@ -449,7 +447,6 @@ def test_create_log_file_name():
...
@@ -449,7 +447,6 @@ def test_create_log_file_name():
)
)
# test no build log file for incorrect action
# test no build log file for incorrect action
build_log_file_name
=
create_log_file_name
(
build_log_file_name
=
create_log_file_name
(
microarch
=
microarch
,
mpsd_release
=
mpsd_release
,
mpsd_release
=
mpsd_release
,
date
=
date
,
date
=
date
,
action
=
"
status
"
,
action
=
"
status
"
,
...
...
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