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

Add tests for history and Amend previous unit tests that are broken because of new changes #3

Open
willeppy opened this issue Apr 8, 2021 · 3 comments

Comments

@willeppy
Copy link
Member

willeppy commented Apr 8, 2021

Need to add tests for new functionality.

This requires two things

  1. Edit the existing tests for lux to make sure they are accurate (many will not run now because I have made changes but did not change the tests)
  2. Add new tests for the new functionality we have added.

Files / functionality that need NEW unit tests:

  • History logging in frame.py
    • Make sure all override functions log the correct history and nothing extra
  • History tracking in series.py (same as above)
  • History tracking in groupy.py (same as above)
  • History class in history.py
    • Lots of new functions here to make sure history is stored well
  • Clause mark type specification
    • In Clause.py I added a mark_type parameter to make sure that column ends up as a vis with a certain mark type but haven't written tests to make sure this is actually enforced. Mostly means adding tests to compiler to make sure the clause results in visualizations that are of this mark type
  • Rewritten compiler
    • I rewrote the compiler to be more streamlined and include functionality as mentioned above so lots of the tests are failing for the compiler
  • new plotters in implicit_plotter.py and cg_plotter.py.
    • These might be a little tough to write tests for since they can have a huge number of inputs but it would be good to have some unit tests that make sure that they aren't broken. For example making sure that when df.describe() is called it produces a box plot and the right history.

Other files had small changes that are breaking existing tests. These tests should be amended to make sure that they are testing for good functionality and also comply with the changes.

@willeppy willeppy changed the title Add tests lol Add tests Jul 6, 2021
@leijie-wang leijie-wang changed the title Add tests Add tests for history and Amend previous unit tests that are broken because of new changes Jul 16, 2021
@leijie-wang
Copy link

This issue is fixed in the branch unit-test-implement. Waiting to be examined and merged

@willeppy
Copy link
Member Author

willeppy commented Aug 3, 2021

This is almost complete, just need to fix a couple remaining things

================================================================================= short test summary info =================================================================================
FAILED tests/test_action.py::test_crosstab - pandas.core.indexing.IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object d...
FAILED tests/test_performance.py::test_lazy_maintain_performance_census - AssertionError: Subsequent display of recommendations on Census dataset took a total of {delta2:0.4f} seconds,...
================================================================= 2 failed, 261 passed, 449 warnings in 542.63s (0:09:02) =================================================================

@willeppy
Copy link
Member Author

willeppy commented Aug 3, 2021

I think we also need to stub out the jupyter execution context so that we can run these tests from the command line before closing this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants