diff --git a/.github/workflows/notify-wandb-core.yaml b/.github/workflows/notify-wandb-core.yaml index 3a1fa818d343..8b573259690f 100644 --- a/.github/workflows/notify-wandb-core.yaml +++ b/.github/workflows/notify-wandb-core.yaml @@ -6,14 +6,38 @@ name: Notify wandb/core on: push: branches: - - '**' + - "**" workflow_dispatch: +permissions: + packages: write + jobs: + publish-package: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure npm for GitHub Packages + run: | + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> weave-js/.npmrc + - name: Publish package + run: | + cd weave-js + yarn install --frozen-lockfile + npm version 0.0.0-${{ github.sha }} --no-git-tag-version + yarn generate + cp package.json README.md .npmrc src/ + cd src + if [ "${{ github.ref }}" = "refs/heads/master" ]; then + npm publish + else + npm publish --tag prerelease + fi check-which-tests-to-run: uses: ./.github/workflows/check-which-tests-to-run.yaml notify-wandb-core: - needs: check-which-tests-to-run + needs: [check-which-tests-to-run, publish-package] runs-on: ubuntu-latest steps: - name: Repository dispatch diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ab0a55fb384c..e90c4a922bf4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -83,9 +83,9 @@ jobs: WANDB_ENABLE_TEST_CONTAINER: true LOGGING_ENABLED: true ports: - - '8080:8080' - - '8083:8083' - - '9015:9015' + - "8080:8080" + - "8083:8083" + - "9015:9015" options: >- --health-cmd "wget -q -O /dev/null http://localhost:8080/healthz || exit 1" --health-interval=5s @@ -165,7 +165,10 @@ jobs: - uses: actions/setup-node@v1 if: steps.check_run.outputs.should_lint_and_compile == 'true' with: - node-version: '18.x' + node-version: "18.x" + - name: Configure npm for GitHub Packages + run: | + echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc - name: Run WeaveJS Lint and Compile if: steps.check_run.outputs.should_lint_and_compile == 'true' run: | @@ -218,36 +221,36 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version-major: ['3'] + python-version-major: ["3"] python-version-minor: [ - '9', - '10', - '11', - '12', - '13', + "9", + "10", + "11", + "12", + "13", # ] nox-shard: [ - 'trace', - 'trace_server', - 'anthropic', - 'cerebras', - 'cohere', - 'dspy', - 'groq', - 'google_ai_studio', - 'instructor', - 'langchain', - 'litellm', - 'llamaindex', - 'mistral0', - 'mistral1', - 'notdiamond', - 'openai', - 'vertexai', - 'scorers_tests', - 'pandas-test', + "trace", + "trace_server", + "anthropic", + "cerebras", + "cohere", + "dspy", + "groq", + "google_ai_studio", + "instructor", + "langchain", + "litellm", + "llamaindex", + "mistral0", + "mistral1", + "notdiamond", + "openai", + "vertexai", + "scorers_tests", + "pandas-test", ] fail-fast: false services: @@ -261,9 +264,9 @@ jobs: WANDB_ENABLE_TEST_CONTAINER: true LOGGING_ENABLED: true ports: - - '8080:8080' - - '8083:8083' - - '9015:9015' + - "8080:8080" + - "8083:8083" + - "9015:9015" options: >- --health-cmd "wget -q -O /dev/null http://localhost:8080/healthz || exit 1" --health-interval=5s @@ -272,7 +275,7 @@ jobs: weave_clickhouse: image: clickhouse/clickhouse-server ports: - - '8123:8123' + - "8123:8123" options: --health-cmd "wget -nv -O- 'http://localhost:8123/ping' || exit 1" --health-interval=5s --health-timeout=3s steps: - name: Checkout diff --git a/weave-js/.npmrc b/weave-js/.npmrc new file mode 100644 index 000000000000..fe7b33d8b9f3 --- /dev/null +++ b/weave-js/.npmrc @@ -0,0 +1 @@ +@wandb:registry=https://npm.pkg.github.com diff --git a/weave-js/package.json b/weave-js/package.json index db96be60691d..dd9db034e5c1 100644 --- a/weave-js/package.json +++ b/weave-js/package.json @@ -1,10 +1,9 @@ { "name": "@wandb/weave", - "version": "0.0.1", + "version": "0.0.7", "description": "Weave JS Library", "type": "module", - "license": "No license", - "private": true, + "license": "Apache-2.0", "scripts": { "dev": "yarn generate && NODE_OPTIONS='--max-http-header-size=10248012' PORT=3000 vite", "build": "yarn generate && rm -rf build && NODE_OPTIONS=--max-old-space-size=16384 vite build", @@ -22,7 +21,15 @@ "direct-prettier": "prettier", "lint": "yarn eslint & yarn tslint & yarn prettier & wait", "lint-fix": "yarn eslint-fix & yarn tslint-fix & yarn prettier-fix & wait", - "generate-schemas": "bash scripts/generate-schemas.sh" + "generate-schemas": "bash scripts/generate-schemas.sh", + "postpublish": "rm package.json README.md" + }, + "main": "src/index.ts", + "types": "src/index.ts", + "publishConfig": { + "access": "public", + "registry": "https://npm.pkg.github.com", + "directory": "src" }, "dependencies": { "@apollo/client": "^3.8.4", @@ -59,13 +66,14 @@ "@types/query-string": "^6.3.0", "@types/react-hook-mousetrap": "^2.0.2", "@types/react-syntax-highlighter": "^15.5.7", - "@wandb/semantic": "file:./wandb-semantic-v0.0.1.tgz", - "@wandb/ui": "file:./wandb-ui-0.1.0.tgz", + "@wandb/semantic": "^0.0.1", + "@wandb/ui": "^0.1.0", "ansi_up": "^3.0.0", "body-scroll-lock": "^2.6.4", "classnames": "^2.2.6", "copy-to-clipboard": "^3.0.8", "cytoscape-dagre": "^2.2.2", + "detect-browser": "^5.3.0", "diff": "^5.1.0", "downloadjs": "^1.4.7", "emoji-picker-react": "^4.9.3", @@ -202,7 +210,6 @@ "autoprefixer": "^10.4.13", "babel-eslint": "^10.1.0", "concurrently": "^7.5.0", - "detect-browser": "^5.2.1", "esbuild": "^0.17.15", "eslint": "^8.40.0", "eslint-config-prettier": "^2.3.0", diff --git a/weave-js/wandb-semantic-v0.0.1.tgz b/weave-js/wandb-semantic-v0.0.1.tgz deleted file mode 100644 index 7ec36a313089..000000000000 Binary files a/weave-js/wandb-semantic-v0.0.1.tgz and /dev/null differ diff --git a/weave-js/wandb-ui-0.1.0.tgz b/weave-js/wandb-ui-0.1.0.tgz deleted file mode 100644 index db97f78b8c4d..000000000000 Binary files a/weave-js/wandb-ui-0.1.0.tgz and /dev/null differ diff --git a/weave-js/yarn.lock b/weave-js/yarn.lock index 6a5ec14e8727..2f4a0c9663a5 100644 --- a/weave-js/yarn.lock +++ b/weave-js/yarn.lock @@ -5044,13 +5044,15 @@ loupe "^2.3.7" pretty-format "^29.7.0" -"@wandb/semantic@file:./wandb-semantic-v0.0.1.tgz": +"@wandb/semantic@^0.0.1": version "0.0.1" - resolved "file:./wandb-semantic-v0.0.1.tgz#554f3dcff44f09e3d97397456deb7b1998da66f8" + resolved "https://npm.pkg.github.com/download/@wandb/semantic/0.0.1/879e6cf3b80ad29b7f3b636b2eb170763ffa79fd#879e6cf3b80ad29b7f3b636b2eb170763ffa79fd" + integrity sha512-tt48NPjbz9/2F+T7vpjZQQvanmF780wx7e7U430viZwr+DFn0l+EWz2yDYYzistRZgOSrsnibn8xdgk9O3tfgw== -"@wandb/ui@file:./wandb-ui-0.1.0.tgz": +"@wandb/ui@^0.1.0": version "0.1.0" - resolved "file:./wandb-ui-0.1.0.tgz#35a65383ff97eedea3c8324cb914c9c6ab4de748" + resolved "https://npm.pkg.github.com/download/@wandb/ui/0.1.0/bc6d881055e2c0614fcd0f967321b511b2bacf63#bc6d881055e2c0614fcd0f967321b511b2bacf63" + integrity sha512-WtaCzYUcGIHcq7KIsehg0yD4WFG4DX5/c31wP+yAkyJ8kQIET1qQComgCb52OoLiypHO55lD4MvfNG5HyrB9ww== dependencies: "@material-ui/lab" "^4.0.0-alpha.60" autosuggest-highlight "^3.1.1" @@ -7182,7 +7184,7 @@ dequal@^2.0.0, dequal@^2.0.3: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== -detect-browser@^5.2.1: +detect-browser@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==