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
Merge requests
!70
Convert to a package
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Convert to a package
convert-to-a-package
into
main
Overview
19
Commits
20
Pipelines
19
Changes
1
Merged
Ashwin Kumar Karnad
requested to merge
convert-to-a-package
into
main
1 year ago
Overview
11
Commits
20
Pipelines
19
Changes
1
Expand
0
0
Merge request reports
Viewing commit
e06e9423
Prev
Next
Show latest version
1 file
+
20
−
16
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
e06e9423
fix script hash not found when calling script as installed package
· e06e9423
Ashwin Kumar Karnad
authored
1 year ago
src/mpsd_software_manager/mpsd_software.py
+
20
−
16
Options
@@ -599,24 +599,28 @@ def record_script_execution_summary(
@@ -599,24 +599,28 @@ def record_script_execution_summary(
cmd_line
=
"
"
.
join
(
sys
.
argv
)
cmd_line
=
"
"
.
join
(
sys
.
argv
)
# script branch and commit hash
# script branch and commit hash
with
os_chdir
(
root_dir
):
with
os_chdir
(
root_dir
):
script_branch
=
(
try
:
run
(
script_branch
=
(
[
"
git
"
,
"
rev-parse
"
,
"
--abbrev-ref
"
,
"
HEAD
"
],
run
(
stdout
=
subprocess
.
PIPE
,
[
"
git
"
,
"
rev-parse
"
,
"
--abbrev-ref
"
,
"
HEAD
"
],
check
=
True
,
stdout
=
subprocess
.
PIPE
,
check
=
True
,
)
.
stdout
.
decode
()
.
strip
()
)
)
.
stdout
.
decode
()
script_commit_hash
=
(
.
strip
()
run
(
)
[
"
git
"
,
"
rev-parse
"
,
"
--short
"
,
"
HEAD
"
],
script_commit_hash
=
(
stdout
=
subprocess
.
PIPE
,
run
(
check
=
True
,
[
"
git
"
,
"
rev-parse
"
,
"
--short
"
,
"
HEAD
"
],
)
stdout
=
subprocess
.
PIPE
,
.
stdout
.
decode
()
check
=
True
,
.
strip
()
)
)
.
stdout
.
decode
()
except
subprocess
.
CalledProcessError
:
.
strip
()
script_branch
=
"
unknown
"
)
script_commit_hash
=
"
unknown
"
# spack-environments branch and commit hash from kwargs
# spack-environments branch and commit hash from kwargs
spe_branch
=
kwargs
.
get
(
"
spe_branch
"
,
None
)
spe_branch
=
kwargs
.
get
(
"
spe_branch
"
,
None
)
spe_commit_hash
=
kwargs
.
get
(
"
spe_commit_hash
"
,
None
)
spe_commit_hash
=
kwargs
.
get
(
"
spe_commit_hash
"
,
None
)
Loading