Skip to content

Commit

Permalink
Merge pull request #320 from briefercloud/echartjs
Browse files Browse the repository at this point in the history
visualizations v2
  • Loading branch information
vieiralucas authored Jan 28, 2025
2 parents 12bda99 + 0b134a8 commit a0df965
Show file tree
Hide file tree
Showing 47 changed files with 7,026 additions and 22 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ jobs:
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, '[skip-tests]')"

env:
JUPYTER_TOKEN: 70834f1904c29ae921ce0b030ceb7f25dd7b309a3fd1677dea6f3cf207c89012

steps:
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Checkout Repository
uses: actions/checkout@v4

Expand All @@ -23,6 +31,18 @@ jobs:
node-version: 18
cache: yarn

- name: Spin up test dependencies with Docker Compose
run: |
docker-compose -f docker-compose.test.yaml up -d
- name: Wait for services to be ready
run: |
# Replace 'service-name' and port if needed
while ! nc -z localhost 8888; do
echo "Waiting for service to be ready..."
sleep 2
done
- name: Install dependencies
run: yarn install --frozen-lockfile

Expand All @@ -31,3 +51,7 @@ jobs:

- name: Run tests
run: yarn test

- name: Tear down Docker Compose
if: always()
run: docker-compose -f docker-compose.test.yaml down
14 changes: 14 additions & 0 deletions apps/api/src/config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import fs from 'fs'
import { getVar, parseIntOr } from './index.js'
import { logger } from '../logger.js'

type FeatureFlags = {
visualizationsV2: boolean
}

export interface IBaseConfig {
NODE_ENV: string
ALLOW_HTTP: boolean
Expand Down Expand Up @@ -35,6 +39,7 @@ export interface IBaseConfig {
YJS_DOCS_CACHE_SIZE_MB: number
DISABLE_ANONYMOUS_TELEMETRY: boolean
DISABLE_UPDATE_CHECK: boolean
FEATURE_FLAGS: FeatureFlags
}

export class BaseConfig implements IBaseConfig {
Expand Down Expand Up @@ -70,6 +75,7 @@ export class BaseConfig implements IBaseConfig {
public readonly DISABLE_CUSTOM_OAI_KEY: boolean
public readonly DISABLE_ANONYMOUS_TELEMETRY: boolean
public readonly DISABLE_UPDATE_CHECK: boolean
public readonly FEATURE_FLAGS: FeatureFlags

public constructor() {
this.NODE_ENV = getVar('NODE_ENV')
Expand Down Expand Up @@ -133,6 +139,8 @@ export class BaseConfig implements IBaseConfig {
'DISABLE_ANONYMOUS_TELEMETRY'
)
this.DISABLE_UPDATE_CHECK = this.getBooleanVar('DISABLE_UPDATE_CHECK')

this.FEATURE_FLAGS = this.getFeatureFlags()
}

private getVersion() {
Expand Down Expand Up @@ -184,4 +192,10 @@ export class BaseConfig implements IBaseConfig {

return null
}

private getFeatureFlags(): FeatureFlags {
return {
visualizationsV2: this.getBooleanVar('FLAG_VISUALIZATIONS_V2', false),
}
}
}
Loading

0 comments on commit a0df965

Please sign in to comment.