Skip to content

Conversation

@sca075
Copy link
Owner

@sca075 sca075 commented Dec 20, 2025

Expose FloorData and TrimsData types in library init.py

Summary by CodeRabbit

  • New Features

    • Two additional map-related data types are now publicly exposed for integrations and tooling.
    • Multi-floor support improved: current floor selection and per-floor trims are applied when multi-floor data is present.
  • Bug Fixes

    • Snapshot behavior refined: snapshot enablement no longer toggled implicitly and only changes when explicitly updated.
  • Chores

    • Package version updated to 0.1.14

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Sandro Cantarella <sandro@Sandros-Mac-mini.fritz.box>
Signed-off-by: Sandro Cantarella <sandro@79f3d049-9006-400d-9954-2e5dcd250fa9.fritz.box>
Signed-off-by: Sandro Cantarella <sandro@Sandros-Mac-mini.fritz.box>
Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
…it bump version in pyproject.toml added to __init__.py Trims and Floor Data

Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
@sca075 sca075 self-assigned this Dec 20, 2025
@sca075 sca075 added the enhancement New feature or request label Dec 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

📝 Walkthrough

Walkthrough

Bumps package version to 0.1.14, exposes FloorData and TrimsData from the top-level package and type-name catalog, and changes shared config handling to prefer floors_data (selecting current floor and applying its trims) while retaining a fallback to legacy trims_data and consistent current_floor assignment.

Changes

Cohort / File(s) Summary
Version bump
SCR/valetudo_map_parser/__init__.py, pyproject.toml, SCR/__init__.py
Package and module version updated to 0.1.14.
Public exports / types
SCR/valetudo_map_parser/__init__.py
Imported FloorData and TrimsData from .config.types; added both to __all__ and to the public type-name exposure used by get_default_font_path.
Shared config logic
SCR/valetudo_map_parser/config/shared.py
update_shared_data now handles floors_data: when present, selects current_floor, sets instance current_floor, and applies floor-specific trims via floor_trims; when absent, falls back to legacy trims_data and resets current_floor to floor_0. Restoration path preserves backward compatibility; enable_snapshots handling is unchanged from the new conditional flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I nibble at code and hop in light,
Floors and trims now set just right.
Versions lifted, types set free,
A tidy change for maps to be.
🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main change: exposing FloorData and TrimsData types in the library's init.py. It is concise, clear, and accurately summarizes the primary objective of the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ 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 dev_main

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb056f4 and 4e21656.

📒 Files selected for processing (1)
  • SCR/valetudo_map_parser/config/shared.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • SCR/valetudo_map_parser/config/shared.py

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between acc0393 and 0d4f63c.

📒 Files selected for processing (3)
  • SCR/valetudo_map_parser/__init__.py (3 hunks)
  • SCR/valetudo_map_parser/config/shared.py (0 hunks)
  • pyproject.toml (1 hunks)
💤 Files with no reviewable changes (1)
  • SCR/valetudo_map_parser/config/shared.py
🧰 Additional context used
🧬 Code graph analysis (1)
SCR/valetudo_map_parser/__init__.py (1)
SCR/valetudo_map_parser/config/types.py (2)
  • FloorData (347-363)
  • TrimsData (289-343)
🔇 Additional comments (2)
pyproject.toml (1)

3-3: Version bump looks good.

The version increment to 0.1.14 is consistent with the module version in __init__.py.

SCR/valetudo_map_parser/__init__.py (1)

2-2: Version bump is consistent.

The module version correctly matches the version in pyproject.toml.

Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
…ses old key trims_data

Signed-off-by: SCA075 <82227818+sca075@users.noreply.github.com>
@sca075 sca075 merged commit 2521d9e into main Dec 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants