diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09fddce..0c72d70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,18 @@ -name: build +name: Build repository on: workflow_dispatch: inputs: + run_parallel: + description: 'Run jobs in parallel' + required: false + type: boolean + default: true + self_hosted: + description: 'Run on self-hosted runner' + required: false + type: boolean + default: true playwright: description: 'Run playwright' required: false @@ -10,16 +20,27 @@ on: default: false playwright_spec_param: type: string - description: "Run specific test(s). Example: `landing-page.spec.ts`" + description: 'Run specific playwright test(s) (optional). Example: landing-page.spec.ts' required: false push: + pull_request: + types: [opened, ready_for_review] + pull_request_review: + types: [submitted] jobs: build: + if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }} uses: datavisyn/github-workflows/.github/workflows/build-node-python.yml@main secrets: inherit + # Boolean inputs are tricky in Github Actions. Their default is not honored in non-workflow-dispatch actions, so setting a default on push is tricky: https://stackoverflow.com/a/73495922 + # To get on push true, use !contains(inputs.myInput, 'false') + # To get on push false, use contains(inputs.myInput, 'true') with: + run_parallel: ${{ !contains(inputs.run_parallel, 'false') }} # true except if box is not checked + runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked cypress_enable: false playwright_enable: true - playwright_run_because_flag: ${{ inputs.playwright == true }} + playwright_run_because_flag: ${{ inputs.playwright == true || github.event_name == 'pull_request' || github.event.review.state == 'approved' }} playwright_spec_param: ${{ inputs.playwright_spec_param }} + playwright_runs_on: ${{ (!contains(inputs.self_hosted, 'false') && 'self-hosted') || null }} # self-hosted except if box is not checked diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1720aab..9fade96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,16 @@ -name: release +name: Create a new release PR + +on: + workflow_dispatch: + inputs: + release_version: + type: string + description: 'The next version to release' + required: true -on: workflow_dispatch - jobs: release: uses: datavisyn/github-workflows/.github/workflows/release-source.yml@main - secrets: inherit + secrets: inherit + with: + release_version: ${{ inputs.release_version }} \ No newline at end of file diff --git a/Makefile b/Makefile index 9681ef2..c6479dc 100644 --- a/Makefile +++ b/Makefile @@ -39,11 +39,19 @@ documentation: .PHONY: install ## Install the requirements install: - pip install -e . + @if [ ! -z "${CI}" ]; then \ + uv pip install -e . --system; \ + else \ + uv pip install -e .; \ + fi .PHONY: develop ## Set up the development environment develop: - pip install -e .[develop] + @if [ ! -z "${CI}" ]; then \ + uv pip install -e ".[develop]" --system; \ + else \ + uv pip install -e ".[develop]"; \ + fi .PHONY: env_encrypt ## Encrypts the current .//.env env_encrypt: diff --git a/package.json b/package.json index cc85657..3b4c394 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,10 @@ "build": "yarn run clean && yarn run compile && yarn run copy", "clean": "visyn_scripts clean build dist lib", "codegen:openapi": "npx @rtk-query/codegen-openapi ./src/codegen.ts", - "compile:watch": "visyn_scripts compile --watch", - "compile": "visyn_scripts compile", + "compile:watch": "visyn_scripts compile --watch -p tsconfig.lenient.json", + "compile": "visyn_scripts compile -p tsconfig.lenient.json", + "compile:strict:watch": "visyn_scripts compile --watch", + "compile:strict": "visyn_scripts compile", "copy": "visyn_scripts copy", "delete-dependencies": "visyn_scripts clean node_modules", "dist": "mkdir lib && cd dist && tar cvzf ../lib/app_template.tar.gz *", @@ -49,15 +51,15 @@ "bundle:prod": "visyn_scripts bundle --mode production --env workspace_mode=single" }, "dependencies": { - "@reduxjs/toolkit": "^1.8.2", - "react-redux": "^8.0.2", - "visyn_core": "^10.0.3", - "visyn_scripts": "v9.0.0" + "@reduxjs/toolkit": "^1.9.7", + "react-redux": "^8.1.3", + "visyn_core": "^13.0.0", + "visyn_scripts": "^11.1.1" }, "devDependencies": { - "@playwright/test": "^1.44.0", + "@playwright/test": "^1.46.1", "@rtk-query/codegen-openapi": "^1.2.0", - "playwright": "^1.44.0" + "playwright": "^1.46.1" }, "resolutions": { "@types/react": "~18.2.0", diff --git a/requirements.txt b/requirements.txt index b6349ca..765e3cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ pandas==2.0.1 sqlmodel==0.0.8 sse-starlette==1.6.1 -visyn_core>=10.0.3,<11.0.0 +visyn_core>=13.0.0,<14.0.0 diff --git a/src/index.initialize.tsx b/src/index.initialize.tsx index d7ffbad..7221629 100644 --- a/src/index.initialize.tsx +++ b/src/index.initialize.tsx @@ -8,7 +8,7 @@ import { App } from './App'; createRoot(document.getElementById('root')).render( - + diff --git a/tsconfig.lenient.json b/tsconfig.lenient.json new file mode 100644 index 0000000..d125836 --- /dev/null +++ b/tsconfig.lenient.json @@ -0,0 +1,12 @@ +{ + "extends": "visyn_scripts/config/tsconfig.lenient.template.json", + "compilerOptions": { + "jsx": "react", + "outDir": "./dist", + }, + "include": [ + "src/**/*.ts", + "src/**/*.tsx", + "tsd.d.ts" + ] +}