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 styles parameter to manual_legend #1094

Closed
wants to merge 4 commits into from
Closed

Add styles parameter to manual_legend #1094

wants to merge 4 commits into from

Conversation

tktran
Copy link
Contributor

@tktran tktran commented Aug 16, 2020

This PR is intended to fully implement issue #566. It includes unit tests for the new feature, and a bug fix for the existing manual_legend test (which failed to enable drawing the legend in the test image). It does not include updated documentation, which I would gladly begin working on upon approval of this PR. Also open to your suggested changes.

Questions for the @DistrictDataLabs/team-oz-maintainers:

  • I set the default color of a legend entry (when none is specified in the colors nor styles parameter) to black. Please advise if there is a better option.

Checklist:

  • Is the commit message formatted correctly?
  • Have you noted the new functionality/bugfix in the release notes of the next release?
  • Included a sample plot to visually illustrate your changes? (see baseline image)
  • Do all of your functions and methods have docstrings?
  • Have you added/updated unit tests where appropriate?
  • Have you updated the baseline images if necessary?
  • Have you run the unit tests using pytest?
  • Is your code style correct (are you using PEP8, pyflakes)?
  • Have you documented your new feature/functionality in the docs?

Added styles parameter to manual_legend per issue #566. With tests and bug fix for existing manual_legend test.
@rebeccabilbro rebeccabilbro self-assigned this Aug 24, 2020
Sets up tests/test_gridsearch with basic tests based on sample .ipynb. Only one change to gridsearch code (quick method return changed from None to visualizer).
Copy link
Member

@rebeccabilbro rebeccabilbro left a comment

Choose a reason for hiding this comment

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

Hello again @tktran — first off, my sincere apologies for the slow response, it's been a busy few months!

Secondly, thank you so much for your contribution! I took a preliminary look at your PR and the test failures on Travis, and it looks like they're caused by a few unused imports.

Are you still interested in working on this PR? I noticed that the branch that you were working in appears to have been deleted, but if you can recover it and make these small updates, we can proceed with reviewing your PR!

X, y = load_occupancy(return_dataset=True).to_pandas()
X, y = X.head(1000), y.head(1000)

gs = self.gridsearchcv
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is one of the places that is causing the Travis errors; would you mind removing this unused import?

X, y = load_occupancy(return_dataset=True).to_numpy()
X, y = X[:1000], y[:1000]

gs = self.gridsearchcv
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is another one of the places that is causing the Travis errors; would you mind removing this unused import as well?

import pytest

from tests.base import VisualTestCase
from tests.fixtures import Dataset, Split
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the Split import is not used in the file; would you mind removing it to resolve the unused imports errors on Travis?

@tktran
Copy link
Contributor Author

tktran commented Oct 11, 2020

Please see this PR redone at #1117. This PR that you are looking at is a little messy, since you are reviewing both code that I committed as part of issue #556 (as intended) and issue #308 (not intended, should have been isolated to its corresponding PR #1097). The new PR leaves the latter code out. Thanks for your patience.

@tktran
Copy link
Contributor Author

tktran commented Oct 11, 2020

@rebeccabilbro And thank you for taking the time to review my code. You may be seeing a few more contributions from me in the coming months, as I attempt to build up a history of contributions to Numfocus projects in preparation for applications to GSoC 2021. (But I do already know that yellowbrick won't be participating).

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

Successfully merging this pull request may close these issues.

2 participants