Skip to content

Only support separate geoms, items sequences in STRtree constructor#1172

Merged
sgillies merged 1 commit intoshapely:masterfrom
jorisvandenbossche:strtree-constructor
Jul 26, 2021
Merged

Only support separate geoms, items sequences in STRtree constructor#1172
sgillies merged 1 commit intoshapely:masterfrom
jorisvandenbossche:strtree-constructor

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

@jorisvandenbossche jorisvandenbossche commented Jul 17, 2021

Another follow-up on #1112. See my comment at #1112 (comment) about supporting zipped geoms/items sequence vs only supporting separate sequences.

Assuming the zipped sequences in #1112 were a left-over from the initial version of that PR, this PR updates the STRtree constructor (and tests) to:

  • only support separate sequences as STRtree(geoms, items), and thus no longer supports STRtree(zip(geoms, items))
  • also removed support for STRtree(None). This didn't work before in released versions, and IMO it's cleaner to keep requiring geoms to be a sequence (it can still be an empty sequence)

If the intention is to mainly support the separate sequences, I would personally not support the zipped sequences (i.e. sequence tuples) to keep the interface simple and explicit.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 17, 2021

Coverage Status

Coverage remained the same at 85.286% when pulling dc7e38a on jorisvandenbossche:strtree-constructor into a228836 on Toblerity:master.

Copy link
Copy Markdown
Contributor

@sgillies sgillies left a comment

Choose a reason for hiding this comment

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

Thank you @jorisvandenbossche !

@sgillies sgillies merged commit c6dc6f6 into shapely:master Jul 26, 2021
@jorisvandenbossche jorisvandenbossche deleted the strtree-constructor branch August 3, 2021 07:16
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.

3 participants