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

1.1 #129

Merged
merged 109 commits into from
Oct 13, 2023
Merged

1.1 #129

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
51cc97f
Merge pull request #120 from cleder/main
cleder Sep 29, 2022
0451929
back to development
cleder Sep 29, 2022
208e992
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 3, 2022
393bf20
Merge pull request #121 from cleder/pre-commit-ci-update-config
cleder Oct 3, 2022
7725946
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 10, 2022
4ad5a9e
Merge pull request #122 from cleder/pre-commit-ci-update-config
cleder Oct 11, 2022
50f844e
Bump actions/setup-node from 3.5.0 to 3.5.1
dependabot[bot] Oct 13, 2022
986d4d4
Merge pull request #123 from cleder/dependabot/github_actions/actions…
cleder Oct 13, 2022
fbba13c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 24, 2022
21c39d3
Merge pull request #124 from cleder/pre-commit-ci-update-config
cleder Oct 24, 2022
4501237
test 3.11 final
cleder Oct 25, 2022
33c7d8e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 31, 2022
0bd26cf
Merge pull request #125 from cleder/pre-commit-ci-update-config
cleder Nov 1, 2022
320f5bd
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 7, 2022
9797532
Merge pull request #126 from cleder/pre-commit-ci-update-config
cleder Nov 7, 2022
5af7c71
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 14, 2022
36d660c
Merge pull request #127 from cleder/pre-commit-ci-update-config
cleder Nov 14, 2022
23332d4
add python 3.12 to test matrix
cleder Nov 15, 2022
be3ced0
auto remove print statements
cleder Nov 17, 2022
93da7d9
autoupdate
cleder Nov 17, 2022
1e00466
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Nov 21, 2022
52783c6
Merge pull request #131 from cleder/pre-commit-ci-update-config
cleder Nov 22, 2022
ad8d362
'Refactored by Sourcery'
Nov 22, 2022
24a34c3
Merge pull request #132 from cleder/sourcery/develop
cleder Nov 22, 2022
99dc45a
add pre-commit badge
cleder Nov 22, 2022
0fae823
remove duplicated pre-commit badge
cleder Nov 22, 2022
dfdb3ef
remove walrus, 3.7 is still a thing
cleder Nov 22, 2022
a99d643
configure 3.7 as min python version for sourcery
cleder Nov 22, 2022
e80d995
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 5, 2022
e60065c
Merge pull request #137 from cleder/pre-commit-ci-update-config
cleder Dec 5, 2022
d8cb8e4
Install the CodeSee workflow. Learn more at https://docs.codesee.io
Dec 5, 2022
f810ebc
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 12, 2022
9fd438d
Merge pull request #138 from cleder/codesee-arch-diagram-workflow-167…
cleder Dec 13, 2022
054f4f5
Merge branch 'develop' into pre-commit-ci-update-config
cleder Dec 13, 2022
9d32900
Merge pull request #139 from cleder/pre-commit-ci-update-config
cleder Dec 13, 2022
dbf71dc
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 19, 2022
f7f87e1
Merge pull request #140 from cleder/pre-commit-ci-update-config
cleder Dec 20, 2022
b75be76
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Dec 26, 2022
aeb5183
Merge pull request #141 from cleder/pre-commit-ci-update-config
cleder Dec 27, 2022
72a0b7a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jan 9, 2023
107ed4a
Merge pull request #142 from cleder/pre-commit-ci-update-config
cleder Jan 9, 2023
53a3dab
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 6, 2023
ab55a4d
Merge pull request #143 from cleder/pre-commit-ci-update-config
cleder Feb 7, 2023
6b4ad11
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 13, 2023
a315e01
Merge pull request #144 from cleder/pre-commit-ci-update-config
cleder Feb 13, 2023
2417896
update precommit
cleder Feb 13, 2023
dbf69dd
explicit stacklevel
cleder Feb 13, 2023
b89dbe3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 20, 2023
2d8f6cf
Merge pull request #145 from cleder/pre-commit-ci-update-config
cleder Feb 20, 2023
ffbfe77
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 13, 2023
651f593
Merge pull request #146 from cleder/pre-commit-ci-update-config
cleder Mar 14, 2023
00dd6ea
add ruff to pre-commit, move tests
cleder Mar 26, 2023
9ed0988
reactivate check-manifest
cleder Mar 26, 2023
266c72d
version 1.0.1
cleder Mar 26, 2023
fffd9fb
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 27, 2023
7a59e08
Merge pull request #147 from cleder/pre-commit-ci-update-config
cleder Mar 27, 2023
916b6f5
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 3, 2023
dfbe82a
test nested geometry collections
cleder Apr 3, 2023
3c5a6af
Merge pull request #149 from cleder/pre-commit-ci-update-config
cleder Apr 4, 2023
4edd631
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 24, 2023
14a2fcb
Merge pull request #150 from cleder/pre-commit-ci-update-config
cleder Apr 25, 2023
958a2b7
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 1, 2023
ba034c1
Merge pull request #151 from cleder/pre-commit-ci-update-config
cleder May 2, 2023
1fec333
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 8, 2023
b53b327
Merge pull request #152 from cleder/pre-commit-ci-update-config
cleder May 8, 2023
8dbe4ea
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 15, 2023
438ff60
Merge pull request #153 from cleder/pre-commit-ci-update-config
cleder May 15, 2023
87a6d0a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 22, 2023
e86883e
Merge pull request #154 from cleder/pre-commit-ci-update-config
cleder May 22, 2023
81a4eaa
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 29, 2023
984f6f8
Merge pull request #155 from cleder/pre-commit-ci-update-config
cleder May 29, 2023
ed2176c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 5, 2023
e498b3b
Merge pull request #156 from cleder/pre-commit-ci-update-config
cleder Jun 6, 2023
f3d92b8
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 12, 2023
baa9bb6
Merge pull request #157 from cleder/pre-commit-ci-update-config
cleder Jun 13, 2023
581215d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 19, 2023
ddb677b
Merge pull request #158 from cleder/pre-commit-ci-update-config
cleder Jun 19, 2023
ccbb59d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 26, 2023
891bb50
Merge pull request #159 from cleder/pre-commit-ci-update-config
cleder Jun 30, 2023
95c312a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 17, 2023
db0f50f
Merge pull request #160 from cleder/pre-commit-ci-update-config
cleder Jul 17, 2023
a375076
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 24, 2023
085dcd0
Merge pull request #161 from cleder/pre-commit-ci-update-config
cleder Jul 24, 2023
be5fcc9
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 31, 2023
7b7cb17
Merge pull request #162 from cleder/pre-commit-ci-update-config
cleder Aug 1, 2023
0dfad1a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 7, 2023
7a734a0
Merge pull request #163 from cleder/pre-commit-ci-update-config
cleder Aug 7, 2023
10f307b
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 28, 2023
01b6c30
Merge pull request #164 from cleder/pre-commit-ci-update-config
cleder Aug 30, 2023
688e385
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 4, 2023
83e5c83
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
46a8187
Merge pull request #165 from cleder/pre-commit-ci-update-config
cleder Sep 5, 2023
99e6219
Merge pull request #166 from cleder/dependabot/github_actions/actions…
cleder Sep 5, 2023
88d785a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 11, 2023
16084c1
Bump codecov/codecov-action from 3 to 4
dependabot[bot] Sep 14, 2023
eca2c5f
Merge pull request #168 from cleder/dependabot/github_actions/codecov…
cleder Sep 15, 2023
85098c7
Merge pull request #167 from cleder/pre-commit-ci-update-config
cleder Sep 15, 2023
8cd8bef
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 9, 2023
29fd591
Merge pull request #169 from cleder/pre-commit-ci-update-config
cleder Oct 12, 2023
09b0435
raise dimension error
cleder Oct 12, 2023
0b322cf
add test for nested multigeometries
cleder Oct 12, 2023
c2770ac
Fix __eq__ for nested Geometrycollections
cleder Oct 12, 2023
b2e6603
add missing test
cleder Oct 12, 2023
599b802
add pypy 3.10 to test matrix
cleder Oct 12, 2023
8221213
fix tests
cleder Oct 12, 2023
c496183
better support for nested multi geometries
cleder Oct 13, 2023
4372e39
improve typing and tests
cleder Oct 13, 2023
8d43344
prepare release
cleder Oct 13, 2023
3b9c91a
correct version in setup.py
cleder Oct 13, 2023
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
12 changes: 0 additions & 12 deletions .github/workflows/codeball.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
---
name: "CodeQL"

