Workstream F: CI hardening, packaging, exceptions, loader dedup (C3/P1/T1/B3/B4) - #1
Merged
Merged
Conversation
…der dedup C3 — Remove `continue-on-error: true` from mypy CI step; gate is now required (mypy already reports 0 errors across 141 source files). P1 — Update pyproject.toml to SPDX license string (`license = "MIT"`), remove deprecated License trove classifier, bump setuptools requirement to >=77.0. Eliminates both setuptools deprecation warnings emitted by `python -m build`. T1 — Add `tests/uq/conftest.py` with `collect_ignore` driven by import probe so bare `pytest` collection is error-free when `uncertainty_quantification_physical_reasoning` is absent. B3 — Add `src/prkit/core/exceptions.py` with `PRKitError` base and focused subclasses (`UnknownModelError`, `ModelClientError`, `ConfigError`, `DatasetError`). Dual-inherit matching builtins for backward compatibility. Wire `UnknownModelError` into both raise sites in `factory.py`. Re-export all public types from `prkit.core`. Add `tests/prkit/core/test_exceptions.py`. B4 — Add `DOMAIN_MAPPING` base property and `_map_domain()` helper to `BaseDatasetLoader`. Replace inline `DOMAIN_MAPPING.get(domain, OTHER)` idiom in `phyx_loader`, `phybench_loader`, and `tpbench_loader`. Add `tests/prkit/datasets/loaders/test_base_loader_map_domain.py`. Also included: `OpenAIModel` and `OllamaModel` custom-endpoint and explicit-auth params, remote-safe Ollama preflight, DatasetHub fixes, parse/inference consolidation, extended test coverage for model clients and hub, and updated CHANGELOG/CORE/DATASETS/RELEASE_NOTES. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…init New openai>=1.99.9 validates credentials at OpenAI() constructor time, so any test that directly instantiates a model client or LLM judge comparator fails in CI where no API keys are set. Add autouse fixtures and @patch decorators across four test files to intercept the SDK before it touches credentials. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t_llm Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sherryzyh
added a commit
that referenced
this pull request
Jun 14, 2026
Workstream F: CI hardening, packaging, exceptions, loader dedup (C3/P1/T1/B3/B4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
continue-on-error: truefrom the mypy step. mypy already passes clean (0 errors, 141 files); the gate is now required.license = {text = "MIT"}table with SPDX string; remove redundant License trove classifier; bump setuptools to>=77.0. Clears both deprecation warnings frompython -m build.tests/uq/conftest.pywith import-probecollect_ignoreso barepytestno longer errors whenuncertainty_quantification_physical_reasoningis absent (4 files go from erroring to gracefully skipped).src/prkit/core/exceptions.pywithPRKitErrorbase andUnknownModelError(PRKitError, ValueError),ModelClientError(PRKitError, RuntimeError),ConfigError,DatasetError. WireUnknownModelErrorinto the two factoryraise ValueErrorsites. Re-export fromprkit.core. All existingpytest.raises(ValueError)assertions remain green via dual inheritance.DOMAIN_MAPPINGbase property and_map_domain()helper toBaseDatasetLoader. Replace copy-pastedDOMAIN_MAPPING.get(domain, PhysicsDomain.OTHER)idiom inphyx_loader,phybench_loader, andtpbench_loader.Also bundled (pre-existing unstaged work):
OpenAIModel/OllamaModelcustom endpoint + explicit auth paramsConnectionErrorfor remote hosts)DatasetHubregistration-ordering fix and extended hub testsparse.py/calls.pyJSON-extraction consolidationTest plan
python -m mypy src/prkit→Success: no issues found in 141 source filespython -m pytest tests/prkit -q→ 1318 passed, 83.66% coverage (≥60% gate)python -m pytest --collect-only -q→ 0 collection errorspython -m build 2>&1 | grep -i 'deprecat\|license'→ no license warnings🤖 Generated with Claude Code