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

Version 1.5.1 #264

Merged
merged 87 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
c2221ab
Bump version to 1.6.0
cleder May 11, 2024
73e412a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 13, 2024
acee8bf
Merge pull request #230 from cleder/pre-commit-ci-update-config
cleder May 14, 2024
61e12be
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 20, 2024
31462aa
Merge pull request #231 from cleder/pre-commit-ci-update-config
cleder May 20, 2024
c3f8e1f
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 27, 2024
f69af6f
Merge pull request #232 from cleder/pre-commit-ci-update-config
cleder May 27, 2024
e834222
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 3, 2024
fa588c5
Merge pull request #233 from cleder/pre-commit-ci-update-config
cleder Jun 4, 2024
85f9fe3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 10, 2024
a73af78
Merge pull request #234 from cleder/pre-commit-ci-update-config
cleder Jun 10, 2024
2ae2bee
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 17, 2024
7063f5b
Merge pull request #235 from cleder/pre-commit-ci-update-config
cleder Jun 18, 2024
6f47e2f
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 24, 2024
7c8400d
Merge pull request #236 from cleder/pre-commit-ci-update-config
cleder Jun 24, 2024
4bb07e2
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 1, 2024
3a4d44a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 1, 2024
1f74085
Merge pull request #237 from cleder/pre-commit-ci-update-config
cleder Jul 2, 2024
96faf28
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 8, 2024
fe2ad59
Merge pull request #238 from cleder/pre-commit-ci-update-config
cleder Jul 9, 2024
a8130b4
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 15, 2024
32e3340
Merge pull request #239 from cleder/pre-commit-ci-update-config
cleder Jul 16, 2024
11b74e9
fix ruff check for CI
cleder Jul 16, 2024
867f656
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 22, 2024
6906248
Merge pull request #240 from cleder/pre-commit-ci-update-config
cleder Jul 26, 2024
1dc5d54
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 29, 2024
69f5c45
Merge pull request #241 from cleder/pre-commit-ci-update-config
cleder Aug 1, 2024
3fbeac3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 5, 2024
15a6e7a
Merge pull request #242 from cleder/pre-commit-ci-update-config
cleder Aug 6, 2024
0c6526a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 12, 2024
b14878c
Merge pull request #243 from cleder/pre-commit-ci-update-config
cleder Aug 12, 2024
3fffc64
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 19, 2024
c95ed02
Merge pull request #244 from cleder/pre-commit-ci-update-config
cleder Aug 20, 2024
7e4f42e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 26, 2024
22348be
Merge pull request #245 from cleder/pre-commit-ci-update-config
cleder Aug 27, 2024
d4f8b44
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 2, 2024
c0f43cf
Merge pull request #246 from cleder/pre-commit-ci-update-config
cleder Sep 3, 2024
479280a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 9, 2024
ac4c8e8
Merge pull request #247 from cleder/pre-commit-ci-update-config
cleder Sep 10, 2024
417ceaa
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 16, 2024
12c533c
Merge pull request #249 from cleder/pre-commit-ci-update-config
cleder Sep 16, 2024
147d6a3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 23, 2024
058c1f5
Merge pull request #250 from cleder/pre-commit-ci-update-config
cleder Sep 23, 2024
7479656
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 30, 2024
83bda58
Merge pull request #252 from cleder/pre-commit-ci-update-config
cleder Sep 30, 2024
ca55ca3
update release to trusted publisher
cleder Oct 6, 2024
da3e149
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 7, 2024
7984170
Merge pull request #253 from cleder/pre-commit-ci-update-config
cleder Oct 7, 2024
d2503a2
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 14, 2024
52b4e27
Merge pull request #254 from cleder/pre-commit-ci-update-config
cleder Oct 14, 2024
cd5c549
Add 3.13 final and 3.14-dev to test on CI
cleder Oct 19, 2024
5b3f9ed
point download counter to pepy.tech
cleder Oct 19, 2024
213d25e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 21, 2024
8b04d23
Add force_2d and force_3d functions to pygeoif/__init__.py fixes #255
cleder Oct 21, 2024
350e021
Merge pull request #256 from cleder/pre-commit-ci-update-config
cleder Oct 21, 2024
5775bb3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 28, 2024
0f642b6
Merge pull request #257 from cleder/pre-commit-ci-update-config
cleder Oct 29, 2024
4cc789a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 4, 2024
20a53a8
Merge pull request #258 from cleder/pre-commit-ci-update-config
cleder Nov 4, 2024
8ca2e7d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 11, 2024
d47fe17
Merge pull request #259 from cleder/pre-commit-ci-update-config
cleder Nov 11, 2024
2412cda
Bump codecov/codecov-action from 4 to 5
dependabot[bot] Nov 14, 2024
c06c7d8
Merge pull request #260 from cleder/dependabot/github_actions/codecov…
cleder Nov 15, 2024
57af701
Expose force_2d and force_3d factories in the top-level module
cleder Nov 15, 2024
0dce6f1
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 18, 2024
2b7a477
Merge pull request #261 from cleder/pre-commit-ci-update-config
cleder Nov 18, 2024
6800703
Update README and documentation configuration
cleder Nov 21, 2024
bd123f5
Fix formatting in README to correct badge order
cleder Nov 21, 2024
8446c24
Add GitHub integration to Sphinx documentation configuration
cleder Nov 21, 2024
a3e156e
ruff fixes
cleder Nov 25, 2024
9a57b40
Refactor ruff configuration to simplify linting rules
cleder Nov 25, 2024
dbb12a0
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 2, 2024
18f4872
Merge pull request #262 from cleder/pre-commit-ci-update-config
cleder Dec 2, 2024
d535c7d
WKT of MultiPoint has parenthesis around individual point coordinates
cleder Dec 3, 2024
0dd8cca
Refactor WKT parsing
cleder Dec 3, 2024
300b12f
Add function to split WKT string into components
cleder Dec 3, 2024
d347428
ruff fixes
cleder Dec 3, 2024
ba2c527
flake8 fix
cleder Dec 3, 2024
8297404
add geometry collection recursively to geometry collection, fixes #221
cleder Dec 3, 2024
5412b39
Add max_leaves parameter to geometry_collections function to determin…
cleder Dec 3, 2024
a92753a
Fix WKT parsing for nested GeometryCollections and output for MultiPo…
cleder Dec 4, 2024
df5310b
Add Python 3.14 to the classifiers in pyproject.toml
cleder Dec 4, 2024
462ebd0
Refactor GitHub Actions workflow to improve package build and publish…
cleder Dec 5, 2024
b0740fa
Bump version to 1.5.1 and update changelog for release
cleder Dec 5, 2024
2c889df
Remove caching from uv installation step in GitHub Actions workflow
cleder Dec 5, 2024
1fbadeb
Update pygeoif/factories.py
cleder Dec 5, 2024
4d10747
Remove redundant coordinate reversal in box function
cleder Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 64 additions & 33 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# run tests and lint with a variety of Python versions
---
name: Tests
on: [push, pull_request]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.11)

