From 5153fa6af3c8ace4c2e78979651854cdec57013d Mon Sep 17 00:00:00 2001 From: lbluque Date: Mon, 13 May 2024 13:19:48 -0700 Subject: [PATCH] build distributions separately --- .github/workflows/build.yml | 23 ++++++++++++++++--- .../pyproject.toml | 3 +++ packages/fairchem-core/pyproject.toml | 2 +- packages/fairchem-data-oc/pyproject.toml | 2 +- packages/fairchem-data-om/pyproject.toml | 3 +++ packages/fairchem-demo-ocpapi/pyproject.toml | 2 +- 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd4760ff3..62379c449 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade pip pip install hatch - name: Build @@ -32,6 +32,23 @@ jobs: hatch build popd done - - uses: actions/upload-artifact@v4 + + # unfortunately there isn't a clean way to upload artifacts separately so just copy + # for each new package right now + - name: Upload core artifact + uses: actions/upload-artifact@v4 + with: + name: dist-core + path: dist-core/* + + - name: Upload data-oc artifact + uses: actions/upload-artifact@v4 + with: + name: dist-data-oc + path: dist-data-oc/* + + - name: Upload demo-ocpapi artifact + uses: actions/upload-artifact@v4 with: - path: dist/* + name: dist-demo-ocpapi + path: dist-demo-ocpapi/* diff --git a/packages/fairchem-applications-AdsorbML/pyproject.toml b/packages/fairchem-applications-AdsorbML/pyproject.toml index e30be999e..d1c89cf18 100644 --- a/packages/fairchem-applications-AdsorbML/pyproject.toml +++ b/packages/fairchem-applications-AdsorbML/pyproject.toml @@ -18,6 +18,9 @@ source = "vcs" root = "../../" git_describe_command = 'git describe --tags --match fairchem_applications_adsorbml-*' +[tool.hatch.build] +directory = "../../dist-applications-adsorbml" + [tool.hatch.build.targets.sdist] sources = ["src"] only-include = ["src/fairchem/applications/AdsorbML"] diff --git a/packages/fairchem-core/pyproject.toml b/packages/fairchem-core/pyproject.toml index 1f6931ee8..b4116d18e 100644 --- a/packages/fairchem-core/pyproject.toml +++ b/packages/fairchem-core/pyproject.toml @@ -46,7 +46,7 @@ root = "../../" git_describe_command = 'git describe --tags --match fairchem_core-*' [tool.hatch.build] -directory = "../../dist" +directory = "../../dist-core" [tool.hatch.build.targets.sdist] only-include = ["src/fairchem/core", "src/fairchem/experimental"] diff --git a/packages/fairchem-data-oc/pyproject.toml b/packages/fairchem-data-oc/pyproject.toml index f1dfc3080..732da7098 100644 --- a/packages/fairchem-data-oc/pyproject.toml +++ b/packages/fairchem-data-oc/pyproject.toml @@ -19,7 +19,7 @@ root = "../../" git_describe_command = 'git describe --tags --match fairchem_data_oc-*' [tool.hatch.build] -directory = "../../dist" +directory = "../../dist-data-oc" [tool.hatch.build.targets.sdist] only-include = ["src/fairchem/data/oc"] diff --git a/packages/fairchem-data-om/pyproject.toml b/packages/fairchem-data-om/pyproject.toml index ff9a0f6b8..380101301 100644 --- a/packages/fairchem-data-om/pyproject.toml +++ b/packages/fairchem-data-om/pyproject.toml @@ -26,6 +26,9 @@ source = "vcs" root = "../../" git_describe_command = 'git describe --tags --match fairchem_data_om-*' +[tool.hatch.build] +directory = "../../dist-data-om" + [tool.hatch.build] directory = "../../dist" diff --git a/packages/fairchem-demo-ocpapi/pyproject.toml b/packages/fairchem-demo-ocpapi/pyproject.toml index 3c27fcb71..6ec42c451 100644 --- a/packages/fairchem-demo-ocpapi/pyproject.toml +++ b/packages/fairchem-demo-ocpapi/pyproject.toml @@ -43,7 +43,7 @@ root = "../../" git_describe_command = 'git describe --tags --match fairchem_demo_ocpapi-*' [tool.hatch.build] -directory = "../../dist" +directory = "../../dist-demo-ocpapi" [tool.hatch.build.targets.sdist] only-include = ["src/fairchem/demo/ocpapi"]