UpSetPlot icon indicating copy to clipboard operation
UpSetPlot copied to clipboard

Changes in functions for generation and an example of vertical plot with additional charts

Open ennanco opened this issue 3 years ago • 10 comments

I have slightly modified the functions generate_samples and generate_counts to get the data to develop a vertical Upsetplot with additional charts attached to it.

ennanco avatar Feb 24 '22 18:02 ennanco

And thank you for contributing!

jnothman avatar Feb 28 '22 00:02 jnothman

Thank you for the library you have done the heavy lifting in this point.

I am not used to writing automatic tests on python But I could sure try to do it.

Sorry for the long delay on the example but as you know it has been a long and hard time the last year.

On Mon, Feb 28, 2022 at 1:21 AM Joel Nothman @.***> wrote:

And thank you for contributing!

— Reply to this email directly, view it on GitHub https://github.com/jnothman/UpSetPlot/pull/182#issuecomment-1053737961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWRIKRPIOXE45HCPFU7PO3U5K52PANCNFSM5PIGFHXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ennanco avatar Feb 28 '22 08:02 ennanco

Already added the unitary tests for those two functions. You should review them but I think that you can close issue #52

ennanco avatar Feb 28 '22 19:02 ennanco

I have made some additional changes, but some examples failed due to their usage of the property name which, by the way, can cause like in this case problems when we change from a single column view to a multi-column result

ennanco avatar Mar 02 '22 13:03 ennanco

With luck, I'll have time to look at this next week, @ennanco

jnothman avatar Mar 02 '22 23:03 jnothman

The failures currently in CI pertain to our continued support for very old version of Python (time to drop them, I think), and PEP8 violations in your contribution. Here are those PEP8 issues:

./upsetplot/data.py:40:31: E228 missing whitespace around modulo operator
./upsetplot/data.py:40:40: E225 missing whitespace around operator
./upsetplot/data.py:40:80: E501 line too long (82 > 79 characters)
./upsetplot/data.py:45:19: E228 missing whitespace around modulo operator
./upsetplot/data.py:45:28: E231 missing whitespace after ','
./upsetplot/data.py:49:26: E228 missing whitespace around modulo operator
./upsetplot/tests/test_data.py:210:1: E302 expected 2 blank lines, found 1
./upsetplot/tests/test_data.py:228:8: E111 indentation is not a multiple of 4
./upsetplot/tests/test_data.py:232:8: E111 indentation is not a multiple of 4
./upsetplot/tests/test_data.py:233:8: E111 indentation is not a multiple of 4
./upsetplot/tests/test_data.py:233:34: E231 missing whitespace after ','
./upsetplot/tests/test_data.py:234:8: E111 indentation is not a multiple of 4
./upsetplot/tests/test_data.py:237:48: E231 missing whitespace after ','
./upsetplot/tests/test_data.py:238:47: E231 missing whitespace after ','
./upsetplot/tests/test_data.py:239:53: E231 missing whitespace after ','
./upsetplot/tests/test_data.py:239:80: E501 line too long (80 > 79 characters)
./upsetplot/tests/test_data.py:243:80: E501 line too long (84 > 79 characters)
./upsetplot/tests/test_data.py:255:55: E226 missing whitespace around arithmetic operator
./upsetplot/tests/test_data.py:258:47: E231 missing whitespace after ','
./upsetplot/tests/test_data.py:259:29: E211 whitespace before '('
./upsetplot/tests/test_data.py:261:80: E501 line too long (86 > 79 characters)
./upsetplot/tests/test_data.py:267:1: W391 blank line at end of file
./examples/plot_vertical.py:31:80: E501 line too long (82 > 79 characters)
./examples/plot_vertical.py:33:80: E501 line too long (106 > 79 characters)
./examples/plot_vertical.py:39:1: W391 blank line at end of file

I could just adopt black to make resolving these simpler...

jnothman avatar Mar 19 '22 12:03 jnothman

Thanks for your efforts here! Can we make a point of keeping the existing behaviour of generate_counts stable and backwards compatible? That is, unless extra columns are requested, the user should not have to go .value. Should we call the new generation parameter extra_columns?

jnothman avatar Mar 19 '22 12:03 jnothman

Hi Joel,

I think that the proposed name would be suitable in order to keep it as retrocompatible as possible.

Sincerely,


Quique

On Sat, Mar 19, 2022 at 1:46 PM Joel Nothman @.***> wrote:

Thanks for your efforts here! Can we make a point of keeping the existing behaviour of generate_counts stable and backwards compatible? That is, unless extra columns are requested, the user should not have to go .value. Should we call the new generation parameter extra_columns?

— Reply to this email directly, view it on GitHub https://github.com/jnothman/UpSetPlot/pull/182#issuecomment-1073003811, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWRIKUTHVVX3EROVNQUYGTVAXEDRANCNFSM5PIGFHXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

ennanco avatar Mar 19 '22 16:03 ennanco

I have finally make the proposed changes with the extra_columns parameter instead of len_sample in generate_counts

ennanco avatar Mar 19 '22 19:03 ennanco

Yes, I thought about it, however, I don't want to change it without your indication. Sorry about the docstring, I have already updated it.

ennanco avatar Mar 22 '22 08:03 ennanco