Skip to content

Commit d3c4132

Browse files
authored
Merge pull request #345 from JamesParrott/pyshp-3.0.0-alpha-Rise-of-Skytyper
Pyshp 3.0.0 alpha rise of skytyper
2 parents b0c35bf + afa7b5f commit d3c4132

File tree

6 files changed

+848
-575
lines changed

6 files changed

+848
-575
lines changed

.github/workflows/run_checks_build_and_test.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,6 @@ jobs:
1616
- uses: actions/setup-python@v5
1717
- uses: pre-commit/action@v3.0.1
1818

19-
pylint:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v5
24-
- name: install Pylint and plugin
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install pytest pylint pylint-per-file-ignores
28-
pip install -e .
29-
- name: run Pylint for errors, warnings and remarks only (ignore Comments/ Code style)
30-
run: |
31-
pylint --disable=C test_shapefile.py src/shapefile.py
32-
3319
build_wheel_and_sdist:
3420
runs-on: ubuntu-latest
3521
steps:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ repos:
1919
- id: check-yaml
2020
- id: trailing-whitespace
2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v1.17.0
22+
rev: v1.17.1
2323
hooks:
2424
- id: mypy

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ index which is 7.
467467

468468
>>> s = sf.shape(7)
469469
>>> s
470-
Shape #7: POLYGON
470+
Polygon #7
471+
471472

472473
>>> # Read the bbox of the 8th shape to verify
473474
>>> # Round coordinates to 3 decimal places
@@ -476,7 +477,7 @@ index which is 7.
476477

477478
Each shape record (except Points) contains the following attributes. Records of
478479
shapeType Point do not have a bounding box 'bbox'.
479-
480+
# TODO!! Fix attributes
480481

481482
>>> for name in dir(shapes[3]):
482483
... if not name.startswith('_'):

pyproject.toml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ classifiers = [
2727
"Topic :: Software Development :: Libraries :: Python Modules",
2828
]
2929
dependencies = [
30-
"typing_extensions",
3130
]
3231

3332
[project.optional-dependencies]
@@ -47,6 +46,12 @@ sources = {"src" = ""} # move from "src" directory for wheel
4746
[tool.hatch.version]
4847
path = "src/shapefile.py"
4948

49+
[tool.pytest.ini_options]
50+
markers = [
51+
"network: marks tests requiring network access",
52+
"slow: marks other tests that cause bottlenecks",
53+
]
54+
5055
[tool.ruff]
5156
# Exclude a variety of commonly ignored directories.
5257
exclude = [
@@ -111,35 +116,3 @@ skip-magic-trailing-comma = false
111116
line-ending = "auto"
112117

113118

114-
[tool.pylint.MASTER]
115-
load-plugins=[
116-
"pylint_per_file_ignores",
117-
]
118-
119-
# Silence warnings: src/shapefile.py:2076:20: W0212: Access to a protected member _from_geojson of a client class (protected-access)
120-
# src/shapefile.py:950:16: W0201: Attribute 'm' defined outside __init__ (attribute-defined-outside-init)
121-
# src/shapefile.py:973:12: W0707: Consider explicitly re-raising using 'except error as exc' and
122-
# 'raise ShapefileException(f'Failed to write bounding box for record {i}.
123-
# Expected floats.') from exc' (raise-missing-from)
124-
# Silence remarks:
125-
# src\shapefile.py:338:0: R0914: Too many local variables (21/15) (too-many-locals)
126-
# src\shapefile.py:338:0: R0912: Too many branches (24/12) (too-many-branches)
127-
# src\shapefile.py:338:0: R0915: Too many statements (52/50) (too-many-statements)
128-
# src\shapefile.py:470:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
129-
# src\shapefile.py:471:4: R0913: Too many arguments (6/5) (too-many-arguments)
130-
# src\shapefile.py:471:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
131-
# src\shapefile.py:506:4: R0911: Too many return statements (10/6) (too-many-return-statements)
132-
# src\shapefile.py:878:0: R0903: Too few public methods (0/2) (too-few-public-methods)
133-
# src\shapefile.py:1981:0: R0904: Too many public methods (23/20) (too-many-public-methods)
134-
# src\shapefile.py:2117:17: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
135-
# Silence warnings: test_shapefile.py:{783,786,799,803,06,1195}:19:
136-
# W0212: Access to a protected member _offsets of a
137-
# client class (protected-access)
138-
#
139-
# Toml multi-line string used instead of array due to:
140-
# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160
141-
[tool.pylint.'messages control']
142-
per-file-ignores = [
143-
"/src/shapefile.py:W0707,W0212,W0201,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0917,R1732",
144-
"test_shapefile.py:W0212,R1732",
145-
]

pytest.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)