Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.cmdline
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
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.cmdline
Commits
7d26dd8a
There was a problem fetching the pipeline summary.
Commit
7d26dd8a
authored
6 years ago
by
Flavio TARSETTI
Browse files
Options
Downloads
Patches
Plain Diff
[common] patch local list for plotterparameter
parent
62596fc4
No related branches found
No related tags found
2 merge requests
!54
1.4.x
,
!30
Fix local list for plotterparameters
Pipeline
#
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/cmdline/common.py
+17
-3
17 additions, 3 deletions
beat/cmdline/common.py
with
17 additions
and
3 deletions
beat/cmdline/common.py
+
17
−
3
View file @
7d26dd8a
...
...
@@ -50,6 +50,7 @@ from beat.core import algorithm
from
beat.core
import
toolchain
from
beat.core
import
experiment
from
beat.backend.python
import
utils
TYPE_GLOB
=
{
'
dataformat
'
:
os
.
path
.
join
(
'
*
'
,
'
*
'
,
'
*.json
'
),
...
...
@@ -393,6 +394,13 @@ def make_up_local_list(prefix, type, requirements):
'''
root
=
os
.
path
.
join
(
prefix
,
TYPE_PLURAL
[
type
])
if
type
in
NOSTORAGE
:
try
:
root
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
])
except
:
logger
.
error
(
"
Selected type is not valid: %s
"
%
type
)
return
1
l
=
glob
.
glob
(
os
.
path
.
join
(
root
,
TYPE_GLOB
[
type
]))
candidates
=
[
os
.
path
.
splitext
(
os
.
path
.
relpath
(
o
,
root
))[
0
]
for
o
in
l
]
...
...
@@ -449,8 +457,15 @@ def display_local_list(prefix, type):
for
name
in
names
:
logger
.
info
(
"
%s
"
,
name
)
try
:
storage
=
TYPE_STORAGE
[
type
](
prefix
,
name
)
contents
=
simplejson
.
loads
(
storage
.
json
.
load
(),
object_pairs_hook
=
collections
.
OrderedDict
)
contents
=
None
if
type
in
NOSTORAGE
:
name_path
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
],
name
)
data_json
=
utils
.
File
(
name_path
+
'
.json
'
)
with
open
(
data_json
.
path
,
'
rt
'
)
as
f
:
contents
=
simplejson
.
load
(
f
,
object_pairs_hook
=
collections
.
OrderedDict
)
else
:
storage
=
TYPE_STORAGE
[
type
](
prefix
,
name
)
contents
=
simplejson
.
loads
(
storage
.
json
.
load
(),
object_pairs_hook
=
collections
.
OrderedDict
)
if
'
description
'
in
contents
:
logger
.
extra
(
2
*
'
'
+
contents
[
'
description
'
])
except
simplejson
.
JSONDecodeError
:
...
...
@@ -778,7 +793,6 @@ def pull(webapi, prefix, type, names, fields, force, indentation):
status
+=
1
#error
continue
from
beat.backend.python
import
utils
if
'
data
'
in
fields
:
name_path
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
],
name
)
data_json
=
utils
.
File
(
name_path
+
'
.json
'
)
...
...
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