5:1 [truthy] truthy value should be one of [false, true]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.11)

5:1 [truthy] truthy value should be one of [false, true]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.11)

5:1 [truthy] truthy value should be one of [false, true]

jobs:
cpython:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,7 +68,7 @@
--cov=tests --cov=pygeoif --cov-report=xml
--hypothesis-profile=coverage
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
verbose: true
Expand Down Expand Up @@ -96,8 +96,8 @@
- name: Linting
run: |
flake8 pygeoif
black --check pygeoif tests
ruff --no-fix pygeoif tests
ruff format --check pygeoif tests
ruff check --no-fix pygeoif tests
yamllint .github/workflows/
- name: Check complexity
run: |
Expand All @@ -124,39 +124,70 @@
run: |
pytest tests --ignore=tests/hypothesis

publish:
if: "github.event_name == 'push' && github.repository == 'cleder/pygeoif'"
needs: [cpython, static-tests, pypy, hypothesis-tests]
name: Build and publish to PyPI and TestPyPI
build-and-check-package:
name: Build & inspect our package.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
- uses: hynek/build-and-inspect-python-package@v2
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to Test PyPI for tags
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
python-version-file: "pyproject.toml"
- name: Check with pyroma
run: |
uv tool run pyroma .
- name: Check tag name
if: >-
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags')
run: |
uv tool run vercheck $GITHUB_REF_NAME pygeoif/about.py


test-publish:
if: >-
github.event_name == 'push' &&
github.repository == 'cleder/pygeoif' &&
startsWith(github.ref, 'refs/tags')
needs: [build-and-check-package, pypy, test-coverage, hypothesis-tests, cpython, static-tests]
name: Test install on TestPyPI
runs-on: ubuntu-latest
environment: test-release
permissions:
id-token: write
steps:
- name: Download packages built by build-and-check-package
uses: actions/download-artifact@v4
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI for push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@master
name: Packages
path: dist

- name: Upload package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish:
if: >-
github.event_name == 'push' &&
github.repository == 'cleder/pygeoif' &&
github.ref == 'refs/heads/main'
needs: [build-and-check-package, pypy, test-coverage, hypothesis-tests, cpython, static-tests]
name: Publish to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Download packages built by build-and-check-package
uses: actions/download-artifact@v4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
name: Packages
path: dist

- name: Publish distribution 📦 to PyPI for push to main
uses: pypa/gh-action-pypi-publish@release/v1

...
23 changes: 12 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
Expand Down Expand Up @@ -35,17 +35,18 @@ repos:
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
# - repo: https://github.com/PyCQA/docformatter
# rev: v1.7.5
# hooks:
# - id: docformatter
# args: [--in-place, --make-summary-multi-line, --close-quotes-on-newline, --wrap-summaries, "88"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.4.3'
rev: 'v0.8.1'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -68,7 +69,7 @@ repos:
- flake8-typing-imports
- flake8-use-fstring
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -78,15 +79,15 @@ repos:
# hooks:
# - id: rst-linter
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.23
hooks:
- id: validate-pyproject
- repo: https://github.com/kieran-ryan/pyprojectsort
rev: v0.3.0
hooks:
- id: pyprojectsort
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.28.2"
rev: "0.30.0"
hooks:
- id: check-github-workflows
- id: check-github-actions
Expand Down
12 changes: 5 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ testing with Hypothesis_.

It was written to provide clean and python only geometries for fastkml_

|doc| |test| |cov| |hypothesis| |black| |mypy| |openhub| |factor| |commit| |py| |implement| |latest| |license| |downloads|
|doc| |test| |cov| |hypothesis| |black| |mypy| |openhub| |factor| |commit| |py| |implement| |latest| |conda| |license| |downloads|

.. |doc| image:: https://readthedocs.org/projects/pygeoif/badge/?version=latest
:target: https://pygeoif.readthedocs.io/en/latest/?badge=latest
Expand Down Expand Up @@ -79,6 +79,9 @@ It was written to provide clean and python only geometries for fastkml_
.. |py| image:: https://img.shields.io/pypi/pyversions/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:alt: Supported Python versions
.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/pygeoif.svg
:target: https://anaconda.org/conda-forge/pygeoif
:alt: Conda Version

.. |implement| image:: https://img.shields.io/pypi/implementation/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
Expand All @@ -93,7 +96,7 @@ It was written to provide clean and python only geometries for fastkml_
:alt: License

.. |downloads| image:: https://img.shields.io/pypi/dm/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:target: https://www.pepy.tech/projects/pygeoif
:alt: Downloads

Installation
Expand Down Expand Up @@ -215,11 +218,6 @@ exterior : LinearRing
The ring which bounds the positive space of the polygon.
interiors : sequence
A sequence of rings which bound all existing holes.
maybe_valid: boolean
When a polygon has obvious problems such as self crossing
lines or holes that are outside the exterior bounds this will
return False. Even if this returns True the geometry may still be invalid,
but if this returns False you do have a problem.

MultiPoint
----------
Expand Down
15 changes: 15 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Changelog
=========

1.6.0 (unreleased)
------------------


1.5.1 (2024/12/05)
------------------

- expose ``force_2d`` and ``force_3d`` factories in the top-level module.
- fix WKT parsing for nested GeometryCollections.
- fix WKT output for MultiPoints.
- make hypothesis strategy for GeometryCollections recursive, so that it can generate
nested collections.
- add Python 3.14 to test matrix.


1.5.0 (2024/05/11)
------------------

Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
]

templates_path = ["_templates"]
Expand All @@ -48,3 +49,11 @@
pass

autodoc_member_order = "bysource"

html_context = {
"display_github": True, # Integrate GitHub
"github_user": "cleder", # Username
"github_repo": "pygeoif", # Repo name
"github_version": "main", # Version
"conf_py_path": "/docs/", # Path in the checkout to the docs root
}
5 changes: 5 additions & 0 deletions pygeoif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
"""PyGeoIf provides a GeoJSON-like protocol for geo-spatial (GIS) vector data."""

from pygeoif.about import __version__ # noqa: F401
from pygeoif.factories import force_2d
from pygeoif.factories import force_3d
from pygeoif.factories import from_wkt
from pygeoif.factories import mapping
from pygeoif.factories import orient
Expand All @@ -43,6 +46,8 @@
"MultiPolygon",
"Point",
"Polygon",
"force_2d",
"force_3d",
"from_wkt",
"mapping",
"orient",
Expand Down
2 changes: 1 addition & 1 deletion pygeoif/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
The only purpose of this module is to provide a version number for the package.
"""

__version__ = "1.5.0"
__version__ = "1.5.1"
Loading
Loading