on:

Check warning on line 15 in .github/workflows/codeql-analysis.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

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

Check warning on line 15 in .github/workflows/codeql-analysis.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

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

Check warning on line 15 in .github/workflows/codeql-analysis.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

15:1 [truthy] truthy value should be one of [false, true]
push:
branches: [main, develop]
pull_request:
Expand All @@ -39,7 +39,7 @@

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
75 changes: 7 additions & 68 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,20 @@
on:

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

1:1 [document-start] missing document start "---"

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

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

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

1:1 [document-start] missing document start "---"

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

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

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

1:1 [document-start] missing document start "---"

Check warning on line 1 in .github/workflows/codesee-arch-diagram.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.10)

1:1 [truthy] truthy value should be one of [false, true]
push:
branches:
- develop
pull_request_target:
types: [opened, synchronize, reopened]

name: CodeSee Map
name: CodeSee

permissions: read-all

jobs:
test_map_action:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
name: Run CodeSee Map Analysis
name: Analyze the repo with CodeSee
steps:
- name: checkout
id: checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

# codesee-detect-languages has an output with id languages.
- name: Detect Languages
id: detect-languages
uses: Codesee-io/codesee-detect-languages-action@latest

- name: Configure JDK 16
uses: actions/setup-java@v3
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
with:
java-version: '16'
distribution: 'zulu'

