Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
jvoisin
mat2
Commits
5896387a
Commit
5896387a
authored
6 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Output metadata in a sorted fashion
parent
d4c050a7
No related branches found
Branches containing commit
Tags
0.5.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mat2
+3
-2
3 additions, 2 deletions
mat2
with
3 additions
and
2 deletions
mat2
+
3
−
2
View file @
5896387a
...
...
@@ -77,9 +77,10 @@ def __print_meta(filename: str, metadata: dict, depth: int=1):
print
(
"
[%s] Metadata for %s:
"
%
(
'
+
'
*
depth
,
filename
))
for
k
,
v
in
metadata
.
items
():
for
(
k
,
v
)
in
sorted
(
metadata
.
items
()
)
:
if
isinstance
(
v
,
dict
):
return
__print_meta
(
k
,
v
,
depth
+
1
)
__print_meta
(
k
,
v
,
depth
+
1
)
continue
try
:
# FIXME this is ugly.
print
(
padding
+
"
%s: %s
"
%
(
k
,
v
))
except
UnicodeEncodeError
:
...
...
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