Skip to content

Commit 814c798

Browse files
committed
simplify workflow
1 parent 8d6b1f6 commit 814c798

File tree

2 files changed

+9
-58
lines changed

2 files changed

+9
-58
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,17 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
python -m pip install build hatch hatch-jupyter-builder
25+
python -m pip install hatch hatch-jupyter-builder
2626
27-
- name: Build the package with Hatch
27+
- name: Build the widget JS
2828
run: |
29-
hatch build
29+
npm ci
30+
npm run build
3031
31-
- name: Create GitHub release
32-
uses: softprops/action-gh-release@v2
33-
with:
34-
files: dist/*
35-
generate_release_notes: true
32+
- name: Build Python package
33+
run: hatch build
3634

37-
- name: Publish package to PyPI (using trusted publisher)
35+
- name: Publish package to PyPI
3836
uses: pypa/gh-action-pypi-publish@release/v1
3937
with:
4038
packages-dir: dist/

pyproject.toml

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,11 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "widget-optimade-client"
7-
version = "0.1.0"
7+
version = "0.0.4"
88
description = "A Jupyter widget for querying OPTIMADE-compatible providers"
99
readme = "README.md"
1010
requires-python = ">=3.8"
11-
keywords = ["jupyter", "anywidget", "optimade", "materials", "science"]
12-
classifiers = [
13-
"Development Status :: 4 - Beta",
14-
"Framework :: Jupyter",
15-
"Programming Language :: Python :: 3",
16-
"Programming Language :: Python :: 3.8",
17-
"Programming Language :: Python :: 3.9",
18-
"Programming Language :: Python :: 3.10",
19-
"Topic :: Scientific/Engineering :: Chemistry",
20-
]
2111
dependencies = ["traitlets>=5.0", "anywidget>=0.2"]
2212

23-
[project.urls]
24-
Home = "https://github.com/materialscloud-org/tools-optimadeclient-react"
25-
Source = "https://github.com/materialscloud-org/tools-optimadeclient-react"
26-
27-
[project.optional-dependencies]
28-
dev = ["jupyterlab", "notebook", "watchfiles", "pytest", "black"]
29-
30-
[tool.hatch.envs.default]
31-
features = ["dev"]
32-
33-
# Build configuration
3413
[tool.hatch.build]
35-
only-packages = true
36-
artifacts = ["widget-dist/*"]
37-
38-
[tool.hatch.build.hooks.jupyter-builder]
39-
build-function = "hatch_jupyter_builder.npm_builder"
40-
ensured-targets = ["widget-dist/optimade_widget.js"]
41-
skip-if-exists = ["widget-dist/optimade_widget.js"]
42-
dependencies = ["hatch-jupyter-builder>=0.5.0"]
43-
44-
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
45-
npm = "npm"
46-
build_cmd = "build"
47-
48-
# Optional: automatic version bumping
49-
[tool.bumpver]
50-
current_version = "v0.1.0"
51-
version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]"
52-
commit_message = "Bump version {old_version} -> {new_version}"
53-
commit = true
54-
tag = true
55-
push = true
56-
57-
[tool.bumpver.file_patterns]
58-
"pyproject.toml" = [
59-
'version = "{pep440_version}"',
60-
'current_version = "{version}"'
61-
]
14+
targets = { wheel = { packages = ["optimadewidget"], artifacts = ["widget-dist/*"] } }

0 commit comments

Comments
 (0)