Skip to content

Fix dataset field not included in API payload#11

Merged
enaboapps merged 1 commit intomasterfrom
fix/dataset-field-1
Feb 16, 2026
Merged

Fix dataset field not included in API payload#11
enaboapps merged 1 commit intomasterfrom
fix/dataset-field-1

Conversation

@enaboapps
Copy link
Owner

@enaboapps enaboapps commented Feb 16, 2026

Summary

  • Add dataset field to LogEntry, LogEntryDict, and TimberlogsConfig
  • Include dataset in to_dict() serialization and _build_log_payload()
  • Add dataset parameter to create_timberlogs() factory
  • Entry-level dataset overrides config-level dataset

Closes #1

Test plan

  • All 26 existing tests pass

Summary by CodeRabbit

Release Notes

  • New Features
    • Added dataset support to the logging client, enabling logs to be organized by dataset.
    • Dataset can be configured at the client level and overridden on a per-log basis for flexible organization.

- Add dataset field to LogEntry, LogEntryDict, and TimberlogsConfig
- Include dataset in LogEntry.to_dict() serialization
- Include dataset in _build_log_payload() with config-level default
- Add dataset parameter to create_timberlogs() factory
- Entry-level dataset overrides config-level dataset

Closes #1

🤖 Auto-generated
@enaboapps enaboapps added this to the v1.1.0 milestone Feb 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

This PR adds comprehensive dataset field support to the logging pipeline. The dataset field is introduced to LogEntry, LogEntryDict, and TimberlogsConfig in types.py, and wired into create_timberlogs and _build_log_payload in client.py, allowing dataset specification at config and entry levels.

Changes

Cohort / File(s) Summary
Type definitions
timberlogs/types.py
Added optional dataset: Optional[str] field to LogEntryDict TypedDict, LogEntry dataclass (with to_dict() serialization), and TimberlogsConfig dataclass.
Client initialization and payload building
timberlogs/client.py
Extended create_timberlogs() to accept dataset parameter and pass it to TimberlogsConfig. Updated _build_log_payload() to conditionally inject dataset from config when absent from entry payload.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A dataset field, so neat and true,
Now flows through logs, both old and new.
From config down to entry's call,
The payload captures dataset for all! 🌲

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main fix: adding the dataset field to the API payload.
Linked Issues check ✅ Passed All objectives from issue #1 are met: dataset added to TimberlogsConfig, included in _build_log_payload with config-level defaults, entry-level overrides implemented, and types.py/client.py modified accordingly.
Out of Scope Changes check ✅ Passed All changes are directly focused on implementing dataset field support across LogEntry, TimberlogsConfig, and payload construction as specified in the linked issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/dataset-field-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@enaboapps enaboapps merged commit 11860a8 into master Feb 16, 2026
1 check passed
@enaboapps enaboapps deleted the fix/dataset-field-1 branch February 16, 2026 10:18
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.

Fix dataset field not included in API payload

2 participants