Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Envelope validation from construction #560

Merged
merged 2 commits into from
Oct 15, 2023

Conversation

peterstace
Copy link
Owner

Description

This change moves Envelope validation out of constructors, and into a separate Validate method. This is similar to the recent changes for regular geometries.

It includes two further small breaking changes, so that all breaking changes are bundled together:

  • The ExtendToIncludeXY method is renamed to ExpandToIncludeXY (to be consistent with ExpandToIncludeEnvelope).

  • The NewEnvelope now accepts a variadic list of XY rather than a slice of XY. This is just a small ergonomic improvement.

Check List

Have you:

  • Added unit tests? Yes.

  • Add cmprefimpl tests? (if appropriate?) N/A

  • Updated release notes? (if appropriate?) Yes.

Related Issue

  • N/A

This change moves Envelope validation out of constructors, and into a
separate `Validate` method. This is similar to the recent changes for
regular geometries.

It includes two further small breaking changes, so that all breaking
changes are bundled together:

- The `ExtendToIncludeXY` method is renamed to `ExpandToIncludeXY` (to
  be consistent with `ExpandToIncludeEnvelope`).

- The `NewEnvelope` now accepts a variadic list of `XY` rather than a
  slice of `XY`. This is just a small ergonomic improvement.
@peterstace peterstace self-assigned this Oct 6, 2023
geom/type_envelope.go Outdated Show resolved Hide resolved
@@ -8,6 +8,17 @@ YYYY-MM-DD

- Simplifies the internal representation of the `Envelope` type.

- **Breaking change**: Renames `Envelope`'s `ExtendToIncludeXY` method to
`ExpandToIncludeXY`. This makes the names of the `ExpandToIncludeXY` and
Copy link
Collaborator

Choose a reason for hiding this comment

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

The name change also better expresses what it's doing.

Base automatically changed from better_nan_handling_in_fastmin_and_fastmax to master October 15, 2023 18:26
Co-authored-by: Albert <26584478+albertteoh@users.noreply.github.com>
@peterstace
Copy link
Owner Author

Thanks for reviewing @albertteoh 🙇

@peterstace peterstace merged commit 594506b into master Oct 15, 2023
1 check passed
@peterstace peterstace deleted the envelope_ctor_no_validation branch October 15, 2023 18:28
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