Skip to content

feat: introduce DatasetMeta dataclass to reduce parameter explosion#86

Merged
maxine-at-forecast merged 2 commits intodevelopfrom
feature/M2KE-kqvv-phase-2-introduce-datasetmeta-dataclass-to-reduce-c28f
Apr 1, 2026
Merged

feat: introduce DatasetMeta dataclass to reduce parameter explosion#86
maxine-at-forecast merged 2 commits intodevelopfrom
feature/M2KE-kqvv-phase-2-introduce-datasetmeta-dataclass-to-reduce-c28f

Conversation

@maxine-at-forecast
Copy link
Copy Markdown
Contributor

Summary

  • Introduces DatasetMeta dataclass bundling 6 shared metadata fields (name, schema_ref, description, tags, license, metadata) into a single parameter object
  • Index.insert_dataset, Index.write_samples, and all DatasetPublisher.publish* methods now accept an optional meta= keyword
  • Fully backward-compatible: existing flat kwargs still work; explicit kwargs override meta fields
  • Implements Phase 2 of .design/084-architectural-refactoring.md (GH QA: Architectural review — findings and recommendations #84)

Files changed

File Change
src/atdata/dataset_meta.py New module — DatasetMeta dataclass + _resolve_meta() helper
src/atdata/__init__.py Export DatasetMeta
src/atdata/index/_index.py insert_dataset & write_samples accept meta=
src/atdata/atmosphere/records.py All publish* methods accept meta=
src/atdata/repository.py _AtmosphereBackend passes DatasetMeta through
tests/test_dataset_meta.py 23 tests — unit, resolution, and integration

Test plan

  • 23 new tests covering DatasetMeta creation, _resolve_meta merging/override, Index integration, and error cases
  • Full test suite passes (1758 passed)
  • Lint clean on all changed files (ruff check)

Closes CL-4

🤖 Generated with Claude Code

maxine-at-forecast and others added 2 commits April 1, 2026 14:30
…CL-4]

Bundle the six shared metadata fields (name, schema_ref, description,
tags, license, metadata) into a DatasetMeta dataclass. Index.insert_dataset,
Index.write_samples, and all DatasetPublisher.publish* methods now accept
an optional meta= keyword alongside the existing flat kwargs for backward
compatibility. Explicit kwargs override meta fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/atdata/dataset_meta.py 93.75% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant