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

update: feature engineering unit tests #1086

Open
wants to merge 3 commits into
base: robynpy_release
Choose a base branch
from

Conversation

alxlyj
Copy link

@alxlyj alxlyj commented Oct 24, 2024

Project Robyn

Summary

  • Update feature eng unit test.

Test Plan

image

image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2024
@alxlyj alxlyj changed the base branch from main to robynpy_release October 24, 2024 03:12
@alxlyj alxlyj marked this pull request as ready for review October 24, 2024 03:13

Choose a reason for hiding this comment

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

  1. Code coverage is at 70% compared to 74% from earlier tests.
  2. Can you remove the src folder from the path?


def setUp(self):
# Create main mocks
self.mmm_data = MagicMock(spec=MMMData)

Choose a reason for hiding this comment

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

I preferred using simulated data than letting unit test mock create high level mock data.


# Assertions
self.assertIsInstance(result, FeaturizedMMMData)
self.assertTrue(hasattr(result, "dt_mod"))

Choose a reason for hiding this comment

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

Just having the attributes is good enough test?

Choose a reason for hiding this comment

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

can you change spec folder name to docs? Also, remove src folder from the path

@alxlyj alxlyj requested a review from sumane81 October 24, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants