Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-docs-for-jayvee-updating
Browse files Browse the repository at this point in the history
  • Loading branch information
rhazn authored Feb 1, 2024
2 parents aa66198 + 14450c4 commit cf9b084
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 144 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,35 @@ Data engineers can use Jayvee and its interpreter to clean and preprocess data f

[![Official Docs](assets/docs-banner.png)](https://jvalue.github.io/jayvee)

## Roadmap

Explore a glimpse of our upcoming features in the following list. This overview is broad and subject to evolution. We're excited to share our vision of the exciting journey ahead, and we invite you to accompany us on this adventure!

- ✅ Blocks and pipes
- ✅ Simple valuetypes and constraints
- ✅ Natively support table-based data
- ✅ Column-based transformations
- ✅ Describe blocks via builtin blocktypes in Jayvee
- ✅ Compose logic of multiple blocks via composite blocktypes
- ⌛ Multi-file Jayvee to distribute programs over multiple files (see [RFC 0015](./rfc/0015-multi-file-jayvee/0015-multi-file-jayvee.md))
- ⌛ Improve the syntax of valuetypes (see [RFC 0014](https://github.com/jvalue/jayvee/pull/409))
- ⌛ Jayvee formatter
- ⌛ Further extractors and sinks
- 🤔 Reusable libraries (with a package manager)
- 🤔 Composite valuetypes (with multiple fields)
- 🤔 Natively support tree data (XML, JSON)
- 🤔 Valuetypes parsers (to read and write different formats)
- 🤔 Customizable invalid value handling (default value, average, median, interpolation, ...)
- 🤔 VSCode Debugger
- 🤔 Blocktypes with multiple ports (e.g., for merging different data)


Anything missing, or you have ideas how some of the items on the list could be approached?
Feel free to create and issue and share your thoughts with us!

You like the project and our vision? Then we'd appreciate your star! ⭐


## Contribute

In case you would like to contribute to Jayvee, please have a look at our [contribution guide](CONTRIBUTING.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
const isBlockTypeCompletion =
isBlockDefinition(astNode) && next.property === 'type';
if (isBlockTypeCompletion) {
return this.completionForBlockType(acceptor);
return this.completionForBlockType(context, acceptor);
}

const isConstraintTypeCompletion =
isConstraintDefinition(astNode) && next.property === 'type';
if (isConstraintTypeCompletion) {
return this.completionForConstraintType(acceptor);
return this.completionForConstraintType(context, acceptor);
}

const isValuetypeDefinitionCompletion = next.type === ValuetypeReference;
Expand All @@ -78,20 +78,21 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
const isOtherPropertyCompletion =
isPropertyAssignment(astNode) && next.type === PropertyAssignment;
if (isFirstPropertyCompletion || isOtherPropertyCompletion) {
return this.completionForPropertyName(astNode, acceptor);
return this.completionForPropertyName(astNode, context, acceptor);
}
}
return super.completionFor(context, next, acceptor);
}

private completionForBlockType(
context: CompletionContext,
acceptor: CompletionAcceptor,
): MaybePromise<void> {
const blockTypes = getAllBuiltinBlocktypes(this.langiumDocumentService);
blockTypes.forEach((blockType) => {
const lspDocBuilder = new LspDocGenerator();
const markdownDoc = lspDocBuilder.generateBlockTypeDoc(blockType);
acceptor({
acceptor(context, {
label: blockType.type,
labelDetails: {
detail: ` ${blockType.inputType} ${RIGHT_ARROW_SYMBOL} ${blockType.outputType}`,
Expand All @@ -107,6 +108,7 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
}

private completionForConstraintType(
context: CompletionContext,
acceptor: CompletionAcceptor,
): MaybePromise<void> {
const constraintTypes = getAllBuiltinConstraintTypes(
Expand All @@ -116,7 +118,7 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
const lspDocBuilder = new LspDocGenerator();
const markdownDoc =
lspDocBuilder.generateConstraintTypeDoc(constraintType);
acceptor({
acceptor(context, {
label: constraintType.type,
labelDetails: {
detail: ` on ${constraintType.on.getName()}`,
Expand Down Expand Up @@ -144,7 +146,7 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
parsedDocument.valuetypes.forEach((valuetypeDefinition) => {
const valuetype = createValuetype(valuetypeDefinition);
if (valuetype !== undefined && valuetype.isReferenceableByUser()) {
acceptor({
acceptor(context, {
label: valuetypeDefinition.name,
kind: CompletionItemKind.Class,
detail: `(valuetype)`,
Expand All @@ -156,6 +158,7 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {

private completionForPropertyName(
astNode: PropertyBody | PropertyAssignment,
context: CompletionContext,
acceptor: CompletionAcceptor,
) {
let container: BlockDefinition | ConstraintDefinition;
Expand Down Expand Up @@ -187,7 +190,7 @@ export class JayveeCompletionProvider extends DefaultCompletionProvider {
wrapper,
propertyNames,
propertyKind,
).forEach(acceptor);
).forEach((item) => acceptor(context, item));
}
}

Expand Down
Loading

0 comments on commit cf9b084

Please sign in to comment.