Skip to content

Commit 2913c6d

Browse files
chore: Move registry files to infra/registry (#3068)
* Rename LocalRegistryStore to FileRegistryStore Signed-off-by: Felix Wang <[email protected]> * Move all registry and registry store files to `infra/registry/` Signed-off-by: Felix Wang <[email protected]> * Update RTD docs Signed-off-by: Felix Wang <[email protected]> * Move base registry into separate file Signed-off-by: Felix Wang <[email protected]> * Update RTD docs Signed-off-by: Felix Wang <[email protected]> * Fix broken import Signed-off-by: Felix Wang <[email protected]> * Update RTD doc structure Signed-off-by: Felix Wang <[email protected]> * Add skeleton `registry.py` file to not break imports Signed-off-by: Felix Wang <[email protected]> * Fix Signed-off-by: Felix Wang <[email protected]> * Change reloading to cover new FileRegistryStore Signed-off-by: Felix Wang <[email protected]> * Remove `registry.py` file Signed-off-by: Felix Wang <[email protected]> Signed-off-by: Felix Wang <[email protected]>
1 parent 081a91a commit 2913c6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1136
-1203
lines changed

docs/how-to-guides/customizing-feast/creating-a-custom-provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ from feast.infra.local import LocalProvider
3737
from feast.infra.offline_stores.offline_store import RetrievalJob
3838
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto
3939
from feast.protos.feast.types.Value_pb2 import Value as ValueProto
40-
from feast.registry import Registry
40+
from feast.infra.registry.registry import Registry
4141
from feast.repo_config import RepoConfig
4242

4343

go/internal/feast/registry/local.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import (
1212
"github.com/feast-dev/feast/go/protos/feast/core"
1313
)
1414

15-
// A LocalRegistryStore is a file-based implementation of the RegistryStore interface.
16-
type LocalRegistryStore struct {
15+
// A FileRegistryStore is a file-based implementation of the RegistryStore interface.
16+
type FileRegistryStore struct {
1717
filePath string
1818
}
1919

20-
// NewLocalRegistryStore creates a LocalRegistryStore with the given configuration and infers
20+
// NewFileRegistryStore creates a FileRegistryStore with the given configuration and infers
2121
// the file path from the repo path and registry path.
22-
func NewLocalRegistryStore(config *RegistryConfig, repoPath string) *LocalRegistryStore {
23-
lr := LocalRegistryStore{}
22+
func NewFileRegistryStore(config *RegistryConfig, repoPath string) *FileRegistryStore {
23+
lr := FileRegistryStore{}
2424
registryPath := config.Path
2525
if filepath.IsAbs(registryPath) {
2626
lr.filePath = registryPath
@@ -31,7 +31,7 @@ func NewLocalRegistryStore(config *RegistryConfig, repoPath string) *LocalRegist
3131
}
3232

3333
// GetRegistryProto reads and parses the registry proto from the file path.
34-
func (r *LocalRegistryStore) GetRegistryProto() (*core.Registry, error) {
34+
func (r *FileRegistryStore) GetRegistryProto() (*core.Registry, error) {
3535
registry := &core.Registry{}
3636
in, err := ioutil.ReadFile(r.filePath)
3737
if err != nil {
@@ -43,15 +43,15 @@ func (r *LocalRegistryStore) GetRegistryProto() (*core.Registry, error) {
4343
return registry, nil
4444
}
4545

46-
func (r *LocalRegistryStore) UpdateRegistryProto(rp *core.Registry) error {
46+
func (r *FileRegistryStore) UpdateRegistryProto(rp *core.Registry) error {
4747
return r.writeRegistry(rp)
4848
}
4949

50-
func (r *LocalRegistryStore) Teardown() error {
50+
func (r *FileRegistryStore) Teardown() error {
5151
return os.Remove(r.filePath)
5252
}
5353

54-
func (r *LocalRegistryStore) writeRegistry(rp *core.Registry) error {
54+
func (r *FileRegistryStore) writeRegistry(rp *core.Registry) error {
5555
rp.VersionId = uuid.New().String()
5656
rp.LastUpdated = timestamppb.Now()
5757
bytes, err := proto.Marshal(rp)

go/internal/feast/registry/registry.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ var REGISTRY_SCHEMA_VERSION string = "1"
1616
var REGISTRY_STORE_CLASS_FOR_SCHEME map[string]string = map[string]string{
1717
"gs": "GCSRegistryStore",
1818
"s3": "S3RegistryStore",
19-
"file": "LocalRegistryStore",
20-
"": "LocalRegistryStore",
19+
"file": "FileRegistryStore",
20+
"": "FileRegistryStore",
2121
}
2222

2323
/*
@@ -335,8 +335,8 @@ func getRegistryStoreFromScheme(registryPath string, registryConfig *RegistryCon
335335

336336
func getRegistryStoreFromType(registryStoreType string, registryConfig *RegistryConfig, repoPath string) (RegistryStore, error) {
337337
switch registryStoreType {
338-
case "LocalRegistryStore":
339-
return NewLocalRegistryStore(registryConfig, repoPath), nil
338+
case "FileRegistryStore":
339+
return NewFileRegistryStore(registryConfig, repoPath), nil
340340
}
341-
return nil, errors.New("only LocalRegistryStore as a RegistryStore is supported at this moment")
341+
return nil, errors.New("only FileRegistryStore as a RegistryStore is supported at this moment")
342342
}

sdk/python/docs/index.rst

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ Entity
9696
Feature View
9797
==================
9898

99+
.. automodule:: feast.base_feature_view
100+
:members:
101+
102+
Feature View
103+
----------------------
104+
99105
.. automodule:: feast.feature_view
100106
:members:
101107

@@ -128,32 +134,59 @@ Feature Service
128134
Registry
129135
==================
130136

131-
.. automodule:: feast.registry
137+
.. automodule:: feast.infra.registry.base_registry
138+
:inherited-members:
139+
:members:
140+
141+
Registry
142+
----------------------
143+
144+
.. automodule:: feast.infra.registry.registry
145+
:inherited-members:
146+
:members:
147+
148+
SQL Registry
149+
----------------------
150+
151+
.. automodule:: feast.infra.registry.sql
132152
:inherited-members:
133153
:members:
134154

135155
Registry Store
136156
==================
137157

138-
.. automodule:: feast.registry_store
158+
.. automodule:: feast.infra.registry.registry_store
139159
:inherited-members:
140160
:members:
141161
:exclude-members: NoopRegistryStore
142162

143-
SQL Registry Store
163+
File Registry Store
144164
-----------------------
145165

146-
.. automodule:: feast.infra.registry_stores.sql
166+
.. automodule:: feast.infra.registry.file
147167
:members:
148168
:noindex:
149169

150-
PostgreSQL Registry Store
170+
GCS Registry Store
151171
-----------------------
152172

153-
.. automodule:: feast.infra.registry_stores.contrib.postgres.registry_store
173+
.. automodule:: feast.infra.registry.gcs
154174
:members:
155175
:noindex:
156176

177+
S3 Registry Store
178+
-----------------------
179+
180+
.. automodule:: feast.infra.registry.s3
181+
:members:
182+
:noindex:
183+
184+
PostgreSQL Registry Store
185+
-----------------------
186+
187+
.. automodule:: feast.infra.registry.contrib.postgres.postgres_registry_store
188+
:members:
189+
:noindex:
157190

158191
Provider
159192
==================
@@ -173,21 +206,18 @@ Local Provider
173206

174207
.. automodule:: feast.infra.local
175208
:members:
176-
:exclude-members: LocalRegistryStore
177209

178210
GCP Provider
179211
------------------
180212

181213
.. automodule:: feast.infra.gcp
182214
:members:
183-
:exclude-members: GCSRegistryStore
184215

185216
AWS Provider
186217
------------------
187218

188219
.. automodule:: feast.infra.aws
189220
:members:
190-
:exclude-members: S3RegistryStore
191221

192222
Offline Store
193223
==================
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
feast.infra.offline\_stores.contrib.athena\_offline\_store package
2+
==================================================================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
feast.infra.offline_stores.contrib.athena_offline_store.tests
11+
12+
Submodules
13+
----------
14+
15+
feast.infra.offline\_stores.contrib.athena\_offline\_store.athena module
16+
------------------------------------------------------------------------
17+
18+
.. automodule:: feast.infra.offline_stores.contrib.athena_offline_store.athena
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
feast.infra.offline\_stores.contrib.athena\_offline\_store.athena\_source module
24+
--------------------------------------------------------------------------------
25+
26+
.. automodule:: feast.infra.offline_stores.contrib.athena_offline_store.athena_source
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
Module contents
32+
---------------
33+
34+
.. automodule:: feast.infra.offline_stores.contrib.athena_offline_store
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
feast.infra.offline\_stores.contrib.athena\_offline\_store.tests package
2+
========================================================================
3+
4+
Submodules
5+
----------
6+
7+
feast.infra.offline\_stores.contrib.athena\_offline\_store.tests.data\_source module
8+
------------------------------------------------------------------------------------
9+
10+
.. automodule:: feast.infra.offline_stores.contrib.athena_offline_store.tests.data_source
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
Module contents
16+
---------------
17+
18+
.. automodule:: feast.infra.offline_stores.contrib.athena_offline_store.tests
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:

sdk/python/docs/source/feast.infra.offline_stores.contrib.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ Subpackages
77
.. toctree::
88
:maxdepth: 4
99

10+
feast.infra.offline_stores.contrib.athena_offline_store
1011
feast.infra.offline_stores.contrib.postgres_offline_store
1112
feast.infra.offline_stores.contrib.spark_offline_store
1213
feast.infra.offline_stores.contrib.trino_offline_store
1314

1415
Submodules
1516
----------
1617

18+
feast.infra.offline\_stores.contrib.athena\_repo\_configuration module
19+
----------------------------------------------------------------------
20+
21+
.. automodule:: feast.infra.offline_stores.contrib.athena_repo_configuration
22+
:members:
23+
:undoc-members:
24+
:show-inheritance:
25+
1726
feast.infra.offline\_stores.contrib.postgres\_repo\_configuration module
1827
------------------------------------------------------------------------
1928

sdk/python/docs/source/feast.infra.online_stores.contrib.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ feast.infra.online\_stores.contrib.postgres module
3737
:undoc-members:
3838
:show-inheritance:
3939

40+
feast.infra.online\_stores.contrib.postgres\_repo\_configuration module
41+
-----------------------------------------------------------------------
42+
43+
.. automodule:: feast.infra.online_stores.contrib.postgres_repo_configuration
44+
:members:
45+
:undoc-members:
46+
:show-inheritance:
47+
4048
Module contents
4149
---------------
4250

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
feast.infra.registry package
2+
============================
3+
4+
Submodules
5+
----------
6+
7+
feast.infra.registry.base\_registry module
8+
------------------------------------------
9+
10+
.. automodule:: feast.infra.registry.base_registry
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
feast.infra.registry.file module
16+
--------------------------------
17+
18+
.. automodule:: feast.infra.registry.file
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
feast.infra.registry.gcs module
24+
-------------------------------
25+
26+
.. automodule:: feast.infra.registry.gcs
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
feast.infra.registry.registry module
32+
------------------------------------
33+
34+
.. automodule:: feast.infra.registry.registry
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
feast.infra.registry.registry\_store module
40+
-------------------------------------------
41+
42+
.. automodule:: feast.infra.registry.registry_store
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
feast.infra.registry.s3 module
48+
------------------------------
49+
50+
.. automodule:: feast.infra.registry.s3
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
feast.infra.registry.sql module
56+
-------------------------------
57+
58+
.. automodule:: feast.infra.registry.sql
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
Module contents
64+
---------------
65+
66+
.. automodule:: feast.infra.registry
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:

sdk/python/docs/source/feast.infra.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Subpackages
1010
feast.infra.materialization
1111
feast.infra.offline_stores
1212
feast.infra.online_stores
13-
feast.infra.registry_stores
13+
feast.infra.registry
1414
feast.infra.utils
1515

1616
Submodules

0 commit comments

Comments
 (0)