Skip to content

Commit

Permalink
chore(dev): publish to github packages (#3257)
Browse files Browse the repository at this point in the history
  • Loading branch information
wandbjake committed Jan 13, 2025
1 parent a1d9864 commit 147b2ed
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 47 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/notify-wandb-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
69 changes: 36 additions & 33 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions weave-js/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@wandb:registry=https://npm.pkg.github.com
21 changes: 14 additions & 7 deletions weave-js/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Binary file removed weave-js/wandb-semantic-v0.0.1.tgz
Binary file not shown.
Binary file removed weave-js/wandb-ui-0.1.0.tgz
Binary file not shown.
12 changes: 7 additions & 5 deletions weave-js/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit 147b2ed

Please sign in to comment.