Skip to content

Commit 74454bf

Browse files
committed
refactor: switch to pdm build skills
1 parent 2140c60 commit 74454bf

10 files changed

Lines changed: 23 additions & 20 deletions

File tree

contrib/bubseek-marimo/pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ dependencies = [
1717
marimo = "bubseek_marimo.plugin"
1818

1919
[build-system]
20-
requires = ["pdm-backend", "pdm-build-bub>=0.1.0a1"]
20+
requires = ["pdm-backend", "pdm-build-skills>=0.1.0a3"]
2121
build-backend = "pdm.backend"
2222

2323
[tool.pdm.build]
2424
package-dir = "src"
25-
includes = ["src/bubseek_marimo", "src/bub_skills"]
26-
source-include = ["src/bub_skills/marimo/SKILL.md"]
27-
28-
[tool.bub]
25+
includes = ["src/bubseek_marimo", "src/skills"]
26+
source-include = ["src/skills/marimo/SKILL.md"]
2927
skills = [
3028
{ git = "https://github.com/marimo-team/skills.git", subpath = "skills", include = ["add-molab-badge", "anywidget", "implement-paper", "marimo-batch", "marimo-notebook", "wasm-compatibility"] },
3129
]
File renamed without changes.

contrib/bubseek-marimo/src/bub_skills/marimo/__init__.py renamed to contrib/bubseek-marimo/src/skills/marimo/__init__.py

File renamed without changes.

contrib/bubseek-marimo/src/bub_skills/marimo/references/marimo-conventions.md renamed to contrib/bubseek-marimo/src/skills/marimo/references/marimo-conventions.md

File renamed without changes.

docs/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ When `BUB_TAPESTORE_SQLALCHEMY_URL` is unset, bubseek builds a SeekDB/OceanBase
8080

8181
## Builtin skills
8282

83-
Builtin skill source files live in `src/bub_skills/`. They are packaged into `bub_skills/` in the wheel, which Bub already knows how to discover. Users do not need to run a separate sync command for them.
83+
Builtin skill source files live in `src/skills/`. They are packaged into `skills/` in the wheel, which Bub already knows how to discover. Users do not need to run a separate sync command for them.
8484

85-
bubseek also vendors `friendly-python` and `piglet` from [PsiACE/skills](https://github.com/PsiACE/skills) at build time via `pdm-build-bub`; these are merged into the wheel under `bub_skills/`.
85+
bubseek also vendors `friendly-python` and `piglet` from [PsiACE/skills](https://github.com/PsiACE/skills) at build time via `pdm-build-skills`; these are merged into the wheel under `skills/`.
8686

8787
The optional `bubseek[marimo]` extra provides:
8888
- **MarimoChannel** — inbound WebSocket for gateway; chat dashboard at `http://0.0.0.0:2718/`
@@ -97,14 +97,14 @@ Run `bubseek gateway --enable-channel marimo` to enable the marimo dashboard.
9797

9898
Most users can skip this section.
9999

100-
If you are building your own downstream Bub distribution and want to vendor remote skill repositories at build time, use `pdm-build-bub`:
100+
If you are building your own downstream Bub distribution and want to vendor remote skill repositories at build time, use `pdm-build-skills`:
101101

102102
```toml
103103
[build-system]
104-
requires = ["pdm-backend", "pdm-build-bub>=0.1.0a1"]
104+
requires = ["pdm-backend", "pdm-build-skills>=0.1.0a3"]
105105
build-backend = "pdm.backend"
106106

107-
[tool.bub]
107+
[tool.pdm.build]
108108
skills = [
109109
{ git = "PsiACE/skills", subpath = "skills", include = ["friendly-python", "piglet"] },
110110
{ git = "https://github.com/example/skills.git", ref = "v1.2.3", subpath = "skills/review" },

docs/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ uv run pytest tests
4242
make build
4343
```
4444

45-
The wheel includes builtin skills from `bub_skills/`.
46-
The source files for those builtin skills live in `src/bub_skills/`.
45+
The wheel includes builtin skills from `skills/`.
46+
The source files for those builtin skills live in `src/skills/`.
4747

4848
## Docs
4949

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ dev = [
6262
]
6363

6464
[build-system]
65-
requires = ["pdm-backend", "pdm-build-bub>=0.1.0a2"]
65+
requires = ["pdm-backend", "pdm-build-skills>=0.1.0a3"]
6666
build-backend = "pdm.backend"
6767

6868
[tool.pdm.build]
6969
includes = [
7070
"src/bubseek",
71-
"src/bub_skills",
71+
"src/skills",
7272
]
73-
74-
# Build-time: vendor remote skills into bub_skills/ (merged with src/bub_skills)
75-
[tool.bub]
7673
skills = [
7774
{ git = "https://github.com/PsiACE/skills.git", subpath = "skills", include = ["friendly-python", "piglet"] },
7875
]

tests/test_bubseek.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,28 @@ def test_pyproject_pins_bub_and_bundled_plugins() -> None:
5050
assert sources["bub-feishu"].get("git") == "https://github.com/bubbuild/bub-contrib.git"
5151
requires = data["build-system"]["requires"]
5252
assert "pdm-backend" in requires
53-
assert any("pdm-build-bub" in r for r in requires)
53+
assert any("pdm-build-skills" in r for r in requires)
5454

5555

5656
def test_pyproject_includes_builtin_skills_in_wheel() -> None:
5757
data = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8"))
5858

5959
assert data["tool"]["pdm"]["build"]["includes"] == [
6060
"src/bubseek",
61-
"src/bub_skills",
61+
"src/skills",
62+
]
63+
skills = data["tool"]["pdm"]["build"]["skills"]
64+
assert skills == [
65+
{
66+
"git": "https://github.com/PsiACE/skills.git",
67+
"subpath": "skills",
68+
"include": ["friendly-python", "piglet"],
69+
}
6270
]
6371

6472

6573
def test_bundled_skills_have_valid_frontmatter() -> None:
66-
skill_root = REPO_ROOT / "src" / "bub_skills"
74+
skill_root = REPO_ROOT / "src" / "skills"
6775
skill_names = []
6876

6977
for skill_dir in sorted(path for path in skill_root.iterdir() if path.is_dir()):

0 commit comments

Comments
 (0)