Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tzis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
data-infrastructure-services
tzis
Commits
e7dbaa22
Commit
e7dbaa22
authored
2 years ago
by
Fabian Wachsmann
Browse files
Options
Downloads
Patches
Plain Diff
Debugged some infos
parent
983d76da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tzis/tzis.py
+24
-2
24 additions, 2 deletions
tzis/tzis.py
with
24 additions
and
2 deletions
tzis/tzis.py
+
24
−
2
View file @
e7dbaa22
...
@@ -114,6 +114,11 @@ class Tzis:
...
@@ -114,6 +114,11 @@ class Tzis:
# raise ValueError("Dataset '{0}' must either be a string or a list of strings")
# raise ValueError("Dataset '{0}' must either be a string or a list of strings")
if
mf
:
if
mf
:
if
self
.
verbose
:
print
(
"
Resetting disk size and compression ratio
"
)
self
.
_disk_size
=
None
self
.
_cratio
=
None
if
type
(
mf
)
==
str
:
if
type
(
mf
)
==
str
:
mf
=
[
mf
]
mf
=
[
mf
]
...
@@ -132,7 +137,9 @@ class Tzis:
...
@@ -132,7 +137,9 @@ class Tzis:
else
:
else
:
self
.
provenance
.
gen_input
(
"
input_file_name
"
,
mf
)
self
.
provenance
.
gen_input
(
"
input_file_name
"
,
mf
)
self
.
_disk_size
=
sum
([
os
.
path
.
getsize
(
mf_input
)
if
not
any
([
os
.
path
.
isfile
(
mf_input
)
==
False
for
mf_input
in
mf
])
:
self
.
_disk_size
=
sum
([
os
.
path
.
getsize
(
mf_input
)
for
mf_input
in
mf
]
for
mf_input
in
mf
]
)
)
...
@@ -378,7 +385,20 @@ class Tzis:
...
@@ -378,7 +385,20 @@ class Tzis:
if
not
a
==
c
or
l_differ
:
if
not
a
==
c
or
l_differ
:
if
self
.
verbose
:
if
self
.
verbose
:
notinc
=
[
key
for
key
in
a
.
keys
()
if
key
not
in
c
.
keys
()]
notina
=
[
key
for
key
in
c
.
keys
()
if
key
not
in
a
.
keys
()]
print
(
"
Attributes of cloud store and source dataset differ.
"
)
print
(
"
Attributes of cloud store and source dataset differ.
"
)
if
notina
:
print
(
f
"
Attribute not in source:
{
'
,
'
.
join
(
notinc
)
}
"
)
if
notinc
:
print
(
f
"
Attribute not in cloud:
{
'
,
'
.
join
(
notina
)
}
"
)
if
not
notina
and
not
notinc
:
for
key
in
list
(
set
(
a
.
keys
(),
c
.
keys
())):
if
a
[
key
]
!=
c
[
key
]:
print
(
f
"
Values of attribute
{
key
}
differ:
"
)
print
(
f
"
source:
{
c
[
key
]
}
cloud:
{
a
[
key
]
}
"
)
return
True
return
True
for
coord
in
already
.
coords
:
for
coord
in
already
.
coords
:
...
@@ -831,10 +851,12 @@ class Tzis:
...
@@ -831,10 +851,12 @@ class Tzis:
f
"
which is
{
self
.
varname
}
"
)
f
"
which is
{
self
.
varname
}
"
)
dset_to_write
=
self
.
mf_dset
[[
self
.
varname
]]
dset_to_write
=
self
.
mf_dset
[[
self
.
varname
]]
totalsize
=
dset_to_write
.
nbytes
/
1024
/
1024
/
1024
totalsize
=
dset_to_write
.
nbytes
if
self
.
_disk_size
and
not
self
.
_cratio
:
if
self
.
_disk_size
and
not
self
.
_cratio
:
self
.
_cratio
=
self
.
_disk_size
/
totalsize
self
.
_cratio
=
self
.
_disk_size
/
totalsize
if
self
.
verbose
:
print
(
f
"
Could determine compression ratio by disk size:
{
self
.
_cratio
}
"
)
if
"
chunks
"
in
dset_to_write
[
self
.
varname
].
encoding
.
keys
():
if
"
chunks
"
in
dset_to_write
[
self
.
varname
].
encoding
.
keys
():
del
dset_to_write
[
self
.
varname
].
encoding
[
"
chunks
"
]
del
dset_to_write
[
self
.
varname
].
encoding
[
"
chunks
"
]
...
...
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