# CodeSee Maps Go support uses a static binary so there's no setup step required.

- name: Configure Node.js 14
uses: actions/[email protected]
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
with:
node-version: '14'

- name: Configure Python 3.x
uses: actions/setup-python@v4
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
with:
python-version: '3.10'
architecture: 'x64'

- name: Configure Ruby '3.x'
uses: ruby/setup-ruby@v1
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
with:
ruby-version: '3.0'

# CodeSee Maps Rust support uses a static binary so there's no setup step required.

- name: Generate Map
id: generate-map
uses: Codesee-io/codesee-map-action@latest
with:
step: map
github_ref: ${{ github.ref }}
languages: ${{ steps.detect-languages.outputs.languages }}

- name: Upload Map
id: upload-map
uses: Codesee-io/codesee-map-action@latest
with:
step: mapUpload
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}

- name: Insights
id: insights
uses: Codesee-io/codesee-map-action@latest
- uses: Codesee-io/codesee-action@v2
with:
step: insights
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
22 changes: 11 additions & 11 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# 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.10)

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.10)

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.10)

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

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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -23,9 +23,9 @@
pip install pytest pytest-cov typing_extensions
- name: Test with pytest
run: |
pytest pygeoif --cov=pygeoif --cov-fail-under=100 --cov-report=xml
pytest tests --cov=tests --cov=pygeoif --cov-report=xml
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version==3.9 }}
if: ${{ matrix.python-version==3.11 }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Expand All @@ -35,10 +35,10 @@
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -53,7 +53,7 @@
- name: Linting
run: |
flake8 pygeoif
black --check pygeoif
black --check pygeoif tests
yamllint .github/workflows/
- name: Check complexity
run: |
Expand All @@ -65,9 +65,9 @@
runs-on: ubuntu-latest
strategy:
matrix:
pypy-version: ['pypy-3.7', 'pypy-3.8', 'pypy-3.9']
pypy-version: ['pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.pypy-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -78,15 +78,15 @@
pip install pytest typing_extensions
- name: Test with pytest
run: |
pytest pygeoif
pytest tests

publish:
if: "github.event_name == 'push' && github.repository == 'cleder/pygeoif'"
needs: [cpython, static-tests, pypy]
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
Expand Down
60 changes: 34 additions & 26 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.3.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-docstring-first
Expand All @@ -24,44 +24,52 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/ikamensh/flynt/
rev: '0.76'
rev: '1.0.1'
hooks:
- id: flynt
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- repo: https://github.com/hakancelikdev/unimport
rev: 0.12.1
rev: 1.0.0
hooks:
- id: unimport
args: [--remove, --include-star-import, --ignore-init, --gitignore]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
# - repo: https://github.com/dhruvmanila/remove-print-statements
# rev: 'v0.5.0'
# hooks:
# - id: remove-print-statements
# args: ['--verbose'] # Show all the print statements to be removed
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.292'
hooks:
- id: ruff
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8
- flake8-absolute-import
- flake8-awesome
- flake8-bandit
- flake8-blind-except
# - flake8-absolute-import
# - flake8-awesome
# - flake8-bandit
# - flake8-blind-except
- flake8-bugbear
# - flake8-class-attributes-order
- flake8-cognitive-complexity
- flake8-commas
# - flake8-commas
- flake8-comments
- flake8-complex-f-strings
- flake8-continuation
- flake8-debugger
# - flake8-continuation
# - flake8-debugger
- flake8-docstrings
# - flake8-dunder-all
- flake8-encodings
Expand All @@ -79,28 +87,28 @@ repos:
- flake8-string-format
- flake8-super
- flake8-typing-imports
- flake8-use-fstring
# - flake8-use-fstring
- pep8-naming
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.981
rev: v1.5.1
hooks:
- id: mypy
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
# - repo: https://github.com/Lucas-C/pre-commit-hooks-markup
# rev: v1.0.1
# hooks:
# - id: rst-linter
- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
rev: "0.49"
hooks:
- id: check-manifest
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.18.3
rev: "0.27.0"
hooks:
- id: check-github-workflows
- id: check-github-actions
- id: check-readthedocs
- repo: https://github.com/regebro/pyroma
rev: "3.2"
hooks:
- id: pyroma
# - repo: https://github.com/regebro/pyroma
# rev: "4.1"
# hooks:
# - id: pyroma
...
2 changes: 2 additions & 0 deletions .sourcery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
python_version: '3.7'
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ recursive-exclude *.pyc *.pyo
include docs/LICENSE.GPL
include pygeoif/py.typed
exclude pygeoif/.*
recursive-include tests *.py
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ It was written to provide clean and python only geometries for fastkml_
:target: https://www.codefactor.io/repository/github/cleder/pygeoif/overview/main
:alt: CodeFactor

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit

Expand Down
8 changes: 8 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

1.1 (2023/10/13)
-----------------

- Fix nested MultiGeometries
- Improve type annotations
- Add Python 3.12 to supported versions
- Last version to support Python 3.7

1.0 (2022/09/29)
------------------------

Expand Down
1 change: 0 additions & 1 deletion pygeoif/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 - 2022 Christian Ledermann
#
Expand Down
1 change: 0 additions & 1 deletion pygeoif/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 -2022 Christian Ledermann
#
Expand Down
8 changes: 3 additions & 5 deletions pygeoif/factories.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 -2022 Christian Ledermann
#
Expand Down Expand Up @@ -155,8 +154,8 @@ def shape(
geometries = [
shape(fi) for fi in geometry["geometries"] # type: ignore [typeddict-item]
]
return GeometryCollection(geometries) # type: ignore [arg-type]
raise NotImplementedError(f"[{geometry['type']} is nor implemented")
return GeometryCollection(geometries)
raise NotImplementedError(f"[{geometry['type']} is not implemented")


def num(number: str) -> float:
Expand Down Expand Up @@ -269,9 +268,8 @@ def _multipolygon_from_wkt_coordinates(coordinates: str) -> MultiPolygon:
def _multigeometry_from_wkt_coordinates(coordinates: str) -> GeometryCollection:
gc_types = gcre.findall(coordinates)
gc_coords = gcre.split(coordinates)[1:]
assert len(gc_types) == len(gc_coords) # noqa: S101
geometries: List[Geometry] = []
for (gc_type, gc_coord) in zip(gc_types, gc_coords):
for gc_type, gc_coord in zip(gc_types, gc_coords):
gc_wkt = gc_type + gc_coord[: gc_coord.rfind(")") + 1]
geometries.append(cast(Geometry, from_wkt(gc_wkt)))
return GeometryCollection(geometries)
Expand Down
1 change: 0 additions & 1 deletion pygeoif/feature.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 -2022 Christian Ledermann
#
Expand Down
Loading
Loading