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

gives error on correct type: polars.CSVDataset in catalog #79

Closed
1 of 2 tasks
pietroppeter opened this issue Aug 27, 2024 · 8 comments
Closed
1 of 2 tasks

gives error on correct type: polars.CSVDataset in catalog #79

pietroppeter opened this issue Aug 27, 2024 · 8 comments

Comments

@pietroppeter
Copy link

Description

When using the extension with an element in catalog that has a polars.CSVDataset the extension reports error because the type is not in one of the allowed ones (it fails the recognize the installation of kedro-datasets[polars]

Screenshot:
image

Context

I see the extension is very new and looks very nice and useful. It is not a big problem for me at the moment.
I am wondering if there is a workaround where I can tell LSP to shutup and do not show the error.

Steps to Reproduce

  1. create a kedro project with kedro-datasets[polars] element in catalog
  2. verify that you can load the element from catalog
  3. verify that the extension marks it as error (see screenshot above)

Checklist

  • Have you read the "Requirements" section already?
    • yes, my VS Code version is 1.92.2
  • Have you make sure you are running the extension with the correct virtual environment? Cmd + P and Python: Select Interpreter
    • mmh, indeed not sure about that. I do not have an interpreter selected. the project is set up with uv and this in particular creates a .venv folder, not sure how to tell how to use that

image

Expected Result

do not report error

Actual Result

reports error for polars.CSVDataset (screenshot above)

Your Environment

  • Kedro version used (pip show kedro or kedro -V): version 0.19.8
  • Kedro VSCode version used: v0.1.1
  • Python version used (python -V): 3.12.5
  • Operating system and version: MacOS Sonoma 14.3
  • note: project setup with uv
@kedro-org kedro-org deleted a comment Aug 27, 2024
@astrojuanlu
Copy link
Member

Similar to #5, but not exactly 🤔

@noklam
Copy link
Contributor

noklam commented Aug 27, 2024

There is an experimental flag in settings, if you turn it off does it helps? Make sure you restarted vscode too as I found it sometimes caching the extension in an unexpected way.

@kedro-org kedro-org deleted a comment Aug 27, 2024
@noklam
Copy link
Contributor

noklam commented Aug 28, 2024

@pietroppeter I saw you give an thumbs up emoji, just want to be sure if the experimental flag help? I expect this will be a temporary workaround as we are working on a new big feature that will come out soon.

We may have some time to clean up some bugs after that.

@pietroppeter
Copy link
Author

hi @noklam, no the experimental flag disabled did not help (I did restart VS code). sorry but this week cannot follow up more, will try maybe next week to create a small reproducible project (it should not be too hard). not at all an urgent thing for me anyway

@noklam
Copy link
Contributor

noklam commented Aug 28, 2024

@pietroppeter thanks a lot for the feedback! No rush at all, I will see if I can fix this.

@noklam
Copy link
Contributor

noklam commented Aug 28, 2024

@jitu5 Do you have any thought on this? I think for other features it's easier to disable with a flag, for YAML schema validation, it's done via the yaml.schema contribution point right at the package.json so I don't know if there is a nice way to disable it.

i am trying to look at https://github.com/redhat-developer/vscode-yaml but cannot find a proper API to use. In additional, we shouldn't get stuck with the current status if better alternative exists. We want it to be flexible enough to support custom dataset eventually, so pointing to a fix URL isn't a good idea anyway.

I tried to ask but there is very little activity on the repo.

@jitu5
Copy link
Contributor

jitu5 commented Aug 29, 2024

@jitu5 Do you have any thought on this? I think for other features it's easier to disable with a flag, for YAML schema validation, it's done via the yaml.schema contribution point right at the package.json so I don't know if there is a nice way to disable it.

i am trying to look at https://github.com/redhat-developer/vscode-yaml but cannot find a proper API to use. In additional, we shouldn't get stuck with the current status if better alternative exists. We want it to be flexible enough to support custom dataset eventually, so pointing to a fix URL isn't a good idea anyway.

I tried to ask but there is very little activity on the repo.

@noklam from https://github.com/redhat-developer/yaml-language-server Is it possible to have a custom schema file with a missing property, like the one shown in the documentation?

"yaml.schemas": {
    "http://json.schemastore.org/composer": ["/*"],
    "file:///home/johnd/some-schema.json": ["some.yaml"],
    "../relative/path/schema.json": ["/config*.yaml"],
    "/Users/johnd/some-schema.json": ["some.yaml"],
}

in our case

"yaml.schemas": {
    "https://abc.com/custom-jsonschema.json": "conf/**/*catalog*",
    "https://raw.githubusercontent.com/kedro-org/kedro/develop/static/jsonschema/kedro-catalog-0.19.json": "conf/**/*catalog*"
},

I tried the above, but for some reason, it didn’t work. I’m also not entirely sure if this is the correct approach. Additionally, I couldn’t find a clear way to disable it from docs.

@noklam
Copy link
Contributor

noklam commented Sep 6, 2024

I am closing this issue, as this is exactly the same problem as #5 to keep the discussion in one place.

@noklam noklam closed this as completed Sep 6, 2024
@astrojuanlu astrojuanlu closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
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

No branches or pull requests

4 participants