Skip to content

Conversation

@ajabep
Copy link
Contributor

@ajabep ajabep commented Oct 3, 2022

The non-qualitative schemes should be extendable. This commit adds this feature.

Fixes #104 and #114. Also probably fix python-visualization/folium#1270.

Moreover, the following error was not reported via issues and are fixed:

  • TypeError in the linear_gradient function when trying to extend any scheme. Indeed, in color_brewer, the key searched in the scheme database was not found, thus, it was passing None instead of a real scheme vector to linear_gradient;
  • The scheme 'viridis' was not in the base_codes JSON;
  • Multiple scheme hadn't any metadata in scheme_info JSON;
  • When a n value provided to color_scheme was a float, it tried to select an unknown scheme without raising the right Exception type.
  • The unit tests was using the deprecated (and remove) method WebDriver.find_element_by_css_selector.

ajabep added 2 commits October 3, 2022 02:10
The non-qualitative schemes should be extendable. This commit adds this feature.

Fixes python-visualization#104
Fixes python-visualization#114

Moreover, the following error was not reported via issues and are fixed:
* TypeError in the linear_gradient function when trying to extend any scheme. Indeed, in color_brewer, the key searched in the scheme database was not found, thus, it was passing `None` instead of a real scheme vector to linear_gradient;
* The scheme 'viridis' was not in the base_codes JSON;
* Multiple scheme hadn't any metadata in scheme_info JSON;
* When a `n` value provided to `color_scheme` was a float, it tried to select an unknown scheme without raising the right Exception type.
Copy link
Member

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM but I've been away from folium+branca for so long that I'd rather wait for @Conengmo to take a second look before merging.

Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

Thanks so much for your PR. I'm happy you fixed these glaring issues with the color brewer and also the added tests!

I have one comment regarding the longest scheme name, could you take a look please?

@ajabep ajabep requested a review from Conengmo November 5, 2022 19:26
@Conengmo Conengmo merged commit 8da7fce into python-visualization:master Nov 7, 2022
@Conengmo
Copy link
Member

Conengmo commented Nov 7, 2022

Thanks again @ajabep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants