Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Merge requests
!13
fix bug make tests running
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
fix bug make tests running
lukas_issue025_bug_make-tests-running
into
lukas_issue013_feat_load-data
Overview
0
Commits
8
Pipelines
1
Changes
4
Merged
Ghost User
requested to merge
lukas_issue025_bug_make-tests-running
into
lukas_issue013_feat_load-data
5 years ago
Overview
0
Commits
8
Pipelines
1
Changes
4
0
0
Merge request reports
Compare
lukas_issue013_feat_load-data
lukas_issue013_feat_load-data (base)
and
latest version
latest version
ae85c9ec
8 commits,
5 years ago
4 files
+
37
−
22
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
src/helpers.py
+
13
−
5
View file @ ae85c9ec
Edit in single-file editor
Open in Web IDE
Show full file
@@ -135,7 +135,10 @@ class TimeTracking(object):
def
prepare_host
(
create_new
=
True
):
hostname
=
socket
.
gethostname
()
user
=
os
.
getlogin
()
try
:
user
=
os
.
getlogin
()
except
OSError
:
user
=
"
default
"
if
hostname
==
'
ZAM144
'
:
path
=
f
'
/home/
{
user
}
/Data/toar_daily/
'
elif
hostname
==
'
zam347
'
:
@@ -146,14 +149,19 @@ def prepare_host(create_new=True):
path
=
f
'
/p/project/cjjsc42/
{
user
}
/DATA/toar_daily/
'
elif
(
len
(
hostname
)
>
2
)
and
(
hostname
[:
2
]
==
'
jw
'
):
path
=
f
'
/p/home/jusers/
{
user
}
/juwels/intelliaq/DATA/toar_daily/
'
elif
"
runner-6HmDp9Qd-project-2411-concurrent
"
in
hostname
:
path
=
f
'
/home/
{
user
}
/machinelearningtools/data/toar_daily/
'
else
:
logging
.
error
(
f
"
unknown host
'
{
hostname
}
'"
)
raise
OSError
(
f
"
unknown host
'
{
hostname
}
'"
)
if
not
os
.
path
.
exists
(
path
):
if
create_new
:
check_path_and_create
(
path
)
return
path
else
:
try
:
if
create_new
:
check_path_and_create
(
path
)
return
path
else
:
raise
PermissionError
except
PermissionError
:
logging
.
error
(
f
"
path
'
{
path
}
'
does not exist for host
'
{
hostname
}
'
.
"
)
raise
NotADirectoryError
(
f
"
path
'
{
path
}
'
does not exist for host
'
{
hostname
}
'
.
"
)
else
:
Loading