Skip to content

Initialize bcbench-core workspace package - #914

Open
Sun Haoran (haoranpb) wants to merge 1 commit into
chore/bump-tyfrom
core/stack-01-package-skeleton
Open

Sun Haoran (haoranpb) wants to merge 1 commit into
chore/bump-tyfrom
core/stack-01-package-skeleton

Conversation

@haoranpb

@haoranpb Sun Haoran (haoranpb) commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Stack 1 of the bcbench-core extraction, stacked on #915 (ty and uv bumps). The repository becomes a two-project uv workspace: the bcbench application stays at the root and depends on a new, intentionally empty bcbench-core library. Code moves in later PRs; this one only establishes packaging and the library boundary.

  • Packaging: both projects build with uv_build (src/ layout, SPDX license metadata). For the app this replaces setuptools and its package-data patterns: every file under src/bcbench now ships, and stale modules from a leftover build/ directory no longer do. Core adds a py.typed marker and is marked Private :: Do Not Upload until we decide to publish.
  • Ruff: core owns the lint baseline; the root config extends it and redefines only application settings (jinja2 bans, per-file ignores). Resolved settings for app, test, and command files are unchanged. Core additionally bans bcbench imports, os.environ/os.getenv, and dotenv.
  • ty: core is checked with every rule as an error. The hook uses uv check --package bcbench-core, which enables ty's uv integration so missing-direct-dependency rejects imports core does not declare. The app's ty config excludes packages/.

uv.lock contains only the workspace changes.

Deferred:

  • Core tests and pytest wiring arrive with the first moved code. Root tests import tests.conftest, so a second tests/ tree needs an import-mode decision then.
  • Publishing and versioning policy.

@haoranpb
Sun Haoran (haoranpb) force-pushed the core/stack-01-package-skeleton branch from 769896b to a0999e8 Compare October 2, 2026 10:35
@haoranpb
Sun Haoran (haoranpb) changed the base branch from main to chore/bump-ty October 2, 2026 10:35
@haoranpb
Sun Haoran (haoranpb) force-pushed the core/stack-01-package-skeleton branch from a0999e8 to 61750b0 Compare October 2, 2026 10:35
@haoranpb
Sun Haoran (haoranpb) added this pull request to stack #916 October 2, 2026 10:39
Add packages/bcbench-core as a uv workspace member consumed by the bcbench
application. The package is empty: it establishes packaging and boundary
enforcement before code moves in later stacked PRs.

- Both projects build with uv_build (src layout, PEP 639 license metadata);
  the app no longer needs setuptools package-data rules
- Core ships a PEP 561 py.typed marker
- Core owns the ruff baseline and bans bcbench imports and environment reads;
  the app extends it with application-only settings
- ty checks core with all rules as errors through `uv check`, which enables
  the uv integration that missing-direct-dependency requires

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3fa47b3c-f5d6-4c36-9be3-c4fdf2bebe47
@haoranpb
Sun Haoran (haoranpb) force-pushed the core/stack-01-package-skeleton branch from 61750b0 to 16209b3 Compare October 2, 2026 10:58
@haoranpb
Sun Haoran (haoranpb) marked this pull request as ready for review October 2, 2026 11:19
Copilot AI balanced review requested due to automatic review settings October 2, 2026 11:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The build-backend migration and preview type-check hook still need runtime validation before approval.

Review effort: Balanced
Findings: None

What changed in this PR

Establishes an empty bcbench-core library as the first step in extracting reusable evaluation components from BC-Bench. No application code moves yet.

Changes:

  • Creates a two-project uv workspace and switches both packages to uv_build.
  • Moves the Ruff baseline into core and adds library-boundary checks.
  • Documents the workspace and adds a strict core type-check hook.
File Description
uv.lock Records workspace membership and the core dependency.
pyproject.toml Configures app packaging, workspace wiring, and inherited lint settings.
packages/​bcbench-core/​src/​bcbench_core/​py.typed Marks core as typed.
packages/​bcbench-core/​src/​bcbench_core/​__init__.py Creates the empty importable package.
packages/​bcbench-core/​README.md Defines library boundaries and development commands.
packages/​bcbench-core/​pyproject.toml Defines packaging, lint rules, and strict type checking.
packages/​bcbench-core/​LICENSE Adds the library’s MIT license.
CONTRIBUTING.md Explains the workspace structure.
.pre-commit-config.yaml Adds the core type-check hook.
.github/​copilot-instructions.md Documents core boundaries and lint configuration ownership.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haoranpb

Copy link
Copy Markdown
Collaborator Author

Test run triggered for code-review category from this branch: https://github.com/microsoft/BC-Bench/actions/runs/37001221393

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants