Skip to content

Commit ce1ff22

Browse files
Merge pull request #269 from JamesParrott/PyShp-test-on-Pythons-3.10-3.13
Test Pyshp in CI in Python 3.10, 3.11, 3.12 and 3.13 containers.
2 parents d3b6e2a + d3c5834 commit ce1ff22

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@ on:
1212
jobs:
1313
build:
1414

15-
runs-on: ubuntu-latest
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
18+
python-version: ["2.7.18", "3.5.10", "3.6.15", "3.7.17", "3.8.18", "3.9.18", "3.10.13", "3.11.7", "3.12.1", "3.13.0a2"]
19+
20+
runs-on: ubuntu-latest
21+
container:
22+
image: python:${{ matrix.python-version }}-slim
2023

2124
steps:
22-
- uses: actions/checkout@v2
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: ${{ matrix.python-version }}
25+
- uses: actions/checkout@v3
2726
- name: Install dependencies
2827
run: |
2928
python -m pip install --upgrade pip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ build/
1919
dist/
2020
*.egg-info/
2121
*.py[cod]
22+
.vscode

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,13 +1082,15 @@ A .prj file, or projection file, is a simple text file that stores a shapefile's
10821082

10831083
If you're using the same projection over and over, the following is a simple way to create the .prj file assuming your base filename is stored in a variable called "filename":
10841084

1085-
>>> with open("{}.prj".format(filename), "w") as prj:
1086-
>>> wkt = 'GEOGCS["WGS 84",'
1087-
>>> wkt += 'DATUM["WGS_1984",'
1088-
>>> wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]'
1089-
>>> wkt += ',PRIMEM["Greenwich",0],'
1090-
>>> wkt += 'UNIT["degree",0.0174532925199433]]'
1091-
>>> prj.write(wkt)
1085+
```
1086+
with open("{}.prj".format(filename), "w") as prj:
1087+
wkt = 'GEOGCS["WGS 84",'
1088+
wkt += 'DATUM["WGS_1984",'
1089+
wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]'
1090+
wkt += ',PRIMEM["Greenwich",0],'
1091+
wkt += 'UNIT["degree",0.0174532925199433]]'
1092+
prj.write(wkt)
1093+
```
10921094

10931095
If you need to dynamically fetch WKT projection strings, you can use the pure Python [PyCRS](https://github.com/karimbahgat/PyCRS) module which has a number of useful features.
10941096

requirements.test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pytest==3.2.5
1+
pytest
22
setuptools

0 commit comments

Comments
 (0)