Skip to content

Support relative paths #76

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

I have two files in my VS Code workspace next to each other:

  • test.sdstest
  • titanic.csv

However, I must load the CSV file using an absolute path. This makes exchanging runnable code impossible.

package test

pipeline myPipeline {
    val titanic = Table.fromCsvFile("C:/Users/Lars/OneDrive/Desktop/test/titanic.csv");
}

Using relative paths leads to an error when executing test.sdstest:

package test

pipeline myPipeline {
    val titanic = Table.fromCsvFile("titanic.csv");
}
2024-04-03 17:54:59.561 [info] [Runner] Message received: '{"type": "runtime_error", "id": "4eabb3d8-fc98-4875-89ce-e7580fb519e5", "data": {"message": "File \"titanic.csv\" does not exist<truncated>'

Desired solution

Possible solution:

  • Add a field currentWorkingDirectory to the program message.
  • Use this when spawning the Python process for execution.
  • In the DSL: When invoking the runner, set the currentWorkingDirectory to the directory that contains the file we execute.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions