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

chore: Add docstrings #3128

Merged
merged 5 commits into from
Aug 24, 2022
Merged

Conversation

felixwang9817
Copy link
Collaborator

@felixwang9817 felixwang9817 commented Aug 24, 2022

What this PR does / why we need it: These docstrings are necessary for RTD.

Which issue(s) this PR fixes:

Fixes #

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2022

Codecov Report

Merging #3128 (fb54c7c) into master (5da89f5) will decrease coverage by 8.82%.
The diff coverage is 95.23%.

@@            Coverage Diff             @@
##           master    #3128      +/-   ##
==========================================
- Coverage   67.08%   58.26%   -8.83%     
==========================================
  Files         175      209      +34     
  Lines       15889    17582    +1693     
==========================================
- Hits        10659    10244     -415     
- Misses       5230     7338    +2108     
Flag Coverage Δ
integrationtests ?
unittests 58.26% <95.23%> (?)

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

Impacted Files Coverage Δ
sdk/python/feast/base_feature_view.py 76.66% <ø> (-2.23%) ⬇️
...stores/contrib/trino_offline_store/trino_source.py 5.37% <ø> (ø)
sdk/python/feast/stream_feature_view.py 90.35% <ø> (+14.03%) ⬆️
sdk/python/feast/batch_feature_view.py 96.77% <95.00%> (+10.10%) ⬆️
sdk/python/tests/unit/test_feature_views.py 98.75% <100.00%> (+72.50%) ⬆️
...sts/integration/registration/test_universal_cli.py 20.20% <0.00%> (-79.80%) ⬇️
...ts/integration/offline_store/test_offline_write.py 26.08% <0.00%> (-73.92%) ⬇️
...fline_store/test_universal_historical_retrieval.py 28.75% <0.00%> (-71.25%) ⬇️
...ests/integration/e2e/test_python_feature_server.py 29.50% <0.00%> (-70.50%) ⬇️
...dk/python/tests/integration/e2e/test_validation.py 27.55% <0.00%> (-69.30%) ⬇️
... and 164 more

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

Creates a TrinoSource object.

Args:
name (optional): Name for the source. Defaults to the table if not specified.
Copy link
Member

Choose a reason for hiding this comment

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

What happens if a query is specified instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in that case, the name must be specified

Copy link
Member

Choose a reason for hiding this comment

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

Update the doc string to reflect that?

Comment on lines 107 to 112
table (optional): Trino table where the features are stored.
created_timestamp_column (optional): Timestamp column indicating when the
row was created, used for deduplicating rows.
field_mapping (optional): A dictionary mapping of column names in this data
source to column names in a feature table or view.
query (optional): The query to be executed to obtain the features.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should be explicit that one of table or query should be specified.

Copy link
Collaborator

@kevjumba kevjumba 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>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Copy link
Member

@achals achals 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: achals, felixwang9817, kevjumba

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 [achals,felixwang9817,kevjumba]

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 e610f62 into feast-dev:master Aug 24, 2022
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