Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Merge requests
!498
WS-645: Move images out of subdirectories
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
WS-645: Move images out of subdirectories
WS-673_fix_single_img_crash_issue
into
main
Overview
0
Commits
6
Pipelines
3
Changes
1
Merged
Charlotte Hausman
requested to merge
WS-673_fix_single_img_crash_issue
into
main
3 years ago
Overview
0
Commits
6
Pipelines
3
Changes
1
Expand
0
0
Merge request reports
Viewing commit
bda2af79
Prev
Next
Show latest version
1 file
+
1
−
25
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bda2af79
remove scaffold for single images
· bda2af79
Charlotte Hausman
authored
3 years ago
apps/cli/executables/pexable/carta_envoy/carta_envoy/carta.py
+
1
−
25
Options
@@ -68,28 +68,6 @@ def ensure_non_relative_path(location: str) -> Path:
return
Path
(
location
)
def
scaffold
(
settings
:
dict
):
if
settings
[
"
single_image
"
]:
directory
=
settings
[
"
data_location
"
]
/
settings
[
"
image_name
"
]
logger
.
info
(
f
"
Current working directory:
{
os
.
getcwd
()
}
"
)
if
Path
(
directory
).
exists
()
and
Path
(
directory
/
settings
[
"
image_name
"
]).
is_file
():
logger
.
info
(
"
Image file already exists! Proceeding...
"
)
os
.
chdir
(
directory
)
logger
.
info
(
f
"
Working directory is now
{
os
.
getcwd
()
}
"
)
return
else
:
logger
.
info
(
"
Image file not found. Product Fetch may still be in progress. Scaffolding structure for carta...
"
)
os
.
mkdir
(
settings
[
"
image_name
"
])
os
.
chdir
(
directory
)
os
.
chmod
(
os
.
getcwd
(),
0o770
)
# logger.info(f"Working directory is now {os.getcwd()}")
Path
(
directory
/
settings
[
"
image_name
"
]).
touch
()
os
.
chmod
(
Path
(
directory
/
settings
[
"
image_name
"
]),
0o770
)
os
.
chdir
(
settings
[
"
data_location
"
])
def
ensure_correct_directory
(
settings
:
dict
):
directory
=
settings
[
"
data_location
"
]
logger
.
info
(
f
"
Current working directory:
{
os
.
getcwd
()
}
"
)
@@ -190,9 +168,7 @@ def main():
settings
[
"
image_name
"
]
=
args
.
image
[
0
]
if
args
.
single
:
settings
[
"
single_image
"
]
=
True
if
args
.
parallel
:
scaffold
(
settings
)
else
:
if
not
args
.
parallel
:
ensure_correct_directory
(
settings
)
carta
=
CartaLauncher
(
settings
)
Loading