From 60773a9ffd0f216d47637311803e7c414c1a7dd6 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 25 Apr 2024 03:00:52 -0700 Subject: [PATCH] Update / cleanup build configuration. --- .github/workflows/cd-push-to-pypi.yaml | 2 +- metricflow-semantics/pyproject.toml | 14 ++++---------- pyproject.toml | 20 ++++++-------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cd-push-to-pypi.yaml b/.github/workflows/cd-push-to-pypi.yaml index 7468e1efe1..6b32bec67e 100644 --- a/.github/workflows/cd-push-to-pypi.yaml +++ b/.github/workflows/cd-push-to-pypi.yaml @@ -21,7 +21,7 @@ jobs: with: python-version: "${{ env.PYTHON_VERSION }}" - - name: Hatch Publish + - name: Hatch Publish `metricflow` run: hatch build && hatch publish env: HATCH_INDEX_USER: __token__ diff --git a/metricflow-semantics/pyproject.toml b/metricflow-semantics/pyproject.toml index 51bc10b736..88dc2bf5ce 100644 --- a/metricflow-semantics/pyproject.toml +++ b/metricflow-semantics/pyproject.toml @@ -56,13 +56,7 @@ features = [ "Source Code" = "https://github.com/dbt-labs/metricflow/tree/main/metricflow-semanitcs" [tool.hatch.build.targets.sdist] -exclude = [ - ".github", - ".changes", - ".changie.yaml", - ".gitignore", - ".pre-commit-config.yaml", - "CONTRIBUTING.md", - "MAKEFILE", - "/tests_metricflow_semantics" -] +packages = ["metricflow_semantics"] + +[tool.hatch.build.targets.wheel] +packages = ["metricflow_semantics"] diff --git a/pyproject.toml b/pyproject.toml index 17c97ec06c..ae627388f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,21 +85,13 @@ trino-sql-client-packages = [ "trino>=0.327.0, <0.328.0", ] +# There are files that hatch will always include as well (e.g. the LICENSE file). +# See hatch build docs for more details. [tool.hatch.build.targets.sdist] -exclude = [ - ".github", - ".changes", - ".changie.yaml", - ".gitignore", - ".pre-commit-config.yaml", - "CONTRIBUTING.md", - "Makefile", - "/dbt-metricflow", - "/local-data-warehouses", - "/metricflow-semantics/tests_metricflow_semantics", - "/scripts", - "/tests", -] +packages = ["metricflow", "metricflow-semantics/metricflow_semantics"] + +[tool.hatch.build.targets.wheel] +packages = ["metricflow", "metricflow-semantics/metricflow_semantics"] # Environment setup