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

[FEATURE] LocalFileExtractor block #478

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
820ef32
create first logic for local file extractor
OmarFourati Nov 23, 2023
bbcb067
delete useless variables for block
OmarFourati Nov 30, 2023
1ecf9d8
deleted unused logic in block code
OmarFourati Nov 30, 2023
dbe2568
fix linting problems
OmarFourati Dec 1, 2023
1fe0503
refactor: update documentation for local file extractor block
OmarFourati Dec 10, 2023
0874d79
refactor: move test files and block to assets
OmarFourati Dec 10, 2023
d0810aa
add: tests on error for path traversal
OmarFourati Dec 10, 2023
6ded048
refactor: update tests for local extractor
OmarFourati Dec 10, 2023
d105fad
fix: success of first test for local extractor
OmarFourati Dec 10, 2023
3a5387e
fix: success on test for traversal path
OmarFourati Dec 11, 2023
6c0adc5
fix checks and tests and delete useless files
OmarFourati Dec 21, 2023
e41208c
update licensing
OmarFourati Dec 21, 2023
0f9374a
remove file extension logic
OmarFourati Dec 26, 2023
3ba7f07
restore extension variables on local file extractor
OmarFourati Dec 26, 2023
02f8242
revew changes
OmarFourati Dec 27, 2023
6904ec0
update property assignement for path traversal
OmarFourati Jan 9, 2024
37fbbbd
refactor: create new test cases and files
OmarFourati Jan 12, 2024
9e5ee3a
fix path for inferfileextension module
OmarFourati Jan 12, 2024
53425c3
fix: linting
OmarFourati Jan 20, 2024
9b71d41
fix: fix tests local extractor
OmarFourati Jan 20, 2024
3c13bf9
fix: add license file
OmarFourati Jan 20, 2024
5543bea
fix: fix naming license file
OmarFourati Jan 20, 2024
32f705a
bash: line 1: wq: command not found
OmarFourati Jan 22, 2024
da85116
fix tests for path traversal
OmarFourati Feb 2, 2024
e10d229
Merge branch 'main' into feature/local-file-extractor
rhazn Feb 2, 2024
70d4f71
merge main and sync fork
OmarFourati Feb 2, 2024
d26f6b7
Merge remote-tracking branch 'origin/main' into pr/478
rhazn Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

8 changes: 4 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"extends": "@jvalue/eslint-config-jvalue",
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"plugins": ["@nrwl/nx"],
"parserOptions": {
"project": ["./tsconfig.base.json"]
},
Expand All @@ -16,7 +16,7 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -33,12 +33,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
},
{
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
- name: Build
run: npx nx affected --target=build --configuration=prod --parallel=3

- name: Lint Nx specific workspace files
run: npx nx workspace-lint

- name: Lint
run: npx nx affected --target=lint --parallel=3 --maxWarnings=0

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,3 @@ Thumbs.db
# Generated Docusaurus files
.docusaurus/
.cache-loader/

.nx/cache
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@

.prettierignore
.docusaurus/

/.nx/cache
29 changes: 0 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,6 @@ 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
2 changes: 1 addition & 1 deletion apps/docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "**/.docusaurus/**", "**/theme/prism-jayvee.js"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/dev/04-guides/06-jayvee-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Execution extensions are only required by the [interpreter](https://github.com/j
#### 1. Generate an execution libraries

```bash
npx nx g @nx/node:library --name="extensions/<extension-name>/exec"
npx nx g @nrwl/node:library --name="extensions/<extension-name>/exec"
```

#### 2. Create extension classes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
title: Getting Started
---

# Introduction to Jayvee
Expand All @@ -25,7 +24,11 @@ npm install -g @jvalue/[email protected]

## Update

Details about how to update Jayvee and the VSCode extension can be found [here](./update.md).
Updating the interpreter is done by reinstalling it using `npm`. Make sure to also update the [VSCode plugin](#vscode-plugin) to match the installed interpreter if you use it.

```bash
npm install -g @jvalue/jayvee-interpreter
```

## Usage

Expand Down Expand Up @@ -80,7 +83,7 @@ jv <file> -d --debug-granularity peek --debug-target MyExtractorBlock,MySinkBloc

## Examples

You can find multiple examples with inline explanations [here](../examples/README.mdx). You can copy them to your local file system and execute them with the `jv` command on your command line (see [usage](#usage)).
You can find multiple examples with inline explanations [here](./examples/README.mdx).

## VSCode Plugin

Expand Down
8 changes: 0 additions & 8 deletions apps/docs/docs/user/intro/_category_.json

This file was deleted.

52 changes: 0 additions & 52 deletions apps/docs/docs/user/intro/update.md

This file was deleted.

6 changes: 3 additions & 3 deletions apps/docs/generator/src/user-doc-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export class UserDocGenerator
{
constructor(private services: JayveeServices) {}

generateValueTypesDoc(
valueTypes: Record<string, PrimitiveValuetype>,
): string {
generateValueTypesDoc(valueTypes: {
[name: string]: PrimitiveValuetype;
}): string {
const builder = new UserDocMarkdownBuilder()
.docTitle('Built-in Valuetypes')
.generationComment()
Expand Down
13 changes: 6 additions & 7 deletions apps/docs/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
export default {
displayName: 'docs-generator',
preset: '../../jest.preset.js',
globals: {},
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/docs-generator',
Expand Down
21 changes: 13 additions & 8 deletions apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
"dependsOn": ["generate"]
},
"build-generator": {
"executor": "@nx/webpack:webpack",
"executor": "@nrwl/webpack:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"target": "node",
"compiler": "tsc",
"outputPath": "dist/apps/docs/generator",
"main": "apps/docs/generator/src/main.ts",
"tsConfig": "apps/docs/tsconfig.json",
"webpackConfig": "apps/docs/webpack.config.js"
"tsConfig": "apps/docs/tsconfig.json"
},
"dependsOn": ["prepare-generator"]
},
Expand All @@ -46,21 +45,27 @@
"dependsOn": ["build-generator"]
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/docs/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"executor": "@nrwl/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/docs/jest.config.ts"
"jestConfig": "apps/docs/jest.config.ts",
"passWithNoTests": true
}
},
"version-snapshot": {
"executor": "nx:run-commands",
"dependsOn": ["generate"],
"options": {
"commands": ["node tools/scripts/docs/create-new-version-snapshot.mjs"],
"commands": [
"node tools/scripts/docs/create-new-version-snapshot.mjs"
],
"parallel": false
}
}
Expand Down
Loading
Loading