Skip to content

Commit 81d2216

Browse files
authored
Fix PyPI publish workflow and wheel build (#322)
* Fix PyPI publish workflow and wheel build * Avoid duplicate wheel entries while keeping assets * Restore dtreeviz release note
1 parent 89d9913 commit 81d2216

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/upload_to_pypi.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
jobs:
66
pypi:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
811
steps:
912
- name: Checkout
1013
uses: actions/checkout@v3
@@ -31,5 +34,3 @@ jobs:
3134
python3 -m build
3235
- name: Publish package
3336
uses: pypa/gh-action-pypi-publish@release/v1
34-
with:
35-
password: ${{ secrets.PYPI_TOKEN }}

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- **XGBoost SHAP initialization**: Fixed `base_score` conversion in both `get_params()` and booster's internal JSON configuration to ensure SHAP TreeExplainer initializes correctly with XGBoost 3.1+
2323
- **RandomForest dtreeviz compatibility**: Fixed dtype handling for `y_train` (now uses `int` instead of `int16`) and observation array conversion for `predict_path()` to work with newer dtreeviz versions
2424
- **Dtreeviz decisiontree_view**: Ensure observations are passed as numpy arrays to avoid pandas label lookup errors when dtreeviz indexes features by integer position
25+
- **PyPI packaging**: Removed duplicate wheel entries from hatchling build config to fix "Duplicate filename in local headers" upload errors
2526
- **Pandas deprecation warnings**: Removed deprecated `pd.option_context("future.no_silent_downcasting")` and `copy=False` parameter from `.infer_objects()` calls
2627
- **Runtime warnings**: Fixed divide-by-zero warnings in classification plots and residuals plots (log-ratio calculations) by adding proper zero checks and using `np.divide()` with `where` parameter
2728

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,12 @@ include = [
122122
]
123123

124124
[tool.hatch.build.targets.wheel]
125-
# Ensures package data within the 'explainerdashboard' package is included in the wheel.
126-
# Hatchling typically includes all files within the package directory that are tracked by VCS.
127-
# force-include makes this explicit for critical data files.
128-
# The path on the left is relative to project root (source), path on the right is relative to wheel root (target).
125+
# Ensure non-Python assets ship in wheels while avoiding duplicate archive entries.
126+
exclude = [
127+
"/explainerdashboard/assets/**",
128+
"/explainerdashboard/datasets/**",
129+
"/explainerdashboard/static/**",
130+
]
129131

130132
[tool.hatch.build.targets.wheel.force-include]
131133
"explainerdashboard/assets" = "explainerdashboard/assets"

0 commit comments

Comments
 (0)