From 39265aafb91f500fa257b0b0e3a004172b5ab587 Mon Sep 17 00:00:00 2001 From: Andrew Truong Date: Mon, 30 Sep 2024 18:44:27 -0400 Subject: [PATCH] chore(weave): Refactor hotfixes4 (#2539) * test * test * test version * test_version * wow im bad at versions * test * test * test * test --- .gitattributes | 2 +- .github/workflows/release.yaml | 6 +++--- .github/workflows/upload-assets.yaml | 2 +- .gitignore | 2 +- MANIFEST.in | 3 +-- build_dist.py | 2 +- pyproject.toml | 4 ---- scripts/build_frontend.sh | 2 +- setup.py | 3 ++- weave_query/.vscode/settings.json | 2 +- 10 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.gitattributes b/.gitattributes index 14a1c4fee8d..17bac66ad3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -weave/frontend/** linguist-generated=true +weave_query/weave_query/frontend/** linguist-generated=true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 87d9ca02a40..c2bf816d701 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: is_test: - description: "Use Test Pypi" + description: 'Use Test Pypi' required: true type: boolean default: true @@ -24,11 +24,11 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v1 with: - node-version: "18.x" + node-version: '18.x' - run: | pip install build twine ./build_dist.py - if [[ -n "$(git status weave/frontend/sha1.txt --porcelain)" ]] + if [[ -n "$(git status weave_query/weave_query/frontend/sha1.txt --porcelain)" ]] then echo "::error cannot publish release, commited SHA does not match build SHA" exit 1 diff --git a/.github/workflows/upload-assets.yaml b/.github/workflows/upload-assets.yaml index a6beaa39144..a3958820514 100644 --- a/.github/workflows/upload-assets.yaml +++ b/.github/workflows/upload-assets.yaml @@ -27,7 +27,7 @@ jobs: - id: 'build' run: | ./weave_query/weave_query/frontend/build.sh - if [[ -z "$(git status weave/frontend/sha1.txt --porcelain)" ]] + if [[ -z "$(git status weave_query/weave_query/frontend/sha1.txt --porcelain)" ]] then echo "Frontend assets has not changed, skipping publishing" echo "UPLOAD_ASSETS=false" >> "$GITHUB_OUTPUT" diff --git a/.gitignore b/.gitignore index c88a1687913..eecbe939a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ artifacts local-artifacts weave_internal.egg-info weave.egg-info/ -weave/frontend/assets +weave_query/weave_query/frontend/assets build/ MNIST food-101 diff --git a/MANIFEST.in b/MANIFEST.in index 06ca621be71..fc1d7feabc9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,9 +3,8 @@ include wb_schema.gql graft weave/client_context graft weave/deploy graft weave/flow -graft weave/frontend +graft weave_query/weave_query/frontend graft weave/integrations -graft weave/legacy graft weave/trace graft weave/trace_server graft weave/type_serializers diff --git a/build_dist.py b/build_dist.py index bed71d44c11..feac15dfcd2 100755 --- a/build_dist.py +++ b/build_dist.py @@ -43,7 +43,7 @@ ) if os.getenv("WEAVE_SKIP_BUILD") == None: - subprocess.run(["bash", "weave/frontend/build.sh"], check=True) + subprocess.run(["bash", "weave_query/weave_query/frontend/build.sh"], check=True) else: print("!!! Skipping frontend build !!!") diff --git a/pyproject.toml b/pyproject.toml index 03e54f6e16b..b7e7edc3841 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,10 +53,6 @@ version = { attr = "weave.version.VERSION" } dependencies = { file = ["requirements.txt"] } [tool.setuptools.dynamic.optional-dependencies] -examples = { file = ["requirements.legacy.ecosystem.txt"] } -engine = { file = ["requirements.legacy.engine.txt"] } -ecosystem = { file = ["requirements.legacy.ecosystem.txt"] } -datadog = { file = ["requirements.legacy.datadog.txt"] } modal = { file = ["requirements.modal.txt"] } [tool.pytest.ini_options] diff --git a/scripts/build_frontend.sh b/scripts/build_frontend.sh index a48a10581d8..e82be6470da 100755 --- a/scripts/build_frontend.sh +++ b/scripts/build_frontend.sh @@ -1,2 +1,2 @@ -cd weave/frontend +cd weave_query/weave_query/frontend sh build.sh diff --git a/setup.py b/setup.py index 2948f4082a1..7028f55aa59 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from typing import Union from urllib.error import HTTPError -from setuptools import setup # type: ignore[import] +from setuptools import find_namespace_packages, setup # type: ignore[import] from setuptools.command.build import build # type: ignore[import] from setuptools.command.editable_wheel import editable_wheel # type: ignore[import] from setuptools.command.sdist import sdist # type: ignore[import] @@ -116,4 +116,5 @@ def run(self) -> None: setup( cmdclass={"build": Build, "editable_wheel": EditableWheel, "sdist": Sdist}, + packages=find_namespace_packages(include=["weave*"]), ) diff --git a/weave_query/.vscode/settings.json b/weave_query/.vscode/settings.json index bb25176107c..57552574e8f 100644 --- a/weave_query/.vscode/settings.json +++ b/weave_query/.vscode/settings.json @@ -4,7 +4,7 @@ "python.testing.cwd": "./weave", "python.formatting.provider": "black", "search.exclude": { - "weave/frontend": true + "weave_query/weave_query/frontend": true }, "files.insertFinalNewline": true, "black-formatter.importStrategy": "fromEnvironment",