Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ce8b059
Update to python 3.9.
schwehr Jul 6, 2025
3e34620
izip → zip
schwehr Jul 6, 2025
61505d1
pyproject.toml: Set target-version to py39 to match comment.
schwehr Jul 6, 2025
2c9aeaa
Run ruff format and pre-commit hooks
JamesParrott Jul 21, 2025
48a6a47
Remove reference to removed constant
JamesParrott Jul 21, 2025
8954a97
Set continue-on-error: true on tests of Python 2.7, ..., 3.8
JamesParrott Jul 21, 2025
5e1beec
Update .pre-commit-config.yaml
JamesParrott Jul 21, 2025
cb0c527
Add type hints to doctest runner and filter
JamesParrott Jul 21, 2025
2457a95
Use typing.Optional instead of T | None 3.10 syntax
JamesParrott Jul 21, 2025
72bdfeb
Remove EOL Python tests, so that we can use list[] 3.9 type syntax
JamesParrott Jul 21, 2025
d199fa3
Type hint b and u helper and other functions
JamesParrott Jul 21, 2025
7a895ce
Type hint signed_area
JamesParrott Jul 21, 2025
0f1e006
Add more type hints
JamesParrott Jul 21, 2025
165d99d
Annotate organize_polygon_rings
JamesParrott Jul 21, 2025
c5c07eb
Begin type annotations of Shape
JamesParrott Jul 21, 2025
c3fc7f6
Replace kwargs.pop with actual key word args
JamesParrott Jul 21, 2025
209421c
Remove code duplication in constituent file loading (more kwargs)
JamesParrott Jul 21, 2025
f4fdf2c
Add docstring to sentinel.
JamesParrott Jul 21, 2025
1bb2e38
Restore self.shp = None etc. Replace *args with a kwarg: shapefile_path
JamesParrott Jul 21, 2025
2b1aa2f
Don't load shp from sentinel
JamesParrott Jul 21, 2025
909efa4
Merge pull request #321 from GeospatialPython/simplify_shapefile_file…
JamesParrott Jul 21, 2025
9e157d6
Replace kwargs.get with key word args and defaults.
JamesParrott Jul 21, 2025
ec43361
Set minimum Python 3.9, move project metadata to pyproject.toml
mwtoews Jul 21, 2025
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
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ runs:
working-directory: ${{ inputs.pyshp_repo_directory }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.test.txt
pip install -e .[test]

- name: Pytest
shell: bash
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/run_tests_hooks_and_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,6 @@ jobs:
run: |
pylint --disable=R,C test_shapefile.py

test_on_EOL_Pythons:
strategy:
fail-fast: false
matrix:
python-version: [
"2.7",
"3.5",
"3.6",
"3.7",
"3.8",
]

runs-on: ubuntu-latest
container:
image: python:${{ matrix.python-version }}

steps:
- uses: actions/checkout@v4
with:
path: ./Pyshp

- name: Non-network tests
uses: ./Pyshp/.github/actions/test
with:
pyshp_repo_directory: ./Pyshp
python-version: ${{ matrix.python-version }}

- name: Network tests
uses: ./Pyshp/.github/actions/test
with:
extra_args: '-m network'
replace_remote_urls_with_localhost: 'yes'
pyshp_repo_directory: ./Pyshp
python-version: ${{ matrix.python-version }}

test_on_supported_Pythons:
strategy:
fail-fast: false
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ repos:
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.0
hooks:
- id: mypy
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ Both the Esri and XBase file-formats are very simple in design and memory
efficient which is part of the reason the shapefile format remains popular
despite the numerous ways to store and exchange GIS data available today.

Pyshp is compatible with Python 2.7-3.x.

This document provides examples for using PyShp to read and write shapefiles. However
many more examples are continually added to the blog [http://GeospatialPython.com](http://GeospatialPython.com),
and by searching for PyShp on [https://gis.stackexchange.com](https://gis.stackexchange.com).
Expand Down
38 changes: 35 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pyshp"
authors = [
{name = "Joel Lawhead", email = "jlawhead@geospatialpython.com"},
]
maintainers = [
{name = "Karim Bahgat", email = "karim.bahgat.norway@gmail.com"}
]
readme = "README.md"
keywords = ["gis", "geospatial", "geographic", "shapefile", "shapefiles"]
description = "Pure Python read/write support for ESRI Shapefile format"
license = "MIT"
license-files = ["LICENSE.TXT"]
dynamic = ["version"]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.optional-dependencies]
test = ["pytest"]

[project.urls]
Repository = "https://github.com/GeospatialPython/pyshp"

[tool.setuptools.dynamic]
version = {attr = "shapefile.__version__"}

[tool.ruff]
# Exclude a variety of commonly ignored directories.
Expand Down Expand Up @@ -39,7 +72,7 @@ line-length = 88
indent-width = 4

# Assume Python 3.9
target-version = "py37"
target-version = "py39"

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
Expand Down Expand Up @@ -67,7 +100,6 @@ skip-magic-trailing-comma = false
line-ending = "auto"



[tool.pylint.MASTER]
load-plugins=[
"pylint_per_file_ignores",
Expand All @@ -86,4 +118,4 @@ load-plugins=[
per-file-ignores = """
shapefile.py:W0212
test_shapefile.py:W0212
"""
"""
2 changes: 0 additions & 2 deletions requirements.test.txt

This file was deleted.

30 changes: 0 additions & 30 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

Loading
Loading