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

vscode: support flexible plots #8282

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Conversation

pared
Copy link
Contributor

@pared pared commented Sep 12, 2022

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Change required for iterative/vscode-dvc#2403
Related iterative/vscode-dvc#1757

@pared pared force-pushed the vscode_flexible_plots branch from b38514b to 6f85c03 Compare September 12, 2022 11:12
@dtrifiro dtrifiro changed the title [WIP] Vscode: support flexilbe plots [WIP] Vscode: support flexible plots Sep 12, 2022
@dberenbaum
Copy link
Collaborator

@pared This seems to break bar plots at the moment. The values in the HTML are missing rev and formatted like:

    {
        "Feature": "data frame",
        "Mean decrease in impurity": "0.10044235196789414",
        "dvc_data_version_info": {
            "field": "Feature",
            "filename": "feature_importance.csv",
            "revision": "exp-fe059"
        }

@pared
Copy link
Contributor Author

pared commented Sep 16, 2022

@dberenbaum yep, hence the WIP, but I am not sure yet if we want to merge it, as I see that vscode team can handle that support even with existing DVC. Let's wait how the vscode implementation progresses, I can fix the tests when needed.

@pared
Copy link
Contributor Author

pared commented Sep 19, 2022

Ok, as I see in iterative/vscode-dvc#1757 (comment) we do rely on it. I will update this PR

@pared pared force-pushed the vscode_flexible_plots branch from 6f85c03 to 2186b28 Compare September 19, 2022 15:27
@pared pared force-pushed the vscode_flexible_plots branch from 7a11b87 to 17e43f4 Compare September 20, 2022 11:47
@pared pared changed the title [WIP] Vscode: support flexible plots Vscode: support flexible plots Sep 20, 2022
@pared pared marked this pull request as ready for review September 20, 2022 12:28
@pared pared changed the title Vscode: support flexible plots vscode: support flexible plots Sep 20, 2022
@pared pared requested a review from daavoo September 20, 2022 12:29
@pared pared force-pushed the vscode_flexible_plots branch from c4cec6f to 50caa0d Compare September 21, 2022 10:24
@daavoo daavoo added product: VSCode Integration with VSCode extension A: plots Related to the plots labels Sep 22, 2022
Comment on lines 212 to 222
assert html_result["linear.json"]["data"]["values"] == _update_datapoints(
linear_v1,
{
"rev": "workspace",
REVISION_FIELD: "workspace",
VERSION_FIELD: {
"revision": "workspace",
"filename": "linear.json",
"field": "y",
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the test is for VSCode integration, it probably makes more sense to test against the json result, right?

json_result["linear.json"][0]["datapoints"]["workspace"] == _update_datapoints(
        linear_v1,
        {
            VERSION_FIELD: {
                "revision": "workspace",
                "filename": "linear.json",
                "field": "y",
            },
        },
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be sure we need to check both, added.

Copy link
Contributor

@daavoo daavoo left a comment

Choose a reason for hiding this comment

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

Minor comments. If it works for VSCode, lgtm

@mattseddon
Copy link
Member

Minor comments. If it works for VSCode, lgtm

Everything seems to be working on our end πŸ‘πŸ».

image

@pared pared force-pushed the vscode_flexible_plots branch 3 times, most recently from 4458780 to 8dbbaa6 Compare September 27, 2022 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: plots Related to the plots product: VSCode Integration with VSCode extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants