-
Notifications
You must be signed in to change notification settings - Fork 294
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 slice data functional tests #5057
Conversation
…to joyceerhl/more-styles
elif hasattr(df, "toPandas"): | ||
df = df.toPandas() | ||
df = df.toPandas().iloc[start:end] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broke chunking in #4951
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but the comment doesn't make sense.
It looks like this is a bug fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a tiny bit confused as well. This is merging into more-styles and currently there is also a PR open for more-styles into main?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this PR depends on the Checkbox change in more-styles. But I'm merging the style changes into main, then this into main. And yes this is a bug fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that works for me. I think that personally I would just park it until style was into main and then PR against main so I could see test runs and what not. But small enough change that I'm down with approving now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow I thought we used to get test runs even on PRs not going into main... That's totally fair, my bad. Can't wait for GitHub to add stacked diffs 😭
@@ -164,10 +164,6 @@ export class KernelVariables implements IJupyterVariables { | |||
// Import the data frame script directory if we haven't already | |||
await this.importDataFrameScripts(notebook); | |||
|
|||
if (targetVariable.rowCount) { | |||
end = Math.min(end, targetVariable.rowCount); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The row start and end however are already evaluated relative to the slice variable info, so this check is unnecessary.
@@ -91,14 +91,14 @@ def _VSCODE_convertTensorToDataFrame(tensor, start=None, end=None): | |||
def _VSCODE_convertToDataFrame(df, start=None, end=None): | |||
vartype = type(df) | |||
if isinstance(df, list): | |||
df = _VSCODE_pd.DataFrame(df) | |||
df = _VSCODE_pd.DataFrame(df).iloc[start:end] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these work if start and end are none?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that corresponds to no slice i.e. it returns the full variable
@@ -21,6 +21,9 @@ import { SvgViewer } from '../react-common/svgViewer'; | |||
import { TestSvg } from './testSvg'; | |||
import { Toolbar } from './toolbar'; | |||
|
|||
import { initializeIcons } from '@fluentui/react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment might be good here (I know this is just a move). Not really obvious to me what this is doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems fine, I just don't quite understand the merging here. Should this be added to the more-styles PR?
…to joyceerhl/slice-data-tests
For #5066
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).