Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 15 additions & 1 deletion .github/workflows/run_checks_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1

mypy-strict:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install mypy
run: pip install mypy
- name: Run mypy --strict
run: mypy --strict ./src/shapefile.py


build_wheel_and_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Build wheel from the project repo
uses: ./.github/actions/build_wheel_and_sdist

Expand Down
8 changes: 6 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
VERSION WIP
Improvements:
* LICENSE.TXT re-encoded in UTF-8 (@musicinmybrain)

VERSION 3.0.0

2025-08-03
Expand All @@ -15,13 +19,13 @@ VERSION 3.0.0

Code quality
* Statically typed and checked with Mypy
* Checked with Ruff.
* Checked with Ruff. (@mwtoews)
* Type hints
* f-strings
* Remove Python 2 specific functions.
* Run doctests against wheels.
* Testing of wheels before publishing them
* pyproject.toml src layout
* Updated metadata, changed build backend to Hatch, and restructured repor into pyproject.toml src layout (@mwtoews)
* Slow test marked.

Improvements:
Expand Down
7 changes: 4 additions & 3 deletions run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections.abc import Callable
from pathlib import Path
from tempfile import TemporaryFile as TempF
from typing import Union
from typing import Iterable, Union, cast

import shapefile

Expand Down Expand Up @@ -63,8 +63,9 @@ def write_shapefile_with_PyShp(target: Union[str, os.PathLike]):
for field_info_tuple in fields[target]:
w.field(*field_info_tuple)
for shapeRecord in shapeRecords[target]:
w.shape(shapeRecord.shape)
w.record(*shapeRecord.record)
w.shape(cast(shapefile.Shape, shapeRecord.shape))
record = cast(Iterable, shapeRecord.record)
w.record(*record)


SHAPEFILES = {
Expand Down
Loading
Loading