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

refactor: Refactor universal test data to have more well defined types #2340

Merged
merged 7 commits into from
Mar 1, 2022

Conversation

adchia
Copy link
Collaborator

@adchia adchia commented Feb 25, 2022

What this PR does / why we need it:
Before, the test data and test objects used for the universal test suite tended to be a Dict[str, Any] with hardcoded keys. This converts those into data classes which allows for much better IDE integrations.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2022

Codecov Report

Merging #2340 (55672e5) into master (fdb5f21) will increase coverage by 0.03%.
The diff coverage is 91.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2340      +/-   ##
==========================================
+ Coverage   86.51%   86.54%   +0.03%     
==========================================
  Files         116      117       +1     
  Lines        9698     9753      +55     
==========================================
+ Hits         8390     8441      +51     
- Misses       1308     1312       +4     
Flag Coverage Δ
integrationtests 75.54% <91.30%> (-0.11%) ⬇️
unittests 58.46% <60.20%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
...marks/test_benchmark_universal_online_retrieval.py 37.03% <40.00%> (+5.03%) ⬆️
sdk/python/feast/diff/registry_diff.py 70.24% <55.55%> (-1.79%) ⬇️
...tegration/offline_store/test_s3_custom_endpoint.py 29.62% <75.00%> (+5.62%) ⬆️
sdk/python/feast/__init__.py 90.90% <100.00%> (+0.43%) ⬆️
sdk/python/feast/feast_object.py 100.00% <100.00%> (ø)
sdk/python/feast/feature_store.py 91.90% <100.00%> (+0.01%) ⬆️
sdk/python/tests/conftest.py 91.83% <100.00%> (-0.25%) ⬇️
...dk/python/tests/integration/e2e/test_validation.py 100.00% <100.00%> (ø)
...ts/integration/feature_repos/repo_configuration.py 96.00% <100.00%> (+1.50%) ⬆️
...fline_store/test_universal_historical_retrieval.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdb5f21...55672e5. Read the comment docs.

@felixwang9817
Copy link
Collaborator

btw @adchia looks like unit tests are failing here with AttributeError: module 'functools' has no attribute 'cached_property'; do you want to rebase on master and force push?

@adchia
Copy link
Collaborator Author

adchia commented Mar 1, 2022

btw @adchia looks like unit tests are failing here with AttributeError: module 'functools' has no attribute 'cached_property'; do you want to rebase on master and force push?

done!

…tead of loosely typed dictionaries

Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Signed-off-by: Danny Chiao <danny@tecton.ai>
Copy link
Collaborator

@felixwang9817 felixwang9817 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 251eee4 into feast-dev:master Mar 1, 2022
@adchia adchia deleted the refactorUniversalTests branch March 4, 2022 16:23
adchia added a commit that referenced this pull request Mar 4, 2022
#2340)

* Refactor universal test suite to generate fixtures as dataclasses instead of loosely typed dictionaries

Signed-off-by: Danny Chiao <danny@tecton.ai>

* lint

Signed-off-by: Danny Chiao <danny@tecton.ai>

* lint

Signed-off-by: Danny Chiao <danny@tecton.ai>

* other lint

Signed-off-by: Danny Chiao <danny@tecton.ai>

* other lint

Signed-off-by: Danny Chiao <danny@tecton.ai>

* test fix

Signed-off-by: Danny Chiao <danny@tecton.ai>

* test fix

Signed-off-by: Danny Chiao <danny@tecton.ai>
@woop
Copy link
Member

woop commented Mar 5, 2022

🎉 This PR is included in version 0.19.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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