diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26e1159..24676fa 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.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"] + + 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 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/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. diff --git a/requirements.test.txt b/requirements.test.txt index b3eaa8c..27472ef 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -1,2 +1,2 @@ -pytest==3.2.5 +pytest setuptools