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

Change made to handle all real numbers as coordinates #173 #188

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

trcmohitmandokhot
Copy link
Contributor

Changes made per discussion in #173. Suggestions were made to handle all real numbers as inputs, rather than the original float, int, Decimal types only. While the original type-check works for a majority of cases, there are users who may try to create geojson objects from objects that are not inherited from the python base-classes listed above. A more generic solution was to type-check against the abstract Numbers class, which has a nicely laid out hierarchy per PEP 3141.

@rayrrr rayrrr self-requested a review November 11, 2022 01:38
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Merging #188 (0eda1a4) into master (d848065) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #188   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files          10       10           
  Lines         353      353           
  Branches       86       86           
=======================================
  Hits          335      335           
  Misses         11       11           
  Partials        7        7           
Impacted Files Coverage Δ
geojson/geometry.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rayrrr rayrrr merged commit 2a631e0 into jazzband:master Nov 11, 2022
Copy link
Member

@rayrrr rayrrr left a comment

Choose a reason for hiding this comment

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

LGTM

@trcmohitmandokhot trcmohitmandokhot deleted the issue-173-float32error branch November 11, 2022 16:23
@rayrrr rayrrr mentioned this pull request Jan 26, 2023
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 2, 2023
3.0.1 (2023-02-15)
------------------

- Add Support for Python 3.11.x minor revisions

  - jazzband/geojson#198


3.0.0 (2023-01-26)
------------------

- Support for Python versions 3.7-3.11 (Python 2 no longer supported)

- Primary development branch renamed from `master` to `main`

- Handle all real numbers as coordinates

  - jazzband/geojson#188

- Default precision improvements

  - jazzband/geojson#177

- CI improvements

  - jazzband/geojson#172
  - jazzband/geojson#155

- utf-8 support added to `geojson.dumps()`

  - jazzband/geojson#165

- Polygons now constrained to bounding box

  - jazzband/geojson#147

- Better GeometryCollection handling in `util.coords()`

  - jazzband/geojson#146

- Improved point validation

  - jazzband/geojson#144
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