From 7d499dea125ef69d14ac89977d13914b138490dc Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:51:21 +0000 Subject: [PATCH 01/11] Reformat code block as markdown literal code, so doctest skips it. --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dce792c..809dce8 100644 --- a/README.md +++ b/README.md @@ -1082,13 +1082,15 @@ A .prj file, or projection file, is a simple text file that stores a shapefile's 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": - >>> with open("{}.prj".format(filename), "w") as prj: - >>> wkt = 'GEOGCS["WGS 84",' - >>> wkt += 'DATUM["WGS_1984",' - >>> wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]' - >>> wkt += ',PRIMEM["Greenwich",0],' - >>> wkt += 'UNIT["degree",0.0174532925199433]]' - >>> prj.write(wkt) +``` + with open("{}.prj".format(filename), "w") as prj: + wkt = 'GEOGCS["WGS 84",' + wkt += 'DATUM["WGS_1984",' + wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]' + wkt += ',PRIMEM["Greenwich",0],' + wkt += 'UNIT["degree",0.0174532925199433]]' + prj.write(wkt) +``` 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. From 603b4755749f3ce2f1e95e7baeda013731fe97eb Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:10:29 +0000 Subject: [PATCH 02/11] Drop actions/setup-python to keep Python 2 support. Run action in containers. --- .github/workflows/build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26e1159..541d51a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,18 +12,17 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"] + python-version: ["2.7.18", "3.6.15", "3.7.17", "3.8.18", "3.9.18"] + + runs-on: ubuntu-latest + container: + image: python:${{ matrix.python-version }}-slim steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v3 - name: Install dependencies run: | python -m pip install --upgrade pip From 5edd0335e474fb8d8d594cda1ddd22e7eb86cd5a Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:54:11 +0000 Subject: [PATCH 03/11] Trigger CI --- .vscode/settings.json | 5 +++++ README.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fe3b5f5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "https://json.schemastore.org/github-workflow.json": "file:///c%3A/Users/drjam/Coding/repos/IronPyShp/.github/workflows/deploy.yml" + } +} \ No newline at end of file diff --git a/README.md b/README.md index 809dce8..5ab26c2 100644 --- a/README.md +++ b/README.md @@ -1097,7 +1097,7 @@ If you need to dynamically fetch WKT projection strings, you can use the pure Py # Advanced Use ## Common Errors and Fixes - + Below we list some commonly encountered errors and ways to fix them. ### Warnings and Logging From 043e8d7b692eeb0a97e5dcb926dfb0e7ee18140f Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:57:30 +0000 Subject: [PATCH 04/11] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 541d51a..9256638 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,9 @@ name: build on: push: - branches: [ master ] + branches: [ PyShp-fix-CI ] pull_request: - branches: [ master ] + branches: [ PyShp-fix-CI ] jobs: build: From 9f5f0824d0449e251ef2c9efb697a8d3d3f924e7 Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:08:20 +0000 Subject: [PATCH 05/11] Target "master" branch for PR into PyShp --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9256638..541d51a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,9 @@ name: build on: push: - branches: [ PyShp-fix-CI ] + branches: [ master ] pull_request: - branches: [ PyShp-fix-CI ] + branches: [ master ] jobs: build: From e796e9250066e2322190bae88aac80a83cb30f53 Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:12:53 +0000 Subject: [PATCH 06/11] Don't track VS Code settings --- .gitignore | 1 + .vscode/settings.json | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index a82da86..03827eb 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ build/ dist/ *.egg-info/ *.py[cod] +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index fe3b5f5..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "yaml.schemas": { - "https://json.schemastore.org/github-workflow.json": "file:///c%3A/Users/drjam/Coding/repos/IronPyShp/.github/workflows/deploy.yml" - } -} \ No newline at end of file From 588617b17cc65815d84f69ebdbe438dfcb4ae5be Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:19:48 +0000 Subject: [PATCH 07/11] Trigger CI, test tests on , Python:3.5.10-slim --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 541d51a..dc8cf8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7.18", "3.6.15", "3.7.17", "3.8.18", "3.9.18"] + python-version: ["2.7.18", , "3.5.10", "3.6.15", "3.7.17", "3.8.18", "3.9.18"] runs-on: ubuntu-latest container: From 2e7b9fb1a6191fca494ce06b5592858a320ab8ec Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:20:55 +0000 Subject: [PATCH 08/11] Remove extra comma --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc8cf8a..0e69616 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7.18", , "3.5.10", "3.6.15", "3.7.17", "3.8.18", "3.9.18"] + python-version: ["2.7.18", "3.5.10", "3.6.15", "3.7.17", "3.8.18", "3.9.18"] runs-on: ubuntu-latest container: From 5893530349bc67b5521b41618f901f2d90020f9b Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:22:45 +0000 Subject: [PATCH 09/11] Trigger CI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ab26c2..809dce8 100644 --- a/README.md +++ b/README.md @@ -1097,7 +1097,7 @@ If you need to dynamically fetch WKT projection strings, you can use the pure Py # Advanced Use ## Common Errors and Fixes - + Below we list some commonly encountered errors and ways to fix them. ### Warnings and Logging From 543a3d305e583b9516b4daa427bd052aea88430b Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:24:44 +0000 Subject: [PATCH 10/11] Target PyShp-fix-CI --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e69616..f8d8bb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,9 @@ name: build on: push: - branches: [ master ] + branches: [ PyShp-fix-CI ] pull_request: - branches: [ master ] + branches: [ PyShp-fix-CI ] jobs: build: From 77322dabdcb136204f4a758b56864b0d3479622f Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:26:56 +0000 Subject: [PATCH 11/11] Target master for PR into PyShp --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8d8bb5..0e69616 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,9 @@ name: build on: push: - branches: [ PyShp-fix-CI ] + branches: [ master ] pull_request: - branches: [ PyShp-fix-CI ] + branches: [ master ] jobs: build: