Skip to content

[pre-commit] Add license header hook for XML files (closes #1994)#2024

Closed
Subham-KRLX wants to merge 19 commits into
apache:masterfrom
Subham-KRLX:xml-license-hook
Closed

[pre-commit] Add license header hook for XML files (closes #1994)#2024
Subham-KRLX wants to merge 19 commits into
apache:masterfrom
Subham-KRLX:xml-license-hook

Conversation

@Subham-KRLX
Copy link
Copy Markdown
Contributor

Did you read the Contributor Guide?

Is this PR related to a ticket?

What changes were proposed in this PR?

  • Added XML file support to pre-commit license header hook
  • Followed existing implementation patterns (same as Scala/Java hooks)
  • Uses XML comment style: <!--| ~| -->

How was this patch tested?

  • Created test XML file and verified license header insertion
  • Ran pre-commit run insert-license --files test.xml
  • Confirmed output matches Apache license format

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation

Comment thread .pre-commit-config.yaml
@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbampton Addressed your feedback:

Removed blank lines
Tested hooks locally
PR is ready for review. Thanks!

@Subham-KRLX Subham-KRLX requested a review from jbampton June 28, 2025 03:09
@jbampton
Copy link
Copy Markdown
Member

@jbampton Addressed your feedback:

Removed blank lines Tested hooks locally PR is ready for review. Thanks!

See the Files changed tab at the next link. You still need to remove the extra blank lines

https://github.com/apache/sedona/pull/2024/files

@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbampton Thank you for your review - I've now:

  1. Removed all blank lines and trailing whitespace
  2. Verified the file ends cleanly with the oxipng configuration
  3. Confirmed the changes locally and in the GitHub diff

The PR is ready for your final review. I appreciate your guidance throughout this process!

Comment thread .pre-commit-config.yaml
@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbangton I've addressed your feedback in the latest commit. Could you please review again?

Comment thread docker/zeppelin/conf/zeppelin-site.xml
@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbampton Thank you for your patient guidance throughout this PR! I've now:
✅ Removed duplicate license headers in zeppelin-site.xml
✅ Verified with xmllint and grep
✅ Ensured clean XML structure
Your feedback has been invaluable in helping me improve this contribution. The PR is now ready for your final review.

@jbampton jbampton requested a review from james-willis June 28, 2025 05:05
@Subham-KRLX Subham-KRLX requested a review from jbampton June 28, 2025 05:29
Comment thread .licenseignore Outdated
Copy link
Copy Markdown
Contributor

@AmirTallap AmirTallap left a comment

Choose a reason for hiding this comment

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

As mention, file path should be ordered alphabetically!

@Subham-KRLX Subham-KRLX requested a review from AmirTallap June 28, 2025 06:53
@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

As mention, file path should be ordered alphabetically!

@AmirTallap Verified the alphabetical order using diff against sorted output - confirmed correct in 4106b68. Thank you for your review!

@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbampton @james-willis This PR removes the insert-license-xml hook while keeping all other license hooks. The CI failures appear unrelated (Maven shade plugin issues). Let me know if you want any changes to this otherwise it's ready for review.

@james-willis
Copy link
Copy Markdown
Collaborator

? What does this PR accomplish now.

zhangfengcdt and others added 15 commits July 17, 2025 08:52
…ce it (apache#2080)

* Store geometries in EWKB format in spark df and enforce it

* Use wkb.dumps instead of to_wkb for version compatibility

* print shapely version

* Use crs instead of shapely.get_srid

* Convert back to Sedona geometry objects in to_parquet

* Change to **kwargs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Implement retain index information in results of queries

* Update comment
…#2071)

* Implement get_geometry

* Skip test for old versions

* Support extra-negative indices

* Skip test for shapely < 2.0.0

* Update docs to mention the shapely < 2.0.0 behavior
* Implement boundary

* Implement centroid

* Implement envelope

* Skip boundary test for geom collection for shapely < 2.0.0

* Fix doc strings to use sedona instead of geoseries

* Support na values in to_geopandas
* standing up blog infra

* remove TODO typo

* adding avatar placeholder

* fixing formatting

* adding license

* adding license

* remove

* changing linter

* format fix for yml

* editing author avatars
* ExpandAddress and ParseAddess support via libpostal

* PR comments; edge case in SedonaConf changes

* Update spark/common/src/test/scala/org/apache/sedona/sql/AddressProcessingFunctionsTest.scala

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/sedona/spark/sql/st_functions.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update spark/common/src/test/java/org/apache/sedona/core/utils/SedonaConfTest.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update spark/common/src/test/scala/org/apache/sedona/sql/AddressProcessingFunctionsTest.scala

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* align null case logic between eval and codegen cases

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s, Projection (apache#2051)

* Create object of S2Geography, and implement PoinGeography with its encoder/decoder

* Add POLYLINE implementation on S2Geography

* Add POLYGON implements on S2Geography

* Match coding style

* "Apply Spotless formatting to PolylineGeographyTest"

* Redesign of S2Geography

- Import org.datasyslab s2-geometry-library
- Clean up S2Geography abstract design
- Update Encode/Decode inside each kind of geography

* clean up unnecessary files in current branch

* Refine design of EncodeTagged in S2Geography

- Adding back EncodeTagged in S2Geography
- Let each geography type calls its own encode / decode function
- Change to use Kyro UnsafeInput and UnsafeOutput

* Modify encoder() and add new test cases

* clean up code of encode and clarify comments

* Update POLYGON to only take one polygon

* Remove S2Regionwrapper & S2Shapewrapper

* clean up minor issue

* GeographyCollection and ShapeIndexGeography implementation

* comcomment geography kind in S2Geography

* Functions of distance, predicates, projection & Accessors

* fix minor issue of geospatial functions

* format fix

* avoid duplicates before create S2Loop; re init value list with initial value -1
* Implement fillna

* Use sedona instead of geopandas in doc strings

* Add coalesce comment and link for limit issue

* Allow None elements in to_geopandas
…etry_name + refactor tests (apache#2058)

* Implement basic set_geometry and refactor tests

* Skip active_geometry_name for old versions

* Implement rename_geometry and update correct version for active_geometry_name

* Fix version skipping logic in tests

* Clean up

* Fix tests intersection, from_*, and set_geometry after the merge

* Implement rest of logic to pass the crs tests in set_geometry

* clean up

* Fix some tests (all except rename_geometry)

* Fixes to pass tests

* Remove check for option already set

* Clean up unused (commented) setup method
…apache#2099)

* [apacheGH-2066] Fix the Geopandas sindex query method predicate logic

- contains and intersects gets reversed
- add checkes to indicate only support these two types of predicates

* address copilot comments

* fix pre-commit lint issue
* moving title to yml frontmatter

* moving title to yml frontmatter

* shortening title
@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@jbampton @james-willis ,
Latest push addresses previous feedback and resolves all merge conflicts. The branch is now rebased onto the latest apache:master.
Please approve the pending CI workflows to run.

@james-willis
Copy link
Copy Markdown
Collaborator

james-willis commented Jul 17, 2025

This diff is all screwed up. I'm not sure why but its showing the current state of master incorrectly.

@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

@james-willis, Thanks for the heads-up on the diff – you're right it looks pretty messed up.
I also noticed the recent merge to apache:master that includes XML license header support (65d1ee1). It definitely looks like the core of my PR might have been superseded by that.

I will pause here and dig into the master branch to confirm. Apologies for the confusion this caused.

@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

Hi @jbampton, @james-willis, @jiayuasu, @AmirTallap,
Thanks for your thorough reviews,it looks like the XML license header support from this PR was already merged into apache:master with commit 65d1ee1 while I was working on the latest fixes. Given this I will close this PR as superseded. Apologies for the overlapping effort and any confusion.
Appreciate all your help and guidance on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pre-commit: auto insert license headers for XML