-
Notifications
You must be signed in to change notification settings - Fork 358
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
BUG: Allow default config option to be None #738
BUG: Allow default config option to be None #738
Conversation
Softagram Impact Report for pull/738 (head commit: 5879370)⭐ Change Overview
📄 Full report
Impact Report explained. Give feedback on this report to [email protected] |
Codecov Report
@@ Coverage Diff @@
## master #738 +/- ##
==========================================
+ Coverage 94.4% 94.41% +<.01%
==========================================
Files 32 32
Lines 5580 5584 +4
==========================================
+ Hits 5268 5272 +4
Misses 312 312
Continue to review full report at Codecov.
|
Let's track it here #739 |
…739) This PR takes over #738, and this fix was inspired by the PR. So the commit credits to, and is authored by @charlesdong1991. This PR adds `Option` class to allow various cases such as type checking, value checking, etc. See the usage below as a example ```python Option( key='compute.default_index_type', doc=( "This sets the default index type: sequence, distributed and distributed-sequence."), default='sequence', types=str, check_func=( lambda v: v in ('sequence', 'distributed', 'distributed-sequence'), "Index type should be one of 'sequence', 'distributed', 'distributed-sequence'.")) ``` While I am here, I also fixed `plotting.sample_ratio` respects `plotting.max_rows` by default if this is not set. Also, let `DataFrame.transform` respect `compute.max_rows` as well with minor cleanups.
…739) This PR takes over #738, and this fix was inspired by the PR. So the commit credits to, and is authored by @charlesdong1991. This PR adds `Option` class to allow various cases such as type checking, value checking, etc. See the usage below as a example ```python Option( key='compute.default_index_type', doc=( "This sets the default index type: sequence, distributed and distributed-sequence."), default='sequence', types=str, check_func=( lambda v: v in ('sequence', 'distributed', 'distributed-sequence'), "Index type should be one of 'sequence', 'distributed', 'distributed-sequence'.")) ``` While I am here, I also fixed `plotting.sample_ratio` respects `plotting.max_rows` by default if this is not set. Also, let `DataFrame.transform` respect `compute.max_rows` as well with minor cleanups.
…#739) This PR takes over databricks/koalas#738, and this fix was inspired by the PR. So the commit credits to, and is authored by @charlesdong1991. This PR adds `Option` class to allow various cases such as type checking, value checking, etc. See the usage below as a example ```python Option( key='compute.default_index_type', doc=( "This sets the default index type: sequence, distributed and distributed-sequence."), default='sequence', types=str, check_func=( lambda v: v in ('sequence', 'distributed', 'distributed-sequence'), "Index type should be one of 'sequence', 'distributed', 'distributed-sequence'.")) ``` While I am here, I also fixed `plotting.sample_ratio` respects `plotting.max_rows` by default if this is not set. Also, let `DataFrame.transform` respect `compute.max_rows` as well with minor cleanups.
…#739) This PR takes over databricks/koalas#738, and this fix was inspired by the PR. So the commit credits to, and is authored by @charlesdong1991. This PR adds `Option` class to allow various cases such as type checking, value checking, etc. See the usage below as a example ```python Option( key='compute.default_index_type', doc=( "This sets the default index type: sequence, distributed and distributed-sequence."), default='sequence', types=str, check_func=( lambda v: v in ('sequence', 'distributed', 'distributed-sequence'), "Index type should be one of 'sequence', 'distributed', 'distributed-sequence'.")) ``` While I am here, I also fixed `plotting.sample_ratio` respects `plotting.max_rows` by default if this is not set. Also, let `DataFrame.transform` respect `compute.max_rows` as well with minor cleanups.
In current setup, when using
set_option
, it will first check if the given value has the same type of default value. In this way, if the default is set toNone
which will result inNoneType
in the type checking and thus fail to useset_option
.And because of this, the PR #737 will fail, if this PR is merged, the #737 will be changed to adopt this.