FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
feast/sdk/python/feast/cli/validation_references.py at master · Gwill/feast · GitHub
Gwill
/
feast
Public
forked from
feast-dev/feast
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
cli
/
validation_references.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (46 loc) · 1.48 KB
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
cli
/
validation_references.py
Copy path
File metadata and controls
57 lines (46 loc) · 1.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import
click
import
yaml
from
feast
import
utils
from
feast
.
cli
.
cli_options
import
tagsOption
from
feast
.
errors
import
FeastObjectNotFoundException
from
feast
.
repo_operations
import
create_feature_store
@
click
.
group
(
name
=
"validation-references"
)
def
validation_references_cmd
():
"""
[Experimental] Access validation references
"""
pass
@
validation_references_cmd
.
command
(
"describe"
)
@
click
.
argument
(
"name"
,
type
=
click
.
STRING
)
@
click
.
pass_context
def
validation_references_describe
(
ctx
:
click
.
Context
,
name
:
str
):
"""
[Experimental] Describe a validation reference
"""
store
=
create_feature_store
(
ctx
)
try
:
validation_reference
=
store
.
get_validation_reference
(
name
)
except
FeastObjectNotFoundException
as
e
:
print
(
e
)
exit
(
1
)
print
(
yaml
.
dump
(
yaml
.
safe_load
(
str
(
validation_reference
)),
default_flow_style
=
False
,
sort_keys
=
False
,
)
)
@
validation_references_cmd
.
command
(
name
=
"list"
)
@
tagsOption
@
click
.
pass_context
def
validation_references_list
(
ctx
:
click
.
Context
,
tags
:
list
[
str
]):
"""
[Experimental] List all validation references
"""
store
=
create_feature_store
(
ctx
)
table
=
[]
tags_filter
=
utils
.
tags_list_to_dict
(
tags
)
for
validation_reference
in
store
.
list_validation_references
(
tags
=
tags_filter
):
table
.
append
([
validation_reference
.
name
])
from
tabulate
import
tabulate
print
(
tabulate
(
table
,
headers
=
[
"NAME"
],
tablefmt
=
"plain"
))
Back
|
FazBrowse Home
|
New Git URL