Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Codebase structure #3050

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

felixwang9817
Copy link
Collaborator

Signed-off-by: Felix Wang wangfelix98@gmail.com

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

@felixwang9817 felixwang9817 force-pushed the codebase_structure_docs branch 2 times, most recently from 082778d to 31b1d47 Compare August 9, 2022 21:47
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #3050 (34f91cc) into master (0ed1a63) will increase coverage by 8.27%.
The diff coverage is n/a.

❗ Current head 34f91cc differs from pull request most recent head c2ab2a6. Consider uploading reports for the commit c2ab2a6 to get more accurate results

@@            Coverage Diff             @@
##           master    #3050      +/-   ##
==========================================
+ Coverage   67.44%   75.72%   +8.27%     
==========================================
  Files         169      203      +34     
  Lines       14936    16856    +1920     
==========================================
+ Hits        10074    12764    +2690     
+ Misses       4862     4092     -770     
Flag Coverage Δ
integrationtests 67.24% <ø> (-0.20%) ⬇️
unittests 58.05% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...offline_stores/contrib/spark_repo_configuration.py 100.00% <0.00%> (ø)
.../contrib/athena_offline_store/tests/data_source.py 48.83% <0.00%> (ø)
...s/contrib/postgres_offline_store/tests/__init__.py 100.00% <0.00%> (ø)
.../online_stores/contrib/hbase_online_store/hbase.py 37.25% <0.00%> (ø)
.../contrib/postgres_offline_store/postgres_source.py 50.66% <0.00%> (ø)
...ontrib/postgres_offline_store/tests/data_source.py 51.02% <0.00%> (ø)
...s/contrib/trino_offline_store/connectors/upload.py 8.97% <0.00%> (ø)
sdk/python/feast/transformation_server.py 40.47% <0.00%> (ø)
...line_stores/contrib/athena_offline_store/athena.py 38.12% <0.00%> (ø)
...line_stores/contrib/postgres_repo_configuration.py 100.00% <0.00%> (ø)
... and 98 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@felixwang9817 felixwang9817 force-pushed the codebase_structure_docs branch from 31b1d47 to 2ffebcb Compare August 9, 2022 22:30
The majority of Feast logic lives in these Python files:
* The core Feast objects ([entities](../getting-started/concepts/entity.md), [feature views](../getting-started/concepts/feature-view.md), [data sources](../getting-started/concepts/dataset.md), etc.) are defined in their respective Python files, such as `entity.py`, `feature_view.py`, and `data_source.py`.
* The feature store object is defined in `feature_store.py` and the associated configuration objects are defined in `repo_config.py`.
* The registry is defined in `registry.py`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, the regsitry interface (BaseRegistry) and the file based implementation (Regsitry) lives here. The SQL regisry is in infra/regsitry_stores (which is probably not the best name or place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

* The Python feature server is defined in `feature_server.py`.

There are also several important submodules:
* `infra/` contains all the infrastructure components, such as offline and online stores.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And materialization engines

There are also several important submodules:
* `infra/` contains all the infrastructure components, such as offline and online stores.
* `dqm/` covers data quality monitoring.
* `diff/` covers the logic for creating plans.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a plan?

* `ui/` contains the embedded Web UI, to be launched on the `feast ui` command.

Of these submodules, `infra/` is the most important.
It contains the interfaces for the [provider](getting-started/architecture-and-components/provider.md), [offline store](getting-started/architecture-and-components/offline-store.md), [online store](getting-started/architecture-and-components/online-store.md), and [batch materialization engine](getting-started/architecture-and-components/batch-materialization-engine.md), as well as all of their individual implementations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also registry stores.

$ cd sdk/python/feast
$ tree -L 1
.
├── __init__.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one might be a bit excessive :P

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sad I tried

There are also several important submodules:
* `infra/` contains all the infrastructure components, such as offline and online stores.
* `dqm/` covers data quality monitoring.
* `diff/` covers the logic for creating plans.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plans is ambiguous. explain that?

* The registry is defined in `registry.py`.
* The CLI and other core feature store logic are defined in `cli.py` and `repo_operations.py`.
* The type system that is used to manage conversion between Feast types and external typing systems is managed in `type_map.py`.
* The Python feature server is defined in `feature_server.py`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe call out that this is what is launched with feast serve?

docs/reference/codebase-structure.md Show resolved Hide resolved
docs/reference/codebase-structure.md Show resolved Hide resolved
It contains the interfaces for the [provider](getting-started/architecture-and-components/provider.md), [offline store](getting-started/architecture-and-components/offline-store.md), [online store](getting-started/architecture-and-components/online-store.md), and [batch materialization engine](getting-started/architecture-and-components/batch-materialization-engine.md), as well as all of their individual implementations.

```
$ tree -L 1 infra
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead: tree --dirsfirst -L 1 -C infra so directories show up first?

docs/reference/codebase-structure.md Show resolved Hide resolved
docs/reference/codebase-structure.md Show resolved Hide resolved

The majority of Feast logic lives in these Python files:
* The core Feast objects ([entities](../getting-started/concepts/entity.md), [feature views](../getting-started/concepts/feature-view.md), [data sources](../getting-started/concepts/dataset.md), etc.) are defined in their respective Python files, such as `entity.py`, `feature_view.py`, and `data_source.py`.
* The feature store object is defined in `feature_store.py` and the associated configuration objects are defined in `repo_config.py`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map this to what users know about? aka this is what feature_store.yaml configuration maps to in memory

docs/reference/codebase-structure.md Show resolved Hide resolved
@felixwang9817 felixwang9817 force-pushed the codebase_structure_docs branch 3 times, most recently from 10b8f94 to 34f91cc Compare August 11, 2022 21:22
Copy link
Collaborator

@adchia adchia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
@felixwang9817 felixwang9817 force-pushed the codebase_structure_docs branch from 34f91cc to c2ab2a6 Compare August 12, 2022 20:08
@feast-ci-bot feast-ci-bot removed the lgtm label Aug 12, 2022
Copy link
Collaborator

@adchia adchia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adchia, felixwang9817

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [adchia,felixwang9817]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit 492a90d into feast-dev:master Aug 12, 2022
franciscojavierarceo pushed a commit to franciscojavierarceo/feast that referenced this pull request Aug 13, 2022
* Codebase structure docs

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Address code review

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
adchia pushed a commit that referenced this pull request Aug 15, 2022
* Codebase structure docs

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Address code review

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
adchia pushed a commit that referenced this pull request Aug 15, 2022
* Codebase structure docs

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

* Address code review

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants