jayvee
jayvee copied to clipboard
Simple file import
Partially addresses #563: Introduces use functionality with wildcards to load elements from other files.
- wildcard use
use * from "relative/path/file.jv" - validation to ensure used files exist
- rename the
useproperty of block typeTableTransformertouses, otherwise the new keywordusewould be ambiguous - for this PR, export all reusable root-level elements in a file besides pipelines
- when using the interpreter cli, always load the whole directory of the jv file into the workspace (so they can be used)
- For testing, introduce a helper function,
parseTestFileInWorkingDirthat allows loading the test files with their working directory instead of only reading the single file. This is a competing test setup with the usedparseHelperfunction. We should discuss whether we need two separate test setups or if this one should be applied everywhere.
Future Work
I tried to keep the PR short, so here an outlook of what's next
I see the follow-up tasks before tackling further import features:
- Auto-completion for file paths
- Rework of the test setup (as mentioned above)
- Check whether the import influences auto-completion functionality in general
I see the next import features to be:
- Explicitly
publishelements instead of publishing all - Explicitly
useelements instead of using a wildcard