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
ed1fe951
Commit
ed1fe951
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
rename initialize_environment function to initialise_environment
parent
6b25baa6
Branches
Branches containing commit
No related tags found
1 merge request
!93
Rename initialize_environment function to initialise_environment
Pipeline
#374573
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
+2
-2
2 additions, 2 deletions
src/mpsd_software_manager/mpsd_software.py
tests/test_mpsd_software.py
+5
-5
5 additions, 5 deletions
tests/test_mpsd_software.py
with
7 additions
and
7 deletions
src/mpsd_software_manager/mpsd_software.py
+
2
−
2
View file @
ed1fe951
...
...
@@ -1085,7 +1085,7 @@ def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict:
return
toolchain_map
def
initiali
z
e_environment
(
root_dir
:
Path
)
->
None
:
def
initiali
s
e_environment
(
root_dir
:
Path
)
->
None
:
"""
Initialize the software environment.
This creates a hidden file ``.mpsd-software-root`` to tag the location for
...
...
@@ -1258,7 +1258,7 @@ def main():
# Check if the action is init
# if so, call the init function and exit
if
args
.
action
==
"
init
"
:
initiali
z
e_environment
(
Path
(
os
.
getcwd
()))
initiali
s
e_environment
(
Path
(
os
.
getcwd
()))
sys
.
exit
(
0
)
# root_dir is the place where this MPSD software instance has its root
...
...
This diff is collapsed.
Click to expand it.
tests/test_mpsd_software.py
+
5
−
5
View file @
ed1fe951
...
...
@@ -520,10 +520,10 @@ def test_remove_environment(tmp_path):
# done in test_install_environment_zlib
def
test_initiali
z
e_environment
(
tmp_path
):
def
test_initiali
s
e_environment
(
tmp_path
):
"""
Test that init_file is created as expected.
"""
# test that the init file is created as expected
mod
.
initiali
z
e_environment
(
tmp_path
)
mod
.
initiali
s
e_environment
(
tmp_path
)
init_file
=
tmp_path
/
mod
.
config_vars
[
"
init_file
"
]
assert
init_file
.
exists
()
...
...
@@ -534,7 +534,7 @@ def test_initialize_environment(tmp_path):
# test that calling again results in warning and exit code 1
with
pytest
.
raises
(
SystemExit
)
as
pytest_wrapped_e
:
mod
.
initiali
z
e_environment
(
tmp_path
)
mod
.
initiali
s
e_environment
(
tmp_path
)
assert
pytest_wrapped_e
.
type
==
SystemExit
assert
pytest_wrapped_e
.
value
.
code
==
1
...
...
@@ -549,7 +549,7 @@ def test_get_root_dir(tmp_path):
assert
pytest_wrapped_e
.
value
.
code
==
1
# test that initialize_environment creates the root dir
mod
.
initiali
z
e_environment
(
tmp_path
)
mod
.
initiali
s
e_environment
(
tmp_path
)
root_dir
=
mod
.
get_root_dir
()
assert
root_dir
==
tmp_path
...
...
@@ -562,7 +562,7 @@ def test_get_root_dir(tmp_path):
# test that initialising in a subdirectory makes it the root dir
with
mod
.
os_chdir
(
sub_dir
):
mod
.
initiali
z
e_environment
(
sub_dir
)
mod
.
initiali
s
e_environment
(
sub_dir
)
root_dir
=
mod
.
get_root_dir
()
assert
root_dir
==
sub_dir
...
...
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