Skip to content

Fix fire module bugs and update development status classifier#1292

Merged
giswqs merged 2 commits intomasterfrom
fix/fire-module-improvements
Jan 31, 2026
Merged

Fix fire module bugs and update development status classifier#1292
giswqs merged 2 commits intomasterfrom
fix/fire-module-improvements

Conversation

@giswqs
Copy link
Copy Markdown
Member

@giswqs giswqs commented Jan 31, 2026

Summary

This PR fixes several bugs in the new fire module and updates an outdated project classifier.

Bug Fixes

  1. Fix FutureWarning in _apply_client_filters: The filter mask was initialized as a plain Python list ([True] * len(gdf)), which triggers a FutureWarning in pandas 2.x when performing logical operations with DataFrame columns:

    FutureWarning: Logical ops (and, or, xor) between Pandas objects and dtype-less sequences (e.g. list, tuple) are deprecated and will raise in a future version.

    Replaced with pd.Series(True, index=gdf.index) for proper pandas-native boolean indexing.

  2. Add missing duration_max parameter to fire_gdf_from_place: The duration_max filter parameter was present in fire_gdf_from_bbox and search_fires but was missing from fire_gdf_from_place. This caused search_fires(..., duration_max=X) to silently ignore the filter when searching by place name.

  3. Pass duration_max through in search_fires: The search_fires function accepted duration_max but didn't pass it to fire_gdf_from_place, so the filter was silently dropped for place-based searches.

  4. Remove unused import: from shapely.geometry import box was imported in fire_gdf_from_place but never used.

Improvement

  1. Update Development Status classifier: Changed from Development Status :: 2 - Pre-Alpha to Development Status :: 5 - Production/Stable in pyproject.toml to reflect the project's maturity (3,600+ stars, 200+ releases).

- Fix FutureWarning in _apply_client_filters: replace plain list mask with
  pd.Series to avoid pandas deprecation warning for logical ops between
  DataFrames and dtype-less sequences
- Add missing duration_max parameter to fire_gdf_from_place, which was
  present in fire_gdf_from_bbox and search_fires but silently dropped
  when searching by place name
- Pass duration_max through in search_fires when calling fire_gdf_from_place
- Remove unused shapely.geometry.box import from fire_gdf_from_place
- Update Development Status classifier from '2 - Pre-Alpha' to
  '5 - Production/Stable' to reflect the project's maturity
Copilot AI review requested due to automatic review settings January 31, 2026 06:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes critical bugs in the newly added fire module that prevented proper filtering functionality and caused deprecation warnings with pandas 2.x. It also updates the project's development status classifier.

Changes:

  • Fixed FutureWarning in _apply_client_filters by replacing plain list mask with pandas Series
  • Added missing duration_max parameter to fire_gdf_from_place and wired it through search_fires
  • Removed unused shapely import and updated error message
  • Updated development status from Pre-Alpha to Production/Stable

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
leafmap/fire.py Fixed FutureWarning by using pandas Series for boolean mask; added missing duration_max parameter throughout the call chain; removed unused shapely import
pyproject.toml Updated Development Status classifier from Pre-Alpha to Production/Stable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 31, 2026

@github-actions github-actions bot temporarily deployed to pull request January 31, 2026 06:42 Inactive
@giswqs giswqs merged commit e225961 into master Jan 31, 2026
16 checks passed
@giswqs giswqs deleted the fix/fire-module-improvements branch January 31, 2026 14:56
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