Skip to content

Refactor RasterLayer by introducing PropertyLayer abstraction with ba…#321

Open
Manish219864 wants to merge 2 commits intomesa:mainfrom
Manish219864:property-layer-refactor
Open

Refactor RasterLayer by introducing PropertyLayer abstraction with ba…#321
Manish219864 wants to merge 2 commits intomesa:mainfrom
Manish219864:property-layer-refactor

Conversation

@Manish219864
Copy link
Copy Markdown

Summary

This PR refactors RasterLayer by introducing a PropertyLayer abstraction to separate raster data handling from spatial grid logic.

Motivation

RasterLayer currently mixes spatial logic and raster attribute management.
This refactor improves modularity, readability, and maintainability.

Changes

  • Added PropertyLayer class
  • Delegated raster operations to PropertyLayer
  • Maintained backward compatibility
  • Added unit tests for PropertyLayer

Testing

  • Added tests/test_property_layer.py
  • All tests passing using pytest

Backward Compatibility

Maintained full compatibility with existing RasterLayer API.

Notes

This refactor prepares the codebase for future raster feature enhancements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d640143-30e1-40df-a816-923f70bacefb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Manish219864
Copy link
Copy Markdown
Author

Hi maintainers

This PR introduces a PropertyLayer abstraction to separate raster data handling from spatial grid logic in RasterLayer.

Highlights

  • Introduced PropertyLayer abstraction
  • Delegated raster operations
  • Maintained backward compatibility
  • Added unit tests
  • All tests passing locally

Please let me know if any changes or improvements are required.
Happy to iterate further!

Thanks for your time and review

@codebreaker32
Copy link
Copy Markdown
Contributor

see #310 (comment)

@Manish219864
Copy link
Copy Markdown
Author

Thanks for pointing me to #310 — I reviewed the previous discussion.

I understand that this refactor touches a broader architectural direction, especially around:

  • Cell identity semantics
  • Decoupling Cell from Agent
  • Long-term PropertyLayer design

My current PR focuses on introducing the PropertyLayer abstraction while keeping the existing API intact. I'm happy to adjust the approach based on the maintainers’ preferred direction.

Looking forward to your feedback.

@codebreaker32
Copy link
Copy Markdown
Contributor

Please read the comment.

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