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 slice data functional tests #5057

Merged
merged 13 commits into from
Mar 9, 2021
Merged

Add slice data functional tests #5057

merged 13 commits into from
Mar 9, 2021

Conversation

joyceerhl
Copy link
Contributor

@joyceerhl joyceerhl commented Mar 7, 2021

For #5066

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

@joyceerhl joyceerhl marked this pull request as ready for review March 7, 2021 22:57
@joyceerhl joyceerhl requested a review from a team as a code owner March 7, 2021 22:57
elif hasattr(df, "toPandas"):
df = df.toPandas()
df = df.toPandas().iloc[start:end]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Broke chunking in #4951

Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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);
}
Copy link
Contributor Author

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]
Copy link
Contributor

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?

Copy link
Contributor Author

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';
Copy link
Member

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.

Copy link
Member

@IanMatthewHuff IanMatthewHuff left a 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?

@joyceerhl joyceerhl linked an issue Mar 8, 2021 that may be closed by this pull request
Base automatically changed from joyceerhl/more-styles to main March 8, 2021 22:53
@joyceerhl joyceerhl merged commit da080f6 into main Mar 9, 2021
@joyceerhl joyceerhl deleted the joyceerhl/slice-data-tests branch March 9, 2021 02:04
joyceerhl added a commit that referenced this pull request Mar 23, 2021
joyceerhl added a commit that referenced this pull request Mar 24, 2021
* More data viewer style tweaks (#5055)

* Add slice data functional tests (#5057)

* Changelog and news entry

* Fix smoke tests

* Lint

Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>
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.

Tests for slice data feature
4 participants