diff --git a/.github/workflows/basemap-data-hires.yml b/.github/workflows/basemap-data-hires.yml deleted file mode 100644 index a33ddb149..000000000 --- a/.github/workflows/basemap-data-hires.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: basemap-data-hires - -env: - PKGDIR: "packages/basemap_data_hires" - PIP_DEFAULT_TIMEOUT: 10 - PIP_DISABLE_PIP_VERSION_CHECK: 1 - PIP_PREFER_BINARY: 1 - PIP_RETRIES: 0 - PYTHONUNBUFFERED: "1" - PYTHONWARNINGS: "ignore:DEPRECATION" - -on: - push: - paths: - - ".github/workflows/basemap-data-hires.yml" - - "packages/basemap_data_hires/**" - pull_request: - paths: - - ".github/workflows/basemap-data-hires.yml" - - "packages/basemap_data_hires/**" - workflow_dispatch: - -jobs: - - checkout: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Upload checkout - uses: actions/upload-artifact@v4 - with: - name: checkout - path: . - - build: - strategy: - matrix: - python-version: - ["2.7"] - max-parallel: 1 - needs: checkout - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Build sdist and wheel - run: | - cd ${{ env.PKGDIR }} - python setup.py sdist - pip wheel -w dist --no-deps dist/*.zip - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - test: - strategy: - matrix: - python-version: - ["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", - "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: build - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - - name: Install package - run: | - pip install ${{ env.PKGDIR }}/dist/*.whl - - - name: Test package - run: | - python -c "from mpl_toolkits import basemap_data; print(basemap_data)" - - upload: - strategy: - matrix: - python-version: - ["2.7"] - max-parallel: 1 - if: startsWith(github.event.ref, 'refs/tags/v') - needs: test - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - environment: PyPI - steps: - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - - name: Install upload requirements - run: | - pip install twine - - - name: Check distributables - run: | - python -m twine check \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*.whl - - - name: Upload distributables - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}" - TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}" - run: | - python -m twine upload --skip-existing \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*.whl diff --git a/.github/workflows/basemap-data.yml b/.github/workflows/basemap-data.yml deleted file mode 100644 index 629213f31..000000000 --- a/.github/workflows/basemap-data.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: basemap-data - -env: - PKGDIR: "packages/basemap_data" - PIP_DEFAULT_TIMEOUT: 10 - PIP_DISABLE_PIP_VERSION_CHECK: 1 - PIP_PREFER_BINARY: 1 - PIP_RETRIES: 0 - PYTHONUNBUFFERED: "1" - PYTHONWARNINGS: "ignore:DEPRECATION" - -on: - push: - paths: - - ".github/workflows/basemap-data.yml" - - "packages/basemap_data/**" - pull_request: - paths: - - ".github/workflows/basemap-data.yml" - - "packages/basemap_data/**" - workflow_dispatch: - -jobs: - - checkout: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Upload checkout - uses: actions/upload-artifact@v4 - with: - name: checkout - path: . - - build: - strategy: - matrix: - python-version: - ["2.7"] - max-parallel: 1 - needs: checkout - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Build sdist and wheel - run: | - cd ${{ env.PKGDIR }} - python setup.py sdist - pip wheel -w dist --no-deps dist/*.zip - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - test: - strategy: - matrix: - python-version: - ["2.6", "2.7", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", - "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: build - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - - name: Install package - run: | - pip install ${{ env.PKGDIR }}/dist/*.whl - - - name: Test package - run: | - python -c "from mpl_toolkits import basemap_data; print(basemap_data)" - - upload: - strategy: - matrix: - python-version: - ["2.7"] - max-parallel: 1 - if: startsWith(github.event.ref, 'refs/tags/v') - needs: test - runs-on: ubuntu-latest - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - environment: PyPI - steps: - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build - path: ${{ env.PKGDIR }}/dist - - - name: Install upload requirements - run: | - pip install twine - - - name: Check distributables - run: | - python -m twine check \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*.whl - - - name: Upload distributables - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}" - TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}" - run: | - python -m twine upload --skip-existing \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*.whl diff --git a/.github/workflows/basemap-for-manylinux.yml b/.github/workflows/basemap-for-manylinux.yml deleted file mode 100644 index cdd577b17..000000000 --- a/.github/workflows/basemap-for-manylinux.yml +++ /dev/null @@ -1,449 +0,0 @@ -name: basemap-for-manylinux - -env: - PKGDIR: "packages/basemap" - PIP_DEFAULT_TIMEOUT: 10 - PIP_DISABLE_PIP_VERSION_CHECK: 1 - PIP_PREFER_BINARY: 1 - PIP_RETRIES: 0 - PYTHONUNBUFFERED: "1" - PYTHONWARNINGS: "ignore:DEPRECATION" - -on: - push: - paths: - - ".github/workflows/basemap-for-manylinux.yml" - - "packages/basemap/**" - pull_request: - paths: - - ".github/workflows/basemap-for-manylinux.yml" - - "packages/basemap/**" - workflow_dispatch: - -jobs: - - checkout: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v1 - - - name: Upload checkout - uses: actions/upload-artifact@v1 - with: - name: checkout - path: . - - lint: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: checkout - container: "pylegacy/python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - - - name: Install lint requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements-lint.txt - - - name: Install library requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements.txt - - - name: Run Flake8 - run: | - cd ${{ env.PKGDIR }} - if [ -x "$(command -v flake8)" ]; then - flake8 src/mpl_toolkits/basemap/cm.py src/mpl_toolkits/basemap/diagnostic.py src/mpl_toolkits/basemap/proj.py src/mpl_toolkits/basemap/solar.py test; - fi - - - name: Run PyLint - run: | - cd ${{ env.PKGDIR }} - if [ -x "$(command -v pylint)" ]; then - pylint src/mpl_toolkits/basemap/cm.py src/mpl_toolkits/basemap/diagnostic.py src/mpl_toolkits/basemap/proj.py src/mpl_toolkits/basemap/solar.py test; - fi - - build-geos: - strategy: - matrix: - arch: - ["x64", "x86"] - max-parallel: 2 - fail-fast: false - needs: lint - runs-on: ubuntu-latest - container: "pylegacy/${{ matrix.arch }}-python:3.8-debian-4" - steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - - - name: Install CMake 3.6.2 - run: | - apt-get update - apt-get install -y libidn11 - pkgvers=3.6.2 - pkgname=cmake - pkgcode=cmake-${pkgvers} - case "${{ matrix.arch }}" in - x86) pkgfile=${pkgcode}-Linux-i386.tar.gz;; - *) pkgfile=${pkgcode}-Linux-x86_64.tar.gz;; - esac - wget https://github.com/Kitware/CMake/releases/download/v${pkgvers}/${pkgfile} -P /tmp - tar -xf /tmp/${pkgfile} --strip-components=1 -C /usr - rm -rf /tmp/${pkgfile} - - - name: Install GCC toolchain - run: | - apt-get update - apt-get install -y gcc g++ make - - - name: Build GEOS from source - run: | - cd ${{ env.PKGDIR }} - python -c "import utils; utils.GeosLibrary('3.6.5').build('extern', njobs=16)" - - - name: Upload GEOS artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-geos-${{ matrix.arch }} - path: ${{ env.PKGDIR }}/extern - - build: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: build-geos - runs-on: ubuntu-latest - container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-4" - steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - - - name: Download GEOS artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-geos-${{ matrix.arch }} - path: ${{ env.PKGDIR }}/extern - - - name: Install GCC toolchain - run: | - apt-get update - apt-get install -y gcc g++ make - - - name: Build old numpy from source - run: | - case "${{ matrix.arch }}" in - x64) arch="x86_64" ;; - x86) arch="i686" ;; - esac - case "${{ matrix.python-version }}" in - 2.6|3.[23]) pkgvers=1.11.3; tag=manylinux1 ;; - 2.7|3.[456789]) pkgvers=1.16.6; tag=manylinux1 ;; - 3.10) pkgvers=1.21.4; tag=manylinux1 ;; - 3.11) pkgvers=1.23.3; tag=manylinux_2_17 ;; - *) pkgvers=1.26.1; tag=manylinux_2_28 ;; - esac - case "${{ matrix.python-version }}" in - 3.11|3.12) - # Dirty solution to get NumPy headers for Python 3.11 and 3.12. - kwds="--plat=${tag}_${arch}" - pip download --no-deps ${kwds} "numpy==${pkgvers}" - oldpkgfile=$(ls *.whl | head -n1) - newpkgfile=$(echo "${oldpkgfile}" | sed "s/${tag}/linux/") - mv "${oldpkgfile}" "${newpkgfile}" - pip install "${newpkgfile}" - rm "${newpkgfile}" - ;; - *) - pip install "numpy == ${pkgvers}" - ;; - esac - - - name: Build wheel - run: | - sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2) - export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern" - export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include - case "${{ matrix.python-version }}" in - 3.11|3.12) - kwds="--no-build-isolation" - pip install setuptools wheel "cython >= 0.29, < 3.1" - ;; - esac - cd ${{ env.PKGDIR }} - python setup.py sdist - pip wheel -w dist --no-deps ${kwds} dist/*.zip - - - name: Upload build artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - repair: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: build - runs-on: ubuntu-latest - container: "pylegacy/${{ matrix.arch }}-python:3.8-debian-10" - steps: - - - name: Download GEOS artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-geos-${{ matrix.arch }} - path: ${{ env.PKGDIR }}/extern - - - name: Download build artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - - name: Install auditwheel - run: | - apt-get update - apt-get install -y unzip - pip install patchelf - pip install "auditwheel < 4.0" - - - name: Repair wheel - run: | - cd ${{ env.PKGDIR }} - export LD_LIBRARY_PATH="$(readlink -f extern/lib)" - auditwheel repair -w dist dist/*.whl - - - name: Upload build artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - test: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - exclude: - # Missing precompiled binaries for `numpy`, `matplotlib`, - # `pyproj`, `pillow` and `lxml`. - - arch: "x86" - python-version: "3.12" - max-parallel: 3 - fail-fast: false - needs: repair - runs-on: ubuntu-latest - container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - - - name: Download build artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - - name: Install numpy from source - run: | - apt-get update - apt-get install -y gcc g++ make - pip install "numpy < 1.24" - if: matrix.arch == 'x86' && (matrix.python-version >= '3.8' || matrix.python-version >= '3.10') - - - name: Install test requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements-test.txt - - - name: Install package (full) - run: | - whlpath=$(ls ${{ env.PKGDIR }}/dist/*-manylinux1*.whl | head -n1) - pip install "${whlpath}[owslib,pillow]" - - - name: Test package - run: | - cd ${{ env.PKGDIR }} - export COVERAGE_FILE=.coverage.${{ matrix.python-version }} - python -m pytest \ - --cov="mpl_toolkits.basemap" --cov-report=term \ - --ignore=dist --ignore=build - - - name: Upload test artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-test - path: ${{ env.PKGDIR }}/.coverage.${{ matrix.python-version }} - - coverage: - needs: test - runs-on: ubuntu-latest - container: "pylegacy/python:3.8-debian-10" - steps: - - - name: Checkout - uses: actions/checkout@v1 - - - name: Download test artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-test - path: ${{ env.PKGDIR }} - - - name: Install test requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements-test.txt - - - name: Compute combined coverage - run: | - cd ${{ env.PKGDIR }} - coverage combine - coverage html - coverage report - - - name: Upload coverage artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-coverage - path: ${{ env.PKGDIR }}/htmlcov - - docs: - needs: test - runs-on: ubuntu-latest - container: "pylegacy/python:3.8-debian-10" - steps: - - - name: Download checkout - uses: actions/download-artifact@v1 - with: - name: checkout - path: . - - - name: Install doc requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements-doc.txt - - - name: Download build artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-build-x64-3.8 - path: ${{ env.PKGDIR }}/dist - - - name: Install package - run: | - cd ${{ env.PKGDIR }} - pip install dist/*-manylinux1*.whl - - - name: Run sphinx - run: | - cd ${{ env.PKGDIR }} - python -m sphinx doc/source public - - - name: Upload docs artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts-docs - path: ${{ env.PKGDIR }}/public - - - name: Upload github-pages artifact - uses: actions/upload-pages-artifact@v3 - with: - name: artifacts-github-pages - path: ${{ env.PKGDIR }}/public - - pages: - if: startsWith(github.event.ref, 'refs/tags/v') - needs: docs - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - permissions: - pages: write - id-token: write - steps: - - name: Deploy github-pages - uses: actions/deploy-pages@v3 - id: deployment - - upload: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 1 - if: startsWith(github.event.ref, 'refs/tags/v') - needs: test - runs-on: ubuntu-latest - container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-10" - environment: PyPI - steps: - - - name: Download build artifacts - uses: actions/download-artifact@v1 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - - name: Install upload requirements - run: | - pip install twine - - - name: Check distributables - run: | - python -m twine check \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*-manylinux1*.whl - - - name: Upload distributables - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}" - TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}" - run: | - python -m twine upload --skip-existing \ - ${{ env.PKGDIR }}/dist/*.zip \ - ${{ env.PKGDIR }}/dist/*-manylinux1*.whl diff --git a/.github/workflows/basemap-for-windows.yml b/.github/workflows/basemap-for-windows.yml deleted file mode 100644 index 92eb337fc..000000000 --- a/.github/workflows/basemap-for-windows.yml +++ /dev/null @@ -1,326 +0,0 @@ -name: basemap-for-windows - -env: - PKGDIR: "packages/basemap" - PIP_DEFAULT_TIMEOUT: 10 - PIP_DISABLE_PIP_VERSION_CHECK: 1 - PIP_PREFER_BINARY: 1 - PIP_RETRIES: 0 - PYTHONUNBUFFERED: "1" - PYTHONWARNINGS: "ignore:DEPRECATION" - -on: - push: - paths: - - ".github/workflows/basemap-for-windows.yml" - - "!packages/basemap/doc/**" - - "packages/basemap/**" - pull_request: - paths: - - ".github/workflows/basemap-for-windows.yml" - - "!packages/basemap/doc/**" - - "packages/basemap/**" - workflow_dispatch: - -jobs: - - checkout: - runs-on: windows-2019 - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Upload checkout - uses: actions/upload-artifact@v4 - with: - name: checkout - path: . - - lint: - runs-on: windows-2019 - strategy: - matrix: - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: checkout - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Set Python - uses: pylegacy/actions/setup-pyenv-win@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - - - name: Set Python base packages - run: | - python -m pip install --upgrade pip setuptools wheel - - - name: Install lint requirements - run: | - cd ${{ env.PKGDIR }} - python -m pip install -r requirements-lint.txt - - - name: Install library requirements - run: | - cd ${{ env.PKGDIR }} - python -m pip install -r requirements.txt - - - name: Run Flake8 - run: | - cd ${{ env.PKGDIR }} - if (Get-Command flake8 -errorAction SilentlyContinue) - { - flake8 src/mpl_toolkits/basemap/cm.py src/mpl_toolkits/basemap/diagnostic.py src/mpl_toolkits/basemap/proj.py src/mpl_toolkits/basemap/solar.py test; - } - - - name: Run PyLint - run: | - cd ${{ env.PKGDIR }} - if (Get-Command pylint -errorAction SilentlyContinue) - { - pylint src/mpl_toolkits/basemap/cm.py src/mpl_toolkits/basemap/diagnostic.py src/mpl_toolkits/basemap/proj.py src/mpl_toolkits/basemap/solar.py test; - } - - build-geos: - strategy: - matrix: - arch: - ["x64", "x86"] - msvc-toolset: - ["9.0", "14.0"] - include: - - msvc-toolset: "9.0" - python-version: "2.7" - - msvc-toolset: "14.0" - python-version: "3.5" - max-parallel: 4 - fail-fast: false - needs: lint - runs-on: windows-2019 - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Set MSVC toolset - uses: pylegacy/actions/setup-msvc@v2 - with: - arch: ${{ matrix.arch }} - toolset: ${{ matrix.msvc-toolset }} - - - name: Set CMake - uses: jwlawson/actions-setup-cmake@v2.0 - with: - cmake-version: "3.24.2" - - - name: Set Python - uses: pylegacy/actions/setup-pyenv-win@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - - - name: Build GEOS from source - run: | - cd ${{ env.PKGDIR }} - python -c "import utils; utils.GeosLibrary('3.6.5').build('extern', toolset='${{ matrix.msvc-toolset }}', njobs=16)" - - - name: Upload GEOS artifacts - uses: actions/upload-artifact@v4 - with: - name: artifacts-geos-${{ matrix.arch }}-msvc${{ matrix.msvc-toolset }} - path: ${{ env.PKGDIR }}/extern - - build: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 3 - fail-fast: false - needs: build-geos - runs-on: windows-2019 - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Set Python - uses: pylegacy/actions/setup-pyenv-win@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - - - name: Set Python base packages - run: | - python -m pip install --upgrade pip setuptools wheel - - - name: Build old numpy from source - run: | - Switch -regex ("${{ matrix.python-version }}") { - "^2\.6|3\.[123]$" { Set-Variable -Name "pkgvers" -Value "1.11.3" } - "^2\.7|3\.[456789]$" { Set-Variable -Name "pkgvers" -Value "1.16.6" } - "^3\.10$" { Set-Variable -Name "pkgvers" -Value "1.21.4" } - "^3\.11$" { Set-Variable -Name "pkgvers" -Value "1.23.3" } - default { Set-Variable -Name "pkgvers" -Value "1.26.1" } - } - $env:SETUPTOOLS_USE_DISTUTILS = "stdlib" - python -m pip install "numpy == ${pkgvers}" - - - name: Set MSVC toolset version - run: | - if ("${{ matrix.python-version }}" -eq "2.7") { - echo "msvc-toolset=9.0" >> $env:GITHUB_ENV - } else { - echo "msvc-toolset=14.0" >> $env:GITHUB_ENV - } - - - name: Set MSVC toolset - uses: pylegacy/actions/setup-msvc@v2 - with: - arch: ${{ matrix.arch }} - toolset: ${{ env.msvc-toolset }} - - - name: Download GEOS artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-geos-${{ matrix.arch }}-msvc${{ env.msvc-toolset }} - path: ${{ env.PKGDIR }}/extern - - - name: Build sdist and wheel - run: | - cd ${{ env.PKGDIR }} - $env:GEOS_DIR = "$env:GITHUB_WORKSPACE/${{ env.PKGDIR }}/extern" - python -m pip install -r requirements-setup.txt - python setup.py sdist - python -m pip wheel -w dist --no-deps (Get-Item dist/*.zip) - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - test: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - exclude: - # Missing precompiled binaries for `numpy` and `matplotlib`. - - arch: "x86" - python-version: "3.12" - max-parallel: 3 - fail-fast: false - needs: build - runs-on: windows-2019 - steps: - - - name: Download checkout - uses: actions/download-artifact@v4 - with: - name: checkout - path: . - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - - name: Set Python - uses: pylegacy/actions/setup-pyenv-win@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - - - name: Set Python base packages - run: | - python -m pip install --upgrade pip setuptools wheel - - - name: Install test requirements - run: | - cd ${{ env.PKGDIR }} - pip install -r requirements-test.txt - - - name: Install package (full) - run: | - $whlpath = "$(Get-Item ${{ env.PKGDIR }}/dist/*-win*.whl)" - python -m pip install "${whlpath}[owslib,pillow]" - - - name: Test package - run: | - cd ${{ env.PKGDIR }} - $env:COVERAGE_FILE = ".coverage.${{ matrix.arch }}.${{ matrix.python-version }}" - python -m pytest ` - --cov="mpl_toolkits.basemap" --cov-report=term ` - --ignore=dist --ignore=build - - - name: Upload test artifacts - uses: actions/upload-artifact@v4 - with: - name: artifacts-test-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/.coverage.${{ matrix.arch }}.${{ matrix.python-version }} - - upload: - strategy: - matrix: - arch: - ["x64", "x86"] - python-version: - ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - max-parallel: 1 - if: startsWith(github.event.ref, 'refs/tags/v') - needs: test - runs-on: windows-2019 - environment: PyPI - steps: - - - name: Set Python - uses: pylegacy/actions/setup-pyenv-win@v2 - with: - architecture: ${{ matrix.arch }} - python-version: ${{ matrix.python-version }} - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} - path: ${{ env.PKGDIR }}/dist - - - name: Install upload requirements - run: | - python -m pip install twine - - - name: Check distributables - run: | - python -m twine check ` - ${{ env.PKGDIR }}/dist/*.zip ` - ${{ env.PKGDIR }}/dist/*.whl - - - name: Upload distributables - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}" - TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}" - run: | - python -m twine upload --skip-existing ` - ${{ env.PKGDIR }}/dist/*.whl diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..e99b14397 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,277 @@ +on: + push: + paths: + - "**" + pull_request: + paths: + - "**" + workflow_dispatch: + +jobs: + build_data: + name: Build data + strategy: + matrix: + package: [basemap_data, basemap_data_hires] + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Build data sdist and wheel + run: | + cd data/${{ matrix.package }} + python -m pip install build wheel + python -m build + + - name: Upload data sdist and wheel + uses: actions/upload-artifact@v4 + with: + path: | + data/${{ matrix.package }}/dist/*.tar.gz + data/${{ matrix.package }}/dist/*.whl + name: dist-${{ matrix.package }} + + build_sdist: + name: Build sdist + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Build basemap sdist + run: | + python -m pip install build + python -m build --sdist + + - name: Upload basemap sdist + uses: actions/upload-artifact@v4 + with: + path: dist/*.tar.gz + name: dist-basemap-sdist + + build_wheels: + name: Build wheels + needs: [build_sdist] + strategy: + matrix: + os: [ubuntu-22.04, windows-2022, macos-13, macos-14] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Download basemap sdist + uses: actions/download-artifact@v4 + with: + name: dist-basemap-sdist + path: ./sdist/ + + - name: Extract basemap sdist (Linux/macOS) + if: runner.os != 'Windows' + shell: bash + run: | + # Create extraction directory in the workspace + mkdir -p ./sdist_extract + + # Extract with tar using wildcard + tar -xvf ./sdist/*.tar.gz -C ./sdist_extract + + # Get the extracted directory name + EXTRACTED_DIR="$(ls -d ./sdist_extract/*/ | head -1)" + + # Verify contents + ls -la "${EXTRACTED_DIR}" + + # Set the environment variable + echo "SDIST_DIR=$(pwd)/${EXTRACTED_DIR}" >> $GITHUB_ENV + + - name: Extract basemap sdist (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + # Create extraction directory in the workspace + New-Item -ItemType Directory -Force -Path "sdist_extract" + + # Extract with tar using the specific file path (no wildcard) + $tarball = Get-ChildItem -Path "sdist" -Filter "*.tar.gz" | Select-Object -First 1 + tar -xvf $tarball.FullName -C "sdist_extract" + + # Get the extracted directory name + $extractedDir = (Get-ChildItem -Path "sdist_extract" -Directory | Select-Object -First 1).FullName + + # Verify contents + Get-ChildItem "$extractedDir" + + # Set the environment variable + echo "SDIST_DIR=$extractedDir" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Build basemap wheels from sdist + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_ARCHS: "native" + CIBW_BUILD: "cp39* cp310* cp311* cp312* cp313*" + CIBW_BUILD_VERBOSITY: 1 + CIBW_SKIP: "*-musllinux_*" + CIBW_BEFORE_ALL: "python {project}/.github/workflows/run_before_all.py" + CIBW_BEFORE_TEST: "python -m pip install {project}/data/basemap_data {project}/data/basemap_data_hires" + CIBW_TEST_EXTRAS: "test" + CIBW_TEST_COMMAND: "python -m pytest {project}/test" + CIBW_ENVIRONMENT: >- + GEOS_VERSION="3.6.5" + GEOS_DIR="$(pwd)/extern" + GEOS_NJOBS=4 + PIP_PREFER_BINARY=1 + PYTHONUNBUFFERED=1 + LD_LIBRARY_PATH="${GEOS_DIR}/lib" + # LD_LIBRARY_PATH in environment is needed by + # auditwheel (Linux) and delocate (MacOS). + with: + package-dir: ${{ env.SDIST_DIR }} + output-dir: "dist" + # Set `package-dir` to a folder with the extracted sdist; + # otherwise, `cibuildwheel` uses `python -m pip wheel` or + # `python -m build --wheel` with the repository package + # folder and we cannot guarantee that wheels can be built + # from the sdist. + + - name: Upload basemap wheels + uses: actions/upload-artifact@v4 + with: + path: dist/*.whl + name: dist-basemap-wheels-${{ matrix.os }} + + check: + name: Check packages + needs: [build_data, build_sdist, build_wheels] + runs-on: ubuntu-22.04 + steps: + - name: Download basemap and data packages + uses: actions/download-artifact@v4 + with: + path: dist + pattern: "dist-*" + merge-multiple: true + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Check packages with twine + run: | + python -m pip install twine + python -m twine check dist/*.tar.gz + python -m twine check dist/*.whl + + docs: + name: Build docs + needs: [check] + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Download data packages + uses: actions/download-artifact@v4 + with: + path: ./data_packages/ + pattern: "dist-basemap_data*" + merge-multiple: true + + - name: Download basemap wheels for Linux + uses: actions/download-artifact@v4 + with: + path: ./wheels/ + pattern: "dist-basemap-wheels-ubuntu-*" + merge-multiple: true + + - name: Install basemap and data packages + run: | + # Get Python version. + IMPL=cp$(python -c "import sys; print('{0}{1}'.format(*sys.version_info[:2]))") + + # Install data packages. + python -m pip install ./data_packages/*.whl + + # Install basemap wheel matching current Python version. + WHEEL=$(find ./wheels -name "*-${IMPL}-${IMPL}*.whl" | head -1) + if [ -n "${WHEEL}" ]; then + python -m pip install "${WHEEL}" + else + echo "No matching wheel found for ${IMPL}-${IMPL}" + exit 1 + fi + + - name: Install docs requirements + run: | + python -m pip install -r dep/requirements-doc.txt + + - name: Run sphinx + run: | + python -m sphinx -j auto doc/source public + + - name: Upload docs artifacts + uses: actions/upload-artifact@v4 + with: + name: docs + path: public + + - name: Upload github-pages artifact + uses: actions/upload-pages-artifact@v3 + with: + name: github-pages + path: public + + pages: + name: Deploy docs + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + needs: [docs] + runs-on: ubuntu-22.04 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + steps: + - name: Deploy github-pages + uses: actions/deploy-pages@v3 + id: deployment + + upload: + name: Upload packages + needs: [check] + runs-on: ubuntu-22.04 + environment: PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download basemap and data packages + uses: actions/download-artifact@v4 + with: + path: dist + pattern: "dist-*" + merge-multiple: true + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }} + repository-url: ${{ secrets.PYPI_REPOSITORY_URL }} + skip-existing: true diff --git a/.github/workflows/run_before_all.py b/.github/workflows/run_before_all.py new file mode 100644 index 000000000..b6957b0a0 --- /dev/null +++ b/.github/workflows/run_before_all.py @@ -0,0 +1,37 @@ +#! /usr/bin/env python +"""Helper script to be run by `cibuildwheel` as `before_all` step.""" + +import os +import sys + +HERE = os.path.abspath(__file__) +ROOT = os.path.dirname(os.path.dirname(os.path.dirname(HERE))) +sys.path.insert(0, os.path.join(ROOT)) +import utils # noqa: E402 # pylint: disable=imports + + +def main(): + """Build the GEOS library based on parsed environment variables.""" + + geos_version = os.environ.get("GEOS_VERSION", None) + if geos_version is None: + raise ValueError("Undefined environment variable GEOS_VERSION") + + geos_dir = os.environ.get("GEOS_DIR", None) + if geos_dir is None: + raise ValueError("Undefined environment variable GEOS_DIR") + + geos_njobs = int(os.environ.get("GEOS_NJOBS", 1)) + + # pylint: disable=consider-using-f-string + print("Running before_all script with the following settings:") + print("GEOS_DIR: {0}".format(geos_dir)) + print("GEOS_VERSION: {0}".format(geos_version)) + print("GEOS_NJOBS: {0}".format(geos_njobs)) + + utils.GeosLibrary(geos_version).build(geos_dir, njobs=geos_njobs) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.gitignore b/.gitignore index e67dd9643..aafbb3a83 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ build dist *.egg-info -*.pyc -*.pyd +*.py[cod] +*.dll *.so htmlcov @@ -33,8 +33,7 @@ Thumbs.db # Things specific to this project. *.pickle -examples/*.png -packages/basemap/doc/examples -packages/basemap/doc/users/installing.rst -packages/basemap/doc/_static/matplotlibrc -packages/basemap/doc/_templates/gallery.html +doc/build +doc/examples/*.png +doc/source/_static/matplotlibrc +doc/source/_templates/gallery.html diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..fdae75d64 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,573 @@ +[MASTER] + +# Analyse import fallback blocks. This can be used to support both +# Python 2 and 3 compatible code, which means that the block might have +# code that exists only in one or another interpreter, leading to false +# positives when analysed. +analyse-fallback-blocks=no + +# Clear in-memory caches upon conclusion of linting. Useful if running +# pylint in a server-like mode. +clear-cache-post-run=yes + +# A comma-separated list of package or module names from where +# C extensions may be loaded. Extensions are loading into the +# active Python interpreter and may run arbitrary code. +extension-pkg-whitelist= + numpy, + _geoslib + +# Files or directories to be skipped (base names, not paths). +ignore=CVS + +# Files or directories matching the regular expression patterns are +# skipped. The regex matches against base names, not paths. The +# default value ignores Emacs file locks. +ignore-patterns=^\.# + +# List of module names for which member attributes should not be checked +# and will not be imported (useful for modules/projects where namespaces +# are manipulated during runtime and thus existing member attributes +# cannot be deduced by static analysis). It supports qualified module +# names, as well as Unix pattern matching. +ignored-modules= + _geoslib + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +init-hook="import sys; sys.path.insert(0, 'src')" + +# Use multiple processes to speed up Pylint. Specifying 0 will +# auto-detect the number of processors available to use, and will +# cap the count on Windows to avoid hangs. +jobs=1 + +# Control the amount of potential inferred values when inferring a +# single object. This can help the performance when dealing with +# large functions or complex, nested conditions. +limit-inference-results=100 + +# List of plugins (as comma separated values of python module names) +# to load, usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# When enabled, pylint would attempt to guess common misconfiguration +# and emit user-friendly hints instead of false-positive error messages. +suggestion-mode=yes + +# Allow loading of arbitrary C extensions. Extensions are imported into +# the active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[BASIC] + +# Naming style matching correct argument names. +argument-naming-style=snake_case + +# Regular expression matching correct argument names. +# Overrides argument-naming-style. +#argument-rgx= + +# Naming style matching correct attribute names. +attr-naming-style=snake_case + +# Regular expression matching correct attribute names. +# Overrides attr-naming-style. +#attr-rgx= + +# Bad variable names which should always be refused. +bad-names= + foo, + bar, + baz, + toto, + tutu, + tata + +# Naming style matching correct class attribute names. +class-attribute-naming-style=any + +# Regular expression matching correct class attribute names. +# Overrides class-attribute-naming-style. +#class-attribute-rgx= + +# Naming style matching correct class names. +class-naming-style=PascalCase + +# Regular expression matching correct class names. +# Overrides class-naming-style. +#class-rgx= + +# Naming style matching correct constant names. +const-naming-style=any + +# Regular expression matching correct constant names. +# Overrides const-naming-style. +#const-rgx= + +# Minimum line length for functions/classes that require docstrings, +# shorter ones are exempt. +docstring-min-length=-1 + +# Naming style matching correct function names. +function-naming-style=snake_case + +# Regular expression matching correct function names. +# Overrides function-naming-style. +#function-rgx= + +# Good variable names which should always be accepted. +good-names= + i, j, k, m, n, + t, x, y, z, xy, + nx, dx, x1, x2, + ny, dy, y1, y2, + fd, ax, h, + _ + +# Include a hint for the correct naming format with invalid-name. +include-naming-hint=no + +# Naming style matching correct inline iteration names. +inlinevar-naming-style=snake_case + +# Regular expression matching correct inline iteration names. +# Overrides inlinevar-naming-style. +#inlinevar-rgx= + +# Naming style matching correct method names. +method-naming-style=snake_case + +# Regular expression matching correct method names. +# Overrides method-naming-style. +#method-rgx= + +# Naming style matching correct module names. +#module-naming-style=snake_case + +# Regular expression matching correct module names. +# Overrides module-naming-style. +module-rgx=^(test_)?((?P_{0,2}[a-z][a-z0-9_]{1,29}_{0,2})|(?P_?[A-Z][a-zA-Z0-9]{1,29}_{0,2}))$ + +# Colon-delimited sets of names that determine each other's naming style +# when the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names +# that do not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, e.g. abc.abstractproperty. +# Add to this list to register other decorators that produce valid +# properties. These decorators are taken in consideration only for +# invalid-name. +property-classes= + abc.abstractproperty + +# Naming style matching correct variable names. +variable-naming-style=snake_case + +# Regular expression matching correct variable names. +# Overrides variable-naming-style. +#variable-rgx= + + +[CLASSES] + +# Warn about protected attribute access inside special methods. +check-protected-access-in-special-methods=yes + +# Method names used to declare (i.e. assign) instance attributes. +defining-attr-methods= + __init__, + __new__, + setUp, + asyncSetUp, + __post_init__ + +# Member names to be excluded from the protected access warning. +exclude-protected= + _asdict, + _fields, + _replace, + _source, + _make, + os._exit + +# List of valid names for first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[DESIGN] + +# Maximum number of arguments for function / method (R0913). +max-args=6 + +# Maximum number of attributes for a class (R0902). +max-attributes=12 + +# Maximum number of boolean expressions in an if statement (R0916). +max-bool-expr=6 + +# Maximum number of branch for function / method body (R0912). +max-branches=24 + +# Maximum number of locals for function / method body (R0914). +max-locals=24 + +# Maximum number of parents for a class (R0901). +max-parents=18 + +# Maximum number of positional arguments for function / method (R0917). +max-positional-arguments=6 + +# Maximum number of public methods for a class (R0904). +max-public-methods=90 + +# Maximum number of return / yield for function / method body. +max-returns=6 + +# Maximum number of statements in function / method body (R0915). +max-statements=90 + +# Minimum number of public methods for a class (R0903). +min-public-methods=1 + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when caught. +overgeneral-exceptions= + builtins.BaseException, + builtins.Exception + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any), LF or CRLF. +expected-line-ending-format=LF + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent needed inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) +# or "\t" (1 tab). +indent-string=" " + +# Maximum number of characters on a single line. +max-line-length=99 + +# Maximum number of lines in a module. +max-module-lines=999 + +# Allow the body of a class to be on the same line as the declaration +# if body contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there +# is no else. +single-line-if-stmt=no + + +[IMPORTS] + +# List of modules that can be imported at any level, not just the top +# level one. +allow-any-import-level= + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Deprecated modules which should not be used, separated by a comma. +deprecated-modules= + +# Output a graph (.gv or any supported image format) of external +# dependencies to the given file (report RP0402 must not be disabled). +ext-import-graph= + +# Output a graph (.gv or any supported image format) of all +# (i.e. internal and external) dependencies to the given file +# (report RP0402 must not be disabled). +import-graph= + +# Output a graph (.gv or any supported image format) of internal +# dependencies to the given file (report RP0402 must not be disabled). +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party +# library. +known-third-party= + enchant + +# Couples of modules and preferred modules, separated by a comma. +preferred-modules= + + +[LOGGING] + +# The type of string formatting that logging methods do. `old` means +# using % formatting, `new` is for `{}` formatting. +logging-format-style=old + +# Logging modules to check that the string format arguments are in +# logging function parameter format. +logging-modules=logging + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to +# show all. Valid levels: HIGH, CONTROL_FLOW (pylint >= 2.13.0), +# INFERENCE, INFERENCE_FAILURE, UNDEFINED. +confidence= + +# Disable the message, report, category or checker with the given id(s). +# You can either give multiple identifiers separated by comma (,) or +# put this option multiple times (only on the command line, not in the +# configuration file where it should appear only once). You can also +# use "--disable=all" to disable everything first and then re-enable +# specific checks. For example, if you want to run only the similarities +# checker, you can use "--disable=all --enable=similarities". If you +# want to run only the classes checker, but have no Warning level +# messages displayed, use "--disable=all --enable=classes --disable=W". +disable= + # Allow freedom with imports. + import-outside-toplevel, + # Allow freedom with globals. + global-statement, + global-variable-not-assigned, + global-variable-undefined, + undefined-all-variable, + # Allow freedom with inheritance. + useless-object-inheritance, + super-with-arguments, + # Allow assigning to returned None. + assignment-from-no-return, + assignment-from-none, + # Allow freedom with error raises. + raise-missing-from, + # Allow freedom with using lambda functions. + unnecessary-lambda-assignment, + # Allow freedom with multiline indentation. + useless-option-value, + bad-continuation, + # Allow freedom with old ways of doing things. + consider-using-f-string, + use-dict-literal, + use-yield-from, + # Ignore warnings unknown by old PyLint versions. + bad-option-value, + unrecognized-option, + unknown-option-value + +# Enable the message, report, category or checker with the given id(s). +# You can either give multiple identifier separated by comma (,) or put +# this option multiple time (only on the command line, not in the +# configuration file where it should appear only once). See also the +# "--disable" option for examples. +enable=c-extension-no-member + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes= + FIXME, + XXX, + TODO + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body. +max-nested-blocks=6 + +# Complete name of functions that never returns. When checking for +# inconsistent-return-statements if a never returning function is +# called then it will be considered as an explicit return statement +# and no message will be printed. +never-returning-functions= + sys.exit, + argparse.parse_error + + +[REPORTS] + +# Python expression which should return a score less than or equal to +# 10. You have access to the variables 'fatal', 'error', 'warning', +# 'refactor', 'convention', and 'info' which contain the number of +# messages in each category, as well as 'statement' which is the total +# number of statements analyzed. This score is used by the global +# evaluation report (RP0004). +evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) + +# Template used to display messages. This is a python new-style format +# string used to format the message information. See doc for all +# details. +msg-template= + +# Set the output format. Available formats are: text, parseable, +# colorized, json2 (improved json format), json (old json format) +# and msvs (visual studio). You can also give a reporter class, +# e.g. mypackage.mymodule.MyReporterClass. +#output-format= + +# Tells whether to display a full report or only the messages. +reports=no + +# Activate the evaluation score. +score=yes + + +[SIMILARITIES] + +# Comments are removed from the similarity computation. +ignore-comments=yes + +# Docstrings are removed from the similarity computation. +ignore-docstrings=yes + +# Imports are removed from the similarity computation. +ignore-imports=yes + +# Signatures are removed from the similarity computation. +ignore-signatures=yes + +# Minimum lines number of a similarity. +min-similarity-lines=30 + + +[SPELLING] + +# Limits count of emitted suggestions for spelling mistakes. +max-spelling-suggestions=4 + +# Spelling dictionary name. No available dictionaries: You need to +# install both the python package and the system dependency for +# enchant to work. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# Path to a file containing the private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to the private dictionary (see +# the --spelling-private-dict-file option) instead of raising a message. +spelling-store-unknown-words=no + + +[STRING] + +# This flag controls whether inconsistent-quotes generates a warning +# when the character used as a quote delimiter is used inconsistently +# within a module. +check-quote-consistency=yes + +# This flag controls whether the implicit-str-concat should generate a +# warning on implicit string concatenation in sequences defined over +# several lines. +check-str-concat-over-line-jumps=no + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register +# other decorators that produce valid context managers. +contextmanager-decorators= + contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint +# inference system, and so shouldn't trigger E1101 when accessed. +# Python regular expressions are accepted. +generated-members= + netCDF4, + numpy, + pyproj, + mpl_toolkits.basemap.Basemap + +# Tells whether to warn about missing members when the owner of the +# attribute is inferred to be None. +ignore-none=yes + +# This flag controls whether pylint should warn about no-member and +# similar checks whenever an opaque object is returned when inferring. +# The inference can return multiple potential results while evaluating a +# Python object, but some branches might not be evaluated, which results +# in partial inference. In that case, it might be useful to still emit +# no-member and other checks for the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked +# (useful for classes with dynamically set attributes). This supports +# the use of qualified names. +ignored-classes= + optparse.Values, + thread._local, + _thread._local, + argparse.Namespace + +# Show a hint with possible names when a member name was not found. +# The aspect of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be +# considered a similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in +# consideration when showing a hint for a missing member. +missing-member-max-choices=1 + +# List of decorators that change the signature of a decorated function. +signature-mutators= + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember +# that you should avoid defining new builtins when possible. +additional-builtins= + +# Set whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. +# A callback name must start or end with one of those strings. +callbacks= + cb_, + _cb + +# A regular expression matching the name of dummy variables +# (i.e. expected to not be used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can +# redefine builtins. +redefining-builtins-modules= + past.builtins, + future.builtins, + builtins, + io diff --git a/CHANGELOG.md b/CHANGELOG.md index d9bdc4fa9..a3599f28b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,88 @@ https://keepachangelog.com/en/1.0.0/ https://semver.org/spec/v2.0.0.html +## [Unreleased] + +## [2.0.0] - 2025-06-13 + +### Added +- Python 3.13 support (PR [#619], solves issue [#608]). +- NumPy 2.0 support (PR [#614] by @cvanelteren, solves issue [#604]). +- Automated MacOS wheels for x86_64 and arm64 (PR [#620] by + @cvanelteren, solves issue [#608]). +- Support in `Basemap.wmsimage` to redirect `WebMapService` constructor + parameters when available (PR [#603] by @Kurea, solves issue [#602]). + +### Changed +- **BREAKING CHANGE**: Set Python minimum supported version to 3.9. +- **BREAKING CHANGE**: Migrate project structure (solves issue [#616]): + - The repository root is repurposed again for the `basemap` project. + - The auxiliary data packages are moved inside the `data` folder. + - The requirements files are moved to its own `dep` folder. + - The `examples` folder is moved inside the `doc` folder. +- **BREAKING CHANGE**: Migrate `basemap` libraries to use implicit + namespace packages (PR [#576] by @ksunden). +- Migrate GitHub CI workflows to use `cibuildwheel` (PRs [#614], [#618], + [#622] and [#623] by @cvanelteren and PR [#621], solves GitHub + artifact actions v1 sunset issue). +- Update library dependencies: + - Upgrade lower limit for `basemap_data` to 2.0. + - Upgrade upper limit for `basemap_data` to 3.0. + - Upgrade lower limit for `packaging` to 20.5. + - Upgrade upper limit for `packaging` to 26.0. + - Upgrade lower limit for `numpy` to 2.0. + - Upgrade upper limit for `numpy` to 2.4. + - Upgrade lower limit for `matplotlib` to 3.4. + - Upgrade upper limit for `matplotlib` to 3.11. + - Upgrade lower limit for `pyproj` to 3.0. + - Upgrade upper limit for `pyproj` to 3.8. + - Upgrade lower limit for `pyshp` to 2.0. +- Update optional library dependencies: + - Upgrade upper limit for `OWSLib` to 0.35. +- Update build dependencies: + - Upgrade lower limit for `setuptools` to 67.0. + - Upgrade upper limit for `setuptools` to 81.0. + - Upgrade lower limit for `wheel` to 0.40. + - Upgrade upper limit for `wheel` to 0.46. + - Upgrade lower limit for `cython` to 3.0. + - Upgrade upper limit for `cython` to 3.2. +- Update doc dependencies: + - Upgrade upper limit for `sphinx` to 8.0. + - Upgrade lower limit for `furo` to 2023.9.10. + - Upgrade upper limit for `furo` to 2024.8.7. + - Upgrade lower limit for `scipy` to 1.6. + - Upgrade upper limit for `scipy` to 1.16. + - Upgrade upper limit for `netCDF4` to 1.8.0. +- Update lint dependencies: + - Remove dependency on `unittest2`. + - Upgrade lower limit for `flake8` to 3.9. + - Upgrade upper limit for `flake8` to 7.3. + - Include dependency on `flake8-pyproject`. + - Upgrade lower limit for `astroid` to 3.0. + - Upgrade upper limit for `astroid` to 3.4. + - Upgrade lower limit for `pylint` to 3.0. + - Upgrade upper limit for `pylint` to 3.4. +- Update test dependencies: + - Remove dependency on `unittest2`. + - Upgrade lower limit for `pytest` to 7.0. + - Upgrade upper limit for `pytest` to 8.5. + - Upgrade lower limit for `pytest-cov` to 3.0. + - Upgrade upper limit for `pytest-cov` to 6.3. + - Downgrade lower limit for `coverage` to 5.0. + - Upgrade upper limit for `coverage` to 7.10. + +### Fixed +- Fix Cython extension to use `noexcept` (PR [#615] by @cvanelteren). +- Fix incorrect return order described in `Basemap.shiftdata` docstring + (PR [#624] by @Cdiaz1234, solves issue [#599]). + +### Removed +- Deprecated use of `setup_requires` in `setup.py` file. +- Deprecated `bdist_wheel.universal` option when building wheels. +- Configuration of `sdist` format as zip (replaced by default tar.gz). +- Remove `pillow` as optional dependency, since it is now a transitive + dependency through `matplotlib >= 3.3`. + ## [1.4.1] - 2024-02-15 ### Changed @@ -56,7 +138,7 @@ https://semver.org/spec/v2.0.0.html - Downgrade upper limit for `pyproj` to 2.2.0 for Python 2.7. - Set dependency on `packaging` as replacement for `distutils`. - Update build dependencies: - - Upgrade upper limit for `Cython` to 3.1. + - Upgrade upper limit for `cython` to 3.1. - Update doc dependencies and require at least Python 3.8 for them: - Upgrade upper limit for `sphinx` to 7.2. - Upgrade upper limit for `furo` to 2023.9.11. @@ -1096,6 +1178,36 @@ https://semver.org/spec/v2.0.0.html - Fix glitches in drawing of parallels and meridians. +[#624]: +https://github.com/matplotlib/basemap/pull/624 +[#623]: +https://github.com/matplotlib/basemap/pull/623 +[#622]: +https://github.com/matplotlib/basemap/pull/622 +[#621]: +https://github.com/matplotlib/basemap/pull/621 +[#620]: +https://github.com/matplotlib/basemap/pull/620 +[#619]: +https://github.com/matplotlib/basemap/pull/619 +[#618]: +https://github.com/matplotlib/basemap/pull/618 +[#616]: +https://github.com/matplotlib/basemap/issues/616 +[#615]: +https://github.com/matplotlib/basemap/pull/615 +[#614]: +https://github.com/matplotlib/basemap/pull/614 +[#608]: +https://github.com/matplotlib/basemap/issues/608 +[#604]: +https://github.com/matplotlib/basemap/issues/604 +[#603]: +https://github.com/matplotlib/basemap/pull/603 +[#602]: +https://github.com/matplotlib/basemap/issues/602 +[#599]: +https://github.com/matplotlib/basemap/issues/599 [#598]: https://github.com/matplotlib/basemap/pull/598 [#595]: @@ -1124,6 +1236,8 @@ https://github.com/matplotlib/basemap/pull/580 https://github.com/matplotlib/basemap/issues/579 [#577]: https://github.com/matplotlib/basemap/issues/577 +[#576]: +https://github.com/matplotlib/basemap/pull/576 [#574]: https://github.com/matplotlib/basemap/issues/574 [#573]: @@ -1252,7 +1366,9 @@ https://github.com/matplotlib/basemap/issues/228 https://github.com/matplotlib/basemap/issues/179 [Unreleased]: -https://github.com/matplotlib/basemap/compare/v1.4.1...develop +https://github.com/matplotlib/basemap/compare/v2.0.0...develop +[2.0.0]: +https://github.com/matplotlib/basemap/compare/v1.4.1...v2.0.0 [1.4.1]: https://github.com/matplotlib/basemap/compare/v1.4.0...v1.4.1 [1.4.0]: @@ -1296,6 +1412,10 @@ https://github.com/matplotlib/basemap/compare/v1.0.3rel...v1.0.4rel [1.0.3]: https://github.com/matplotlib/basemap/tree/v1.0.3rel +[CVE-2024-28219]: +https://nvd.nist.gov/vuln/detail/CVE-2024-28219 +[CVE-2023-50447]: +https://nvd.nist.gov/vuln/detail/CVE-2023-50447 [CVE-2023-27476]: https://nvd.nist.gov/vuln/detail/CVE-2023-27476 [CVE-2022-45198]: diff --git a/LICENSE b/LICENSE index 120eb7e3f..68cbd3d24 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2011-2014 Jeffrey Whitaker -Copyright (c) 2015-2024 The Matplotlib development team +Copyright (c) 2015-2025 The Matplotlib development team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/packages/basemap/LICENSE.geos b/LICENSE.geos similarity index 100% rename from packages/basemap/LICENSE.geos rename to LICENSE.geos diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..4bd7236e5 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,18 @@ +include CHANGELOG.md +include LICENSE +include LICENSE.geos +include README.md +include .pylintrc +include pyproject.toml +include dep/requirements*.txt +recursive-exclude **/__pycache__ * +global-exclude *.py[cod] +global-exclude *.dll +global-exclude *.so + +recursive-exclude data * +recursive-include doc * +recursive-exclude doc/build * +recursive-exclude doc/examples * +recursive-include test * +recursive-include utils *.py diff --git a/README.md b/README.md index 21b98ad39..72f43ca3d 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,47 @@ -# Basemap +# basemap -Plot on map projections (with coastlines and political boundaries) -using matplotlib. +Plot on map projections (with coastlines and political boundaries) using +[`matplotlib`]. -## Requirements - -Basic requirements are the following: - -* Python 2.6 (or higher) -* [matplotlib](https://github.com/matplotlib/matplotlib) -* [numpy](https://github.com/numpy/numpy) -* [pyproj](https://github.com/pyproj4/pyproj) -* [pyshp](https://github.com/GeospatialPython/pyshp) +## Installation -Optional requirements include: +Precompiled binary wheels for Windows, GNU/Linux and MacOS are available +on PyPI and can be installed with [`pip`]: +```sh +python -m pip install basemap +``` -* [OWSLib](https://github.com/geopython/OWSLib). It is needed for the - method `Basemap.wmsimage`. +For specific details on how to install [`basemap`] through [`conda`] or +from source, please refer to the [`basemap` installation instructions] +in the documentation. -* [Pillow](https://github.com/python-pillow/Pillow). It is needed for - the methods `Basemap.bluemarble`, `Basemap.etopo`, - `Basemap.shadedrelief` and `Basemap.warpimage`. +## Requirements -## Installation +This package depends on [`basemap-data`] with the basic [`basemap`] +data assets supporting the essential functionality. -The `basemap-data` and `basemap-data-hires` packages are available in -PyPI and can be installed with [`pip`](https://pip.pypa.io/): +This package depends optionally on [`basemap-data-hires`] with +the high-resolution data assets, which can be installed manually +with [`pip`]: ```sh -python -m pip install basemap-data python -m pip install basemap-data-hires ``` -Precompiled `basemap` binary wheels for Windows and GNU/Linux -(architectures x86 and x64, Python 2.7 and 3.5+) as well as for MacOS -(architectures x64 and arm64, Python 3.9+) are also available in PyPI: -```sh -python -m pip install basemap -``` - -Otherwise, you will need to install `basemap` from its source hosted -on GitHub as indicated in the following steps: - -1. Install pre-requisite Python modules: - - [cython](https://github.com/cython/cython) - - [numpy](https://github.com/numpy/numpy) - -2. Download the `basemap` source code and move to the `packages/basemap` - folder: - ```sh - git clone --depth 1 https://github.com/matplotlib/basemap.git - cd basemap/packages/basemap - ``` - -3. Build the [GEOS](https://github.com/libgeos/geos) library. You may - use the helper provided in `utils`, (please note that you need - [`CMake`](https://cmake.org/) and a working C compiler in advance): - ```sh - export GEOS_DIR= - python -c "import utils; utils.GeosLibrary('3.6.5').build(installdir='${GEOS_DIR}')" - ``` - or you can link directly to the system library if it is already - installed. `GEOS_DIR` must point to the GEOS installation prefix; - e.g. if `libgeos_c.so` is located in `/usr/lib` and `geos_c.h` is - located in `/usr/include`, then you must set `GEOS_DIR` to `/usr`. - -4. Build and install the `basemap` binary wheel: - ```sh - python -m pip install . - ``` - On Linux, if your Python was installed through a package management - system, make sure that you have the Python header `Python.h` required - to build Cython extensions (e.g. on Debian-like systems, you should - have the package `python-dev` installed). - -5. Check that the package was installed correctly by executing: - ```sh - python -c "from mpl_toolkits.basemap import Basemap" - ``` +This package depends optionally on [`OWSLib`] for the `Basemap` method +`Basemap.wmsimage`. ## License -The source code and data assets are under the following licenses: - -* `basemap`: [MIT]. - * GEOS bundled dynamic library is under the [LGPL-2.1-only] license. -* `basemap-data`: [LGPL-3.0-or-later]. - * The EPSG file and the JPG images are also under the [MIT] license. -* `basemap-data-hires`: [LGPL-3.0-or-later]. - -For a full description, please visit the `README` and `LICENSE` files of -each package. - -[MIT]: -https://spdx.org/licenses/MIT.html -[LGPL-2.1-only]: -https://spdx.org/licenses/LGPL-2.1-only.html -[LGPL-3.0-or-later]: -https://spdx.org/licenses/LGPL-3.0-or-later.html +The library is licensed under the terms of the [MIT] license (see +[`LICENSE`]). The GEOS dynamic library bundled with the package wheels +is provided under the terms of the [LGPL-2.1-only] license as given in +[`LICENSE.geos`]. ## Documentation -See https://matplotlib.org/basemap/ +See https://matplotlib.org/basemap/. -See scripts in `examples` directory for example usage. +See scripts in the `doc/examples` directory for example usage. Read the FAQ and/or email the matplotlib-users mailing list if you have problems or questions. @@ -130,4 +69,36 @@ situations, what is the inside of a coastline polygon can be ambiguous, and the outside may be filled instead of the inside. A workaround is to change the map projection region slightly or mask the land areas with the `Basemap.drawlsmask` method instead of filling the coastline -polygons (this is illustrated in the `ortho_demo.py` example). +polygons (this is illustrated in the [`ortho_demo.py`] example). + + +[`pip`]: +https://pip.pypa.io/ +[`conda`]: +https://github.com/conda/conda + +[`matplotlib`]: +https://matplotlib.org/ +[`basemap`]: +https://matplotlib.org/basemap/ +[`basemap-data`]: +https://pypi.org/project/basemap-data +[`basemap-data-hires`]: +https://pypi.org/project/basemap-data-hires +[`OWSLib`]: +https://pypi.org/project/OWSLib + +[`basemap` installation instructions]: +https://matplotlib.org/basemap/stable/users/installation.html +[`ortho_demo.py`]: +https://github.com/matplotlib/basemap/blob/v2.0.0/doc/examples/ortho_demo.py + +[MIT]: +https://spdx.org/licenses/MIT.html +[LGPL-2.1-only]: +https://spdx.org/licenses/LGPL-2.1-only.html + +[`LICENSE`]: +https://github.com/matplotlib/basemap/blob/v2.0.0/LICENSE +[`LICENSE.geos`]: +https://github.com/matplotlib/basemap/blob/v2.0.0/LICENSE.geos diff --git a/packages/basemap_data/COPYING b/data/basemap_data/COPYING similarity index 100% rename from packages/basemap_data/COPYING rename to data/basemap_data/COPYING diff --git a/packages/basemap_data/COPYING.LESSER b/data/basemap_data/COPYING.LESSER similarity index 100% rename from packages/basemap_data/COPYING.LESSER rename to data/basemap_data/COPYING.LESSER diff --git a/packages/basemap_data/LICENSE.epsg b/data/basemap_data/LICENSE.epsg similarity index 100% rename from packages/basemap_data/LICENSE.epsg rename to data/basemap_data/LICENSE.epsg diff --git a/packages/basemap_data/LICENSE.mit b/data/basemap_data/LICENSE.mit similarity index 100% rename from packages/basemap_data/LICENSE.mit rename to data/basemap_data/LICENSE.mit diff --git a/packages/basemap_data/README.md b/data/basemap_data/README.md similarity index 64% rename from packages/basemap_data/README.md rename to data/basemap_data/README.md index e7efd2002..5f67c2b43 100644 --- a/packages/basemap_data/README.md +++ b/data/basemap_data/README.md @@ -8,7 +8,7 @@ required by [`basemap`] to work. ## Installation -The package is available in PyPI and can be installed with [`pip`]: +The package is available on PyPI and can be installed with [`pip`]: ```python python -m pip install basemap-data ``` @@ -17,8 +17,8 @@ python -m pip install basemap-data The land-sea mask, coastline, lake, river and political boundary data are extracted from the [GSHHG] datasets (version 2.3.6) using [GMT] -(5.x series) and are included under the terms of the [LGPLv3+] license -(see [`COPYING`] and [`COPYING.LESSER`]). +(5.x series) and are included under the terms of the [LGPL-3.0-or-later] +license (see [`COPYING`] and [`COPYING.LESSER`]). The other files are included under the terms of the [MIT] license. See [`LICENSE.epsg`] for the EPSG file (taken from the PROJ.4 package) and @@ -37,16 +37,16 @@ https://www.soest.hawaii.edu/pwessel/gshhg [GMT]: https://www.generic-mapping-tools.org/ -[LGPLv3+]: +[LGPL-3.0-or-later]: https://spdx.org/licenses/LGPL-3.0-or-later.html [MIT]: https://spdx.org/licenses/MIT.html [`COPYING`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data/COPYING [`COPYING.LESSER`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/COPYING.LESSER +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data/COPYING.LESSER [`LICENSE.epsg`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.epsg +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data/LICENSE.epsg [`LICENSE.mit`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data/LICENSE.mit +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data/LICENSE.mit diff --git a/packages/basemap_data/setup.py b/data/basemap_data/setup.py similarity index 80% rename from packages/basemap_data/setup.py rename to data/basemap_data/setup.py index 2d8e4e620..3be030472 100644 --- a/packages/basemap_data/setup.py +++ b/data/basemap_data/setup.py @@ -7,7 +7,7 @@ import os import itertools from setuptools import setup -from setuptools import find_packages +from setuptools import find_namespace_packages def get_content(name, splitlines=False): @@ -73,32 +73,34 @@ def get_content(name, splitlines=False): "name": "basemap_data", "version": - "1.3.2", - "license": - "GNU Lesser General Public License v3 or later (LGPLv3+)", + "2.0.0", "description": "Data assets for matplotlib basemap", "long_description": get_content("README.md"), "long_description_content_type": "text/markdown", - "url": - "https://matplotlib.org/basemap", "author": "Jeff Whitaker", "author_email": "jeffrey.s.whitaker@noaa.gov", "maintainer": - "Víctor Molina García", + "The Matplotlib development team", "maintainer_email": - "molinav@users.noreply.github.com", + "matplotlib-users@python.org", + "license": + "LGPL-3.0-or-later", + "license_files": [ + "COPYING", + "COPYING.LESSER", + "LICENSE.epsg", + "LICENSE.mit", + ], "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Visualization", "Topic :: Software Development :: Libraries :: Python Modules", @@ -108,30 +110,27 @@ def get_content(name, splitlines=False): "maps", "plots", ], - "namespace_packages": [ - "mpl_toolkits.basemap_data", - ], "package_dir": {"": "src"}, "packages": - find_packages(where="src"), + find_namespace_packages(where="src"), "package_data": { "mpl_toolkits.basemap_data": data_files, }, "python_requires": ", ".join([ - ">=2.6", - "!=3.0.*", - "!=3.1.*", + ">=3.9", "<4", ]), "project_urls": { - "Bug Tracker": - "https://github.com/matplotlib/basemap/issues", - "Documentation": - "https://matplotlib.org/basemap/", - "Source": + "Homepage": "https://github.com/matplotlib/basemap", + "Documentation": + "https://matplotlib.org/basemap", + "Repository": + "https://github.com/matplotlib/basemap.git", + "Issues": + "https://github.com/matplotlib/basemap/issues", }, }) diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.dbf b/data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.dbf similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.dbf rename to data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.dbf diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.prj b/data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.prj similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.prj rename to data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.prj diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shp b/data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shp similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shp rename to data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shp diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shx b/data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shx similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shx rename to data/basemap_data/src/mpl_toolkits/basemap_data/UScounties.shx diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/bmng.jpg b/data/basemap_data/src/mpl_toolkits/basemap_data/bmng.jpg similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/bmng.jpg rename to data/basemap_data/src/mpl_toolkits/basemap_data/bmng.jpg diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countries_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countries_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countries_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countries_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countries_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countries_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countries_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countries_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countries_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countries_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countries_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countries_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/countriesmeta_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/epsg b/data/basemap_data/src/mpl_toolkits/basemap_data/epsg similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/epsg rename to data/basemap_data/src/mpl_toolkits/basemap_data/epsg diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/etopo1.jpg b/data/basemap_data/src/mpl_toolkits/basemap_data/etopo1.jpg similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/etopo1.jpg rename to data/basemap_data/src/mpl_toolkits/basemap_data/etopo1.jpg diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhs_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhs_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/gshhsmeta_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_c.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_c.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_c.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_c.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_f.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_f.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_f.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_f.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_h.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_h.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_h.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_h.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_i.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_i.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_i.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_i.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_l.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_l.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_l.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_1.25min_l.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_c.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_c.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_c.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_c.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_f.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_f.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_f.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_f.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_h.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_h.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_h.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_h.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_i.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_i.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_i.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_i.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_l.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_l.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_l.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_10min_l.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_c.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_c.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_c.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_c.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_f.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_f.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_f.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_f.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_h.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_h.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_h.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_h.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_i.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_i.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_i.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_i.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_l.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_l.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_l.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_2.5min_l.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_c.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_c.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_c.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_c.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_f.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_f.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_f.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_f.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_h.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_h.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_h.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_h.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_i.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_i.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_i.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_i.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_l.bin b/data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_l.bin similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_l.bin rename to data/basemap_data/src/mpl_toolkits/basemap_data/lsmask_5min_l.bin diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/rivers_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/rivers_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/rivers_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/rivers_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/rivers_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/rivers_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/rivers_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/riversmeta_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/shadedrelief.jpg b/data/basemap_data/src/mpl_toolkits/basemap_data/shadedrelief.jpg similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/shadedrelief.jpg rename to data/basemap_data/src/mpl_toolkits/basemap_data/shadedrelief.jpg diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/states_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/states_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/states_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/states_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/states_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/states_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/states_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/states_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/states_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/states_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/states_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/states_l.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_c.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_c.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_c.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_c.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_i.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_i.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_i.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_i.dat diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_l.dat b/data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_l.dat similarity index 100% rename from packages/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_l.dat rename to data/basemap_data/src/mpl_toolkits/basemap_data/statesmeta_l.dat diff --git a/packages/basemap_data/utils/README b/data/basemap_data/utils/README similarity index 100% rename from packages/basemap_data/utils/README rename to data/basemap_data/utils/README diff --git a/packages/basemap_data/utils/dumpbounds.sh b/data/basemap_data/utils/dumpbounds.sh similarity index 100% rename from packages/basemap_data/utils/dumpbounds.sh rename to data/basemap_data/utils/dumpbounds.sh diff --git a/packages/basemap_data/utils/readboundaries.py b/data/basemap_data/utils/readboundaries.py similarity index 100% rename from packages/basemap_data/utils/readboundaries.py rename to data/basemap_data/utils/readboundaries.py diff --git a/packages/basemap_data/utils/readboundaries_shp.py b/data/basemap_data/utils/readboundaries_shp.py similarity index 100% rename from packages/basemap_data/utils/readboundaries_shp.py rename to data/basemap_data/utils/readboundaries_shp.py diff --git a/packages/basemap_data/utils/update_landmasks.py b/data/basemap_data/utils/update_landmasks.py similarity index 100% rename from packages/basemap_data/utils/update_landmasks.py rename to data/basemap_data/utils/update_landmasks.py diff --git a/packages/basemap_data_hires/COPYING b/data/basemap_data_hires/COPYING similarity index 100% rename from packages/basemap_data_hires/COPYING rename to data/basemap_data_hires/COPYING diff --git a/packages/basemap_data_hires/COPYING.LESSER b/data/basemap_data_hires/COPYING.LESSER similarity index 100% rename from packages/basemap_data_hires/COPYING.LESSER rename to data/basemap_data_hires/COPYING.LESSER diff --git a/packages/basemap_data_hires/README.md b/data/basemap_data_hires/README.md similarity index 65% rename from packages/basemap_data_hires/README.md rename to data/basemap_data_hires/README.md index 6edbca740..c1bba63d3 100644 --- a/packages/basemap_data_hires/README.md +++ b/data/basemap_data_hires/README.md @@ -8,7 +8,7 @@ data assets. ## Installation -The package is available in PyPI and can be installed with [`pip`]: +The package is available on PyPI and can be installed with [`pip`]: ```python python -m pip install basemap-data-hires ``` @@ -17,8 +17,8 @@ python -m pip install basemap-data-hires The land-sea mask, coastline, lake, river and political boundary data are extracted from the [GSHHG] datasets (version 2.3.6) using [GMT] -(5.x series) and are included under the terms of the [LGPLv3+] license -(see [`COPYING`] and [`COPYING.LESSER`]). +(5.x series) and are included under the terms of the [LGPL-3.0-or-later] +license (see [`COPYING`] and [`COPYING.LESSER`]). [`matplotlib`]: @@ -33,9 +33,9 @@ https://www.soest.hawaii.edu/pwessel/gshhg [GMT]: https://www.generic-mapping-tools.org/ -[LGPLv3+]: +[LGPL-3.0-or-later]: https://spdx.org/licenses/LGPL-3.0-or-later.html [`COPYING`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data_hires/COPYING [`COPYING.LESSER`]: -https://github.com/matplotlib/basemap/blob/v1.3.2/packages/basemap_data_hires/COPYING.LESSER +https://github.com/matplotlib/basemap/blob/v2.0.0/data/basemap_data_hires/COPYING.LESSER diff --git a/packages/basemap_data_hires/setup.py b/data/basemap_data_hires/setup.py similarity index 77% rename from packages/basemap_data_hires/setup.py rename to data/basemap_data_hires/setup.py index 7dbe83cf6..592ed3ed5 100644 --- a/packages/basemap_data_hires/setup.py +++ b/data/basemap_data_hires/setup.py @@ -7,7 +7,7 @@ import os import itertools from setuptools import setup -from setuptools import find_packages +from setuptools import find_namespace_packages def get_content(name, splitlines=False): @@ -51,32 +51,32 @@ def get_content(name, splitlines=False): "name": "basemap_data_hires", "version": - "1.3.2", - "license": - "GNU Lesser General Public License v3 or later (LGPLv3+)", + "2.0.0", "description": "High-resolution data assets for matplotlib basemap", "long_description": get_content("README.md"), "long_description_content_type": "text/markdown", - "url": - "https://matplotlib.org/basemap", "author": "Jeff Whitaker", "author_email": "jeffrey.s.whitaker@noaa.gov", "maintainer": - "Víctor Molina García", + "The Matplotlib development team", "maintainer_email": - "molinav@users.noreply.github.com", + "matplotlib-users@python.org", + "license": + "LGPL-3.0-or-later", + "license_files": [ + "COPYING", + "COPYING.LESSER", + ], "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Visualization", "Topic :: Software Development :: Libraries :: Python Modules", @@ -86,30 +86,27 @@ def get_content(name, splitlines=False): "maps", "plots", ], - "namespace_packages": [ - "mpl_toolkits.basemap_data", - ], "package_dir": {"": "src"}, "packages": - find_packages(where="src"), + find_namespace_packages(where="src"), "package_data": { "mpl_toolkits.basemap_data": data_files, }, "python_requires": ", ".join([ - ">=2.6", - "!=3.0.*", - "!=3.1.*", + ">=3.9", "<4", ]), "project_urls": { - "Bug Tracker": - "https://github.com/matplotlib/basemap/issues", - "Documentation": - "https://matplotlib.org/basemap/", - "Source": + "Homepage": "https://github.com/matplotlib/basemap", + "Documentation": + "https://matplotlib.org/basemap", + "Repository": + "https://github.com/matplotlib/basemap.git", + "Issues": + "https://github.com/matplotlib/basemap/issues", }, }) diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/countries_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/countriesmeta_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhs_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/gshhsmeta_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/rivers_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/riversmeta_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/states_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/states_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/states_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/states_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/states_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/states_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/states_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/states_h.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_f.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_f.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_f.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_f.dat diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_h.dat b/data/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_h.dat similarity index 100% rename from packages/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_h.dat rename to data/basemap_data_hires/src/mpl_toolkits/basemap_data/statesmeta_h.dat diff --git a/dep/requirements-doc.txt b/dep/requirements-doc.txt new file mode 100644 index 000000000..e89d7e235 --- /dev/null +++ b/dep/requirements-doc.txt @@ -0,0 +1,6 @@ +sphinx >= 7.0, < 8.0 +furo >= 2023.9.10, < 2024.8.7 + +scipy >= 1.6, < 1.16 +cftime >= 1.4.0, < 1.7.0 +netCDF4 >= 1.5.6, < 1.8.0 diff --git a/dep/requirements-lint.txt b/dep/requirements-lint.txt new file mode 100644 index 000000000..016f91380 --- /dev/null +++ b/dep/requirements-lint.txt @@ -0,0 +1,5 @@ +flake8 >= 3.9, < 7.3 +flake8-pyproject >= 1.0, < 1.3 + +astroid >= 3.0, < 3.4 +pylint >= 3.0, < 3.4 diff --git a/dep/requirements-owslib.txt b/dep/requirements-owslib.txt new file mode 100644 index 000000000..83755495b --- /dev/null +++ b/dep/requirements-owslib.txt @@ -0,0 +1 @@ +OWSLib >= 0.28.1, < 0.35 diff --git a/dep/requirements-test.txt b/dep/requirements-test.txt new file mode 100644 index 000000000..b7f9a483b --- /dev/null +++ b/dep/requirements-test.txt @@ -0,0 +1,4 @@ +pytest >= 7.0, < 8.5 + +pytest-cov >= 3.0, < 6.3 +coverage[toml] >= 5.0, < 7.10 diff --git a/dep/requirements.txt b/dep/requirements.txt new file mode 100644 index 000000000..00759f0d2 --- /dev/null +++ b/dep/requirements.txt @@ -0,0 +1,8 @@ +basemap_data >= 2.0, < 3.0 +packaging >= 20.5, < 26.0 + +numpy >= 2.0, < 2.4 +matplotlib >= 3.4, < 3.11 + +pyproj >= 3.0, < 3.8 +pyshp >= 2.0, < 2.4 diff --git a/FAQ b/doc/FAQ.txt similarity index 100% rename from FAQ rename to doc/FAQ.txt diff --git a/packages/basemap/doc/Makefile b/doc/Makefile similarity index 100% rename from packages/basemap/doc/Makefile rename to doc/Makefile diff --git a/packages/basemap/doc/README.txt b/doc/README.txt similarity index 100% rename from packages/basemap/doc/README.txt rename to doc/README.txt diff --git a/examples/200706041200-msg-ch01-SAfrica.jpg b/doc/examples/200706041200-msg-ch01-SAfrica.jpg similarity index 100% rename from examples/200706041200-msg-ch01-SAfrica.jpg rename to doc/examples/200706041200-msg-ch01-SAfrica.jpg diff --git a/examples/500hgtdata.gz b/doc/examples/500hgtdata.gz similarity index 100% rename from examples/500hgtdata.gz rename to doc/examples/500hgtdata.gz diff --git a/examples/500hgtlats.gz b/doc/examples/500hgtlats.gz similarity index 100% rename from examples/500hgtlats.gz rename to doc/examples/500hgtlats.gz diff --git a/examples/500hgtlons.gz b/doc/examples/500hgtlons.gz similarity index 100% rename from examples/500hgtlons.gz rename to doc/examples/500hgtlons.gz diff --git a/examples/C02562.orog.nc b/doc/examples/C02562.orog.nc similarity index 100% rename from examples/C02562.orog.nc rename to doc/examples/C02562.orog.nc diff --git a/examples/README b/doc/examples/README similarity index 100% rename from examples/README rename to doc/examples/README diff --git a/examples/allskymap.py b/doc/examples/allskymap.py similarity index 100% rename from examples/allskymap.py rename to doc/examples/allskymap.py diff --git a/examples/allskymap_cr_example.py b/doc/examples/allskymap_cr_example.py similarity index 100% rename from examples/allskymap_cr_example.py rename to doc/examples/allskymap_cr_example.py diff --git a/examples/animate.py b/doc/examples/animate.py similarity index 100% rename from examples/animate.py rename to doc/examples/animate.py diff --git a/examples/barb_demo.py b/doc/examples/barb_demo.py similarity index 100% rename from examples/barb_demo.py rename to doc/examples/barb_demo.py diff --git a/examples/camx.sample.nc b/doc/examples/camx.sample.nc similarity index 100% rename from examples/camx.sample.nc rename to doc/examples/camx.sample.nc diff --git a/examples/ccsm_popgrid.nc b/doc/examples/ccsm_popgrid.nc similarity index 100% rename from examples/ccsm_popgrid.nc rename to doc/examples/ccsm_popgrid.nc diff --git a/examples/ccsm_popgrid.py b/doc/examples/ccsm_popgrid.py similarity index 100% rename from examples/ccsm_popgrid.py rename to doc/examples/ccsm_popgrid.py diff --git a/examples/cities.dbf b/doc/examples/cities.dbf similarity index 100% rename from examples/cities.dbf rename to doc/examples/cities.dbf diff --git a/examples/cities.shp b/doc/examples/cities.shp similarity index 100% rename from examples/cities.shp rename to doc/examples/cities.shp diff --git a/examples/cities.shx b/doc/examples/cities.shx similarity index 100% rename from examples/cities.shx rename to doc/examples/cities.shx diff --git a/examples/contour_demo.py b/doc/examples/contour_demo.py similarity index 100% rename from examples/contour_demo.py rename to doc/examples/contour_demo.py diff --git a/examples/counties.py b/doc/examples/counties.py similarity index 100% rename from examples/counties.py rename to doc/examples/counties.py diff --git a/examples/cubed_sphere.py b/doc/examples/cubed_sphere.py similarity index 100% rename from examples/cubed_sphere.py rename to doc/examples/cubed_sphere.py diff --git a/examples/customticks.py b/doc/examples/customticks.py similarity index 100% rename from examples/customticks.py rename to doc/examples/customticks.py diff --git a/examples/daynight.py b/doc/examples/daynight.py similarity index 100% rename from examples/daynight.py rename to doc/examples/daynight.py diff --git a/examples/earth_lights_lrg.jpg b/doc/examples/earth_lights_lrg.jpg similarity index 100% rename from examples/earth_lights_lrg.jpg rename to doc/examples/earth_lights_lrg.jpg diff --git a/examples/embedding_map_in_wx.py b/doc/examples/embedding_map_in_wx.py similarity index 100% rename from examples/embedding_map_in_wx.py rename to doc/examples/embedding_map_in_wx.py diff --git a/examples/etopo20data.gz b/doc/examples/etopo20data.gz similarity index 100% rename from examples/etopo20data.gz rename to doc/examples/etopo20data.gz diff --git a/examples/etopo20lats.gz b/doc/examples/etopo20lats.gz similarity index 100% rename from examples/etopo20lats.gz rename to doc/examples/etopo20lats.gz diff --git a/examples/etopo20lons.gz b/doc/examples/etopo20lons.gz similarity index 100% rename from examples/etopo20lons.gz rename to doc/examples/etopo20lons.gz diff --git a/examples/fcover.dat b/doc/examples/fcover.dat similarity index 100% rename from examples/fcover.dat rename to doc/examples/fcover.dat diff --git a/examples/fcstmaps.py b/doc/examples/fcstmaps.py similarity index 100% rename from examples/fcstmaps.py rename to doc/examples/fcstmaps.py diff --git a/examples/fcstmaps_axesgrid.py b/doc/examples/fcstmaps_axesgrid.py similarity index 100% rename from examples/fcstmaps_axesgrid.py rename to doc/examples/fcstmaps_axesgrid.py diff --git a/examples/fillstates.py b/doc/examples/fillstates.py similarity index 100% rename from examples/fillstates.py rename to doc/examples/fillstates.py diff --git a/examples/garp.py b/doc/examples/garp.py similarity index 100% rename from examples/garp.py rename to doc/examples/garp.py diff --git a/examples/geos_demo.py b/doc/examples/geos_demo.py similarity index 100% rename from examples/geos_demo.py rename to doc/examples/geos_demo.py diff --git a/examples/geos_demo_2.py b/doc/examples/geos_demo_2.py similarity index 100% rename from examples/geos_demo_2.py rename to doc/examples/geos_demo_2.py diff --git a/examples/geos_demo_3.py b/doc/examples/geos_demo_3.py similarity index 100% rename from examples/geos_demo_3.py rename to doc/examples/geos_demo_3.py diff --git a/examples/hexbin_demo.py b/doc/examples/hexbin_demo.py similarity index 100% rename from examples/hexbin_demo.py rename to doc/examples/hexbin_demo.py diff --git a/examples/hires.py b/doc/examples/hires.py similarity index 100% rename from examples/hires.py rename to doc/examples/hires.py diff --git a/examples/huralll020.dbf b/doc/examples/huralll020.dbf similarity index 100% rename from examples/huralll020.dbf rename to doc/examples/huralll020.dbf diff --git a/examples/huralll020.shp b/doc/examples/huralll020.shp similarity index 100% rename from examples/huralll020.shp rename to doc/examples/huralll020.shp diff --git a/examples/huralll020.shx b/doc/examples/huralll020.shx similarity index 100% rename from examples/huralll020.shx rename to doc/examples/huralll020.shx diff --git a/examples/hurrtracks.py b/doc/examples/hurrtracks.py similarity index 100% rename from examples/hurrtracks.py rename to doc/examples/hurrtracks.py diff --git a/examples/land_shallow_topo_2048.jpg b/doc/examples/land_shallow_topo_2048.jpg similarity index 100% rename from examples/land_shallow_topo_2048.jpg rename to doc/examples/land_shallow_topo_2048.jpg diff --git a/examples/lic_demo.py b/doc/examples/lic_demo.py similarity index 100% rename from examples/lic_demo.py rename to doc/examples/lic_demo.py diff --git a/examples/make_inset.py b/doc/examples/make_inset.py similarity index 100% rename from examples/make_inset.py rename to doc/examples/make_inset.py diff --git a/examples/maskoceans.py b/doc/examples/maskoceans.py similarity index 100% rename from examples/maskoceans.py rename to doc/examples/maskoceans.py diff --git a/examples/nsper_demo.py b/doc/examples/nsper_demo.py similarity index 100% rename from examples/nsper_demo.py rename to doc/examples/nsper_demo.py diff --git a/examples/nws_precip_conus_20061222.nc b/doc/examples/nws_precip_conus_20061222.nc similarity index 100% rename from examples/nws_precip_conus_20061222.nc rename to doc/examples/nws_precip_conus_20061222.nc diff --git a/examples/nytolondon.py b/doc/examples/nytolondon.py similarity index 100% rename from examples/nytolondon.py rename to doc/examples/nytolondon.py diff --git a/examples/ortho_demo.py b/doc/examples/ortho_demo.py similarity index 100% rename from examples/ortho_demo.py rename to doc/examples/ortho_demo.py diff --git a/examples/panelplot.py b/doc/examples/panelplot.py similarity index 100% rename from examples/panelplot.py rename to doc/examples/panelplot.py diff --git a/examples/plot_tissot.py b/doc/examples/plot_tissot.py similarity index 100% rename from examples/plot_tissot.py rename to doc/examples/plot_tissot.py diff --git a/examples/plotcities.py b/doc/examples/plotcities.py similarity index 100% rename from examples/plotcities.py rename to doc/examples/plotcities.py diff --git a/examples/plothighsandlows.py b/doc/examples/plothighsandlows.py similarity index 96% rename from examples/plothighsandlows.py rename to doc/examples/plothighsandlows.py index f5fa73345..42f65a3e8 100644 --- a/examples/plothighsandlows.py +++ b/doc/examples/plothighsandlows.py @@ -26,9 +26,9 @@ def extrema(mat, mode="wrap", window=10): def main(): """Main function.""" - # Plot 00 UTC today. + # Plot 00 UTC yesterday. url = "http://nomads.ncep.noaa.gov/dods/gfs_0p50/gfs%Y%m%d/gfs_0p50_00z" - date = dt.datetime.now() + date = dt.datetime.now() - dt.timedelta(days=1) # Open OPeNDAP dataset. data = netCDF4.Dataset(date.strftime(url)) @@ -100,7 +100,8 @@ def main(): xyplotted.append((x, y)) # Set plot title and show. - plt.title("Mean Sea-Level Pressure (with Highs and Lows) %s" % date) + datestr = date.strftime("%Y%m%d00") + plt.title("Mean Sea-Level Pressure (with Highs and Lows) %s" % datestr) plt.show() diff --git a/examples/ploticos.py b/doc/examples/ploticos.py similarity index 100% rename from examples/ploticos.py rename to doc/examples/ploticos.py diff --git a/examples/plotmap.py b/doc/examples/plotmap.py similarity index 100% rename from examples/plotmap.py rename to doc/examples/plotmap.py diff --git a/examples/plotmap_masked.py b/doc/examples/plotmap_masked.py similarity index 100% rename from examples/plotmap_masked.py rename to doc/examples/plotmap_masked.py diff --git a/examples/plotmap_oo.py b/doc/examples/plotmap_oo.py similarity index 100% rename from examples/plotmap_oo.py rename to doc/examples/plotmap_oo.py diff --git a/examples/plotmap_shaded.py b/doc/examples/plotmap_shaded.py similarity index 100% rename from examples/plotmap_shaded.py rename to doc/examples/plotmap_shaded.py diff --git a/examples/plotozone.py b/doc/examples/plotozone.py similarity index 100% rename from examples/plotozone.py rename to doc/examples/plotozone.py diff --git a/examples/plotprecip.py b/doc/examples/plotprecip.py similarity index 100% rename from examples/plotprecip.py rename to doc/examples/plotprecip.py diff --git a/examples/plotsst.py b/doc/examples/plotsst.py similarity index 100% rename from examples/plotsst.py rename to doc/examples/plotsst.py diff --git a/examples/polarmaps.py b/doc/examples/polarmaps.py similarity index 100% rename from examples/polarmaps.py rename to doc/examples/polarmaps.py diff --git a/examples/quiver_demo.py b/doc/examples/quiver_demo.py similarity index 100% rename from examples/quiver_demo.py rename to doc/examples/quiver_demo.py diff --git a/examples/randompoints.py b/doc/examples/randompoints.py similarity index 100% rename from examples/randompoints.py rename to doc/examples/randompoints.py diff --git a/examples/rita.nc b/doc/examples/rita.nc similarity index 100% rename from examples/rita.nc rename to doc/examples/rita.nc diff --git a/examples/run_all.py b/doc/examples/run_all.py similarity index 100% rename from examples/run_all.py rename to doc/examples/run_all.py diff --git a/examples/save_background.py b/doc/examples/save_background.py similarity index 100% rename from examples/save_background.py rename to doc/examples/save_background.py diff --git a/examples/setwh.py b/doc/examples/setwh.py similarity index 100% rename from examples/setwh.py rename to doc/examples/setwh.py diff --git a/examples/shiftdata.py b/doc/examples/shiftdata.py similarity index 100% rename from examples/shiftdata.py rename to doc/examples/shiftdata.py diff --git a/examples/show_colormaps.py b/doc/examples/show_colormaps.py similarity index 100% rename from examples/show_colormaps.py rename to doc/examples/show_colormaps.py diff --git a/examples/simpletest.py b/doc/examples/simpletest.py similarity index 100% rename from examples/simpletest.py rename to doc/examples/simpletest.py diff --git a/examples/simpletest_oo.py b/doc/examples/simpletest_oo.py similarity index 100% rename from examples/simpletest_oo.py rename to doc/examples/simpletest_oo.py diff --git a/examples/st99_d00.dbf b/doc/examples/st99_d00.dbf similarity index 100% rename from examples/st99_d00.dbf rename to doc/examples/st99_d00.dbf diff --git a/examples/st99_d00.shp b/doc/examples/st99_d00.shp similarity index 100% rename from examples/st99_d00.shp rename to doc/examples/st99_d00.shp diff --git a/examples/st99_d00.shx b/doc/examples/st99_d00.shx similarity index 100% rename from examples/st99_d00.shx rename to doc/examples/st99_d00.shx diff --git a/examples/streamplot_demo.py b/doc/examples/streamplot_demo.py similarity index 100% rename from examples/streamplot_demo.py rename to doc/examples/streamplot_demo.py diff --git a/examples/test.py b/doc/examples/test.py similarity index 100% rename from examples/test.py rename to doc/examples/test.py diff --git a/examples/test_rotpole.py b/doc/examples/test_rotpole.py similarity index 100% rename from examples/test_rotpole.py rename to doc/examples/test_rotpole.py diff --git a/examples/testarcgis.py b/doc/examples/testarcgis.py similarity index 100% rename from examples/testarcgis.py rename to doc/examples/testarcgis.py diff --git a/examples/testgdal.py b/doc/examples/testgdal.py similarity index 100% rename from examples/testgdal.py rename to doc/examples/testgdal.py diff --git a/examples/testwmsimage.py b/doc/examples/testwmsimage.py similarity index 100% rename from examples/testwmsimage.py rename to doc/examples/testwmsimage.py diff --git a/examples/us_25m.dem b/doc/examples/us_25m.dem similarity index 100% rename from examples/us_25m.dem rename to doc/examples/us_25m.dem diff --git a/examples/utmtest.py b/doc/examples/utmtest.py similarity index 100% rename from examples/utmtest.py rename to doc/examples/utmtest.py diff --git a/examples/warpimage.py b/doc/examples/warpimage.py similarity index 100% rename from examples/warpimage.py rename to doc/examples/warpimage.py diff --git a/examples/wiki_example.py b/doc/examples/wiki_example.py similarity index 100% rename from examples/wiki_example.py rename to doc/examples/wiki_example.py diff --git a/examples/wm201_Arctic_JJA_1990-2008_moyenneDesMoyennes.nc b/doc/examples/wm201_Arctic_JJA_1990-2008_moyenneDesMoyennes.nc similarity index 100% rename from examples/wm201_Arctic_JJA_1990-2008_moyenneDesMoyennes.nc rename to doc/examples/wm201_Arctic_JJA_1990-2008_moyenneDesMoyennes.nc diff --git a/packages/basemap/doc/make.bat b/doc/make.bat similarity index 100% rename from packages/basemap/doc/make.bat rename to doc/make.bat diff --git a/packages/basemap/doc/make.py b/doc/make.py similarity index 100% rename from packages/basemap/doc/make.py rename to doc/make.py diff --git a/packages/basemap/doc/source/_static/.gitkeep b/doc/source/_static/.gitkeep similarity index 100% rename from packages/basemap/doc/source/_static/.gitkeep rename to doc/source/_static/.gitkeep diff --git a/packages/basemap/doc/source/_templates/.gitkeep b/doc/source/_templates/.gitkeep similarity index 100% rename from packages/basemap/doc/source/_templates/.gitkeep rename to doc/source/_templates/.gitkeep diff --git a/packages/basemap/doc/source/_templates/autosummary/module.rst b/doc/source/_templates/autosummary/module.rst similarity index 100% rename from packages/basemap/doc/source/_templates/autosummary/module.rst rename to doc/source/_templates/autosummary/module.rst diff --git a/packages/basemap/doc/source/api/basemap_api.rst b/doc/source/api/basemap_api.rst similarity index 100% rename from packages/basemap/doc/source/api/basemap_api.rst rename to doc/source/api/basemap_api.rst diff --git a/packages/basemap/doc/source/api/index.rst b/doc/source/api/index.rst similarity index 100% rename from packages/basemap/doc/source/api/index.rst rename to doc/source/api/index.rst diff --git a/packages/basemap/doc/source/conf.py b/doc/source/conf.py similarity index 97% rename from packages/basemap/doc/source/conf.py rename to doc/source/conf.py index 460d15c92..1437df386 100644 --- a/packages/basemap/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,7 +22,7 @@ # -- Project information ----------------------------------------------- project = myself.__name__.rsplit(".", 1)[-1] -copyright = "2011-2014 Jeffrey Whitaker; 2015-2024 The Matplotlib development team" +copyright = "2011-2014 Jeffrey Whitaker; 2015-2025 The Matplotlib development team" author = "Jeffrey Whitaker" # The short X.Y version @@ -73,7 +73,11 @@ # You can specify multiple suffix as a list of string: # # source_suffix = [".rst", ".md"] -source_suffix = ".rst" +source_suffix = { + ".rst": "restructuredtext", + ".txt": "restructuredtext", + ".md": "markdown", +} # The master toctree document. master_doc = "index" diff --git a/packages/basemap/doc/source/index.rst b/doc/source/index.rst similarity index 100% rename from packages/basemap/doc/source/index.rst rename to doc/source/index.rst diff --git a/packages/basemap/doc/source/matplotlibrc b/doc/source/matplotlibrc similarity index 100% rename from packages/basemap/doc/source/matplotlibrc rename to doc/source/matplotlibrc diff --git a/packages/basemap/doc/source/users/aea.rst b/doc/source/users/aea.rst similarity index 100% rename from packages/basemap/doc/source/users/aea.rst rename to doc/source/users/aea.rst diff --git a/packages/basemap/doc/source/users/aeqd.rst b/doc/source/users/aeqd.rst similarity index 100% rename from packages/basemap/doc/source/users/aeqd.rst rename to doc/source/users/aeqd.rst diff --git a/packages/basemap/doc/source/users/cass.rst b/doc/source/users/cass.rst similarity index 100% rename from packages/basemap/doc/source/users/cass.rst rename to doc/source/users/cass.rst diff --git a/packages/basemap/doc/source/users/cea.rst b/doc/source/users/cea.rst similarity index 100% rename from packages/basemap/doc/source/users/cea.rst rename to doc/source/users/cea.rst diff --git a/packages/basemap/doc/source/users/cyl.rst b/doc/source/users/cyl.rst similarity index 100% rename from packages/basemap/doc/source/users/cyl.rst rename to doc/source/users/cyl.rst diff --git a/packages/basemap/doc/source/users/eck4.rst b/doc/source/users/eck4.rst similarity index 100% rename from packages/basemap/doc/source/users/eck4.rst rename to doc/source/users/eck4.rst diff --git a/packages/basemap/doc/source/users/eqdc.rst b/doc/source/users/eqdc.rst similarity index 100% rename from packages/basemap/doc/source/users/eqdc.rst rename to doc/source/users/eqdc.rst diff --git a/packages/basemap/doc/source/users/examples.rst b/doc/source/users/examples.rst similarity index 92% rename from packages/basemap/doc/source/users/examples.rst rename to doc/source/users/examples.rst index 9d0daca31..e2de641c0 100644 --- a/packages/basemap/doc/source/users/examples.rst +++ b/doc/source/users/examples.rst @@ -3,9 +3,9 @@ Plotting data on a map (Example Gallery) ======================================== -Following are a series of examples that illustrate how to use -Basemap instance methods to plot your data on a map. More examples -are included in the examples directory of the basemap source distribution. +Following are a series of examples that illustrate how to use Basemap +instance methods to plot your data on a map. More examples are included +in the doc/examples directory of the basemap source distribution. There are a number of Basemap instance methods for plotting data: * :func:`~mpl_toolkits.basemap.Basemap.contour`: draw contour lines. diff --git a/packages/basemap/doc/source/users/figures/aea.py b/doc/source/users/figures/aea.py similarity index 100% rename from packages/basemap/doc/source/users/figures/aea.py rename to doc/source/users/figures/aea.py diff --git a/packages/basemap/doc/source/users/figures/aeqd.py b/doc/source/users/figures/aeqd.py similarity index 100% rename from packages/basemap/doc/source/users/figures/aeqd.py rename to doc/source/users/figures/aeqd.py diff --git a/packages/basemap/doc/source/users/figures/aeqd_fulldisk.py b/doc/source/users/figures/aeqd_fulldisk.py similarity index 100% rename from packages/basemap/doc/source/users/figures/aeqd_fulldisk.py rename to doc/source/users/figures/aeqd_fulldisk.py diff --git a/packages/basemap/doc/source/users/figures/azeqd.py b/doc/source/users/figures/azeqd.py similarity index 100% rename from packages/basemap/doc/source/users/figures/azeqd.py rename to doc/source/users/figures/azeqd.py diff --git a/packages/basemap/doc/source/users/figures/background1.py b/doc/source/users/figures/background1.py similarity index 100% rename from packages/basemap/doc/source/users/figures/background1.py rename to doc/source/users/figures/background1.py diff --git a/packages/basemap/doc/source/users/figures/background2.py b/doc/source/users/figures/background2.py similarity index 100% rename from packages/basemap/doc/source/users/figures/background2.py rename to doc/source/users/figures/background2.py diff --git a/packages/basemap/doc/source/users/figures/background3.py b/doc/source/users/figures/background3.py similarity index 100% rename from packages/basemap/doc/source/users/figures/background3.py rename to doc/source/users/figures/background3.py diff --git a/packages/basemap/doc/source/users/figures/background4.py b/doc/source/users/figures/background4.py similarity index 100% rename from packages/basemap/doc/source/users/figures/background4.py rename to doc/source/users/figures/background4.py diff --git a/packages/basemap/doc/source/users/figures/background5.py b/doc/source/users/figures/background5.py similarity index 100% rename from packages/basemap/doc/source/users/figures/background5.py rename to doc/source/users/figures/background5.py diff --git a/packages/basemap/doc/source/users/figures/cass.py b/doc/source/users/figures/cass.py similarity index 100% rename from packages/basemap/doc/source/users/figures/cass.py rename to doc/source/users/figures/cass.py diff --git a/packages/basemap/doc/source/users/figures/cea.py b/doc/source/users/figures/cea.py similarity index 100% rename from packages/basemap/doc/source/users/figures/cea.py rename to doc/source/users/figures/cea.py diff --git a/packages/basemap/doc/source/users/figures/contour1.py b/doc/source/users/figures/contour1.py similarity index 100% rename from packages/basemap/doc/source/users/figures/contour1.py rename to doc/source/users/figures/contour1.py diff --git a/packages/basemap/doc/source/users/figures/cyl.py b/doc/source/users/figures/cyl.py similarity index 100% rename from packages/basemap/doc/source/users/figures/cyl.py rename to doc/source/users/figures/cyl.py diff --git a/packages/basemap/doc/source/users/figures/eck4.py b/doc/source/users/figures/eck4.py similarity index 100% rename from packages/basemap/doc/source/users/figures/eck4.py rename to doc/source/users/figures/eck4.py diff --git a/packages/basemap/doc/source/users/figures/eqdc.py b/doc/source/users/figures/eqdc.py similarity index 100% rename from packages/basemap/doc/source/users/figures/eqdc.py rename to doc/source/users/figures/eqdc.py diff --git a/packages/basemap/doc/source/users/figures/gall.py b/doc/source/users/figures/gall.py similarity index 100% rename from packages/basemap/doc/source/users/figures/gall.py rename to doc/source/users/figures/gall.py diff --git a/packages/basemap/doc/source/users/figures/geos_full.py b/doc/source/users/figures/geos_full.py similarity index 100% rename from packages/basemap/doc/source/users/figures/geos_full.py rename to doc/source/users/figures/geos_full.py diff --git a/packages/basemap/doc/source/users/figures/geos_partial.py b/doc/source/users/figures/geos_partial.py similarity index 100% rename from packages/basemap/doc/source/users/figures/geos_partial.py rename to doc/source/users/figures/geos_partial.py diff --git a/packages/basemap/doc/source/users/figures/gnomon.py b/doc/source/users/figures/gnomon.py similarity index 100% rename from packages/basemap/doc/source/users/figures/gnomon.py rename to doc/source/users/figures/gnomon.py diff --git a/packages/basemap/doc/source/users/figures/graticule.py b/doc/source/users/figures/graticule.py similarity index 100% rename from packages/basemap/doc/source/users/figures/graticule.py rename to doc/source/users/figures/graticule.py diff --git a/packages/basemap/doc/source/users/figures/hammer.py b/doc/source/users/figures/hammer.py similarity index 100% rename from packages/basemap/doc/source/users/figures/hammer.py rename to doc/source/users/figures/hammer.py diff --git a/packages/basemap/doc/source/users/figures/hurrtracks.py b/doc/source/users/figures/hurrtracks.py similarity index 96% rename from packages/basemap/doc/source/users/figures/hurrtracks.py rename to doc/source/users/figures/hurrtracks.py index 1d1674c83..9f95289b8 100644 --- a/packages/basemap/doc/source/users/figures/hurrtracks.py +++ b/doc/source/users/figures/hurrtracks.py @@ -12,7 +12,7 @@ projection='lcc',lat_1=20.,lat_2=40.,lon_0=-60., resolution ='l',area_thresh=1000.) # read shapefile. -shp_path = os.path.join(*6 * [".."] + ["examples", "huralll020"]) +shp_path = os.path.join(*3 * [".."] + ["examples", "huralll020"]) shp_info = m.readshapefile(shp_path,'hurrtracks',drawbounds=False) # find names of storms that reached Cat 4. names = [] diff --git a/packages/basemap/doc/source/users/figures/kav7.py b/doc/source/users/figures/kav7.py similarity index 100% rename from packages/basemap/doc/source/users/figures/kav7.py rename to doc/source/users/figures/kav7.py diff --git a/packages/basemap/doc/source/users/figures/laea.py b/doc/source/users/figures/laea.py similarity index 100% rename from packages/basemap/doc/source/users/figures/laea.py rename to doc/source/users/figures/laea.py diff --git a/packages/basemap/doc/source/users/figures/lcc.py b/doc/source/users/figures/lcc.py similarity index 100% rename from packages/basemap/doc/source/users/figures/lcc.py rename to doc/source/users/figures/lcc.py diff --git a/packages/basemap/doc/source/users/figures/mbtfpq.py b/doc/source/users/figures/mbtfpq.py similarity index 100% rename from packages/basemap/doc/source/users/figures/mbtfpq.py rename to doc/source/users/figures/mbtfpq.py diff --git a/packages/basemap/doc/source/users/figures/merc.py b/doc/source/users/figures/merc.py similarity index 100% rename from packages/basemap/doc/source/users/figures/merc.py rename to doc/source/users/figures/merc.py diff --git a/packages/basemap/doc/source/users/figures/mill.py b/doc/source/users/figures/mill.py similarity index 100% rename from packages/basemap/doc/source/users/figures/mill.py rename to doc/source/users/figures/mill.py diff --git a/packages/basemap/doc/source/users/figures/moll.py b/doc/source/users/figures/moll.py similarity index 100% rename from packages/basemap/doc/source/users/figures/moll.py rename to doc/source/users/figures/moll.py diff --git a/packages/basemap/doc/source/users/figures/npaeqd.py b/doc/source/users/figures/npaeqd.py similarity index 100% rename from packages/basemap/doc/source/users/figures/npaeqd.py rename to doc/source/users/figures/npaeqd.py diff --git a/packages/basemap/doc/source/users/figures/nplaea.py b/doc/source/users/figures/nplaea.py similarity index 100% rename from packages/basemap/doc/source/users/figures/nplaea.py rename to doc/source/users/figures/nplaea.py diff --git a/packages/basemap/doc/source/users/figures/npstere.py b/doc/source/users/figures/npstere.py similarity index 100% rename from packages/basemap/doc/source/users/figures/npstere.py rename to doc/source/users/figures/npstere.py diff --git a/packages/basemap/doc/source/users/figures/nsper_full.py b/doc/source/users/figures/nsper_full.py similarity index 100% rename from packages/basemap/doc/source/users/figures/nsper_full.py rename to doc/source/users/figures/nsper_full.py diff --git a/packages/basemap/doc/source/users/figures/nsper_partial.py b/doc/source/users/figures/nsper_partial.py similarity index 100% rename from packages/basemap/doc/source/users/figures/nsper_partial.py rename to doc/source/users/figures/nsper_partial.py diff --git a/packages/basemap/doc/source/users/figures/omerc.py b/doc/source/users/figures/omerc.py similarity index 100% rename from packages/basemap/doc/source/users/figures/omerc.py rename to doc/source/users/figures/omerc.py diff --git a/packages/basemap/doc/source/users/figures/ortho_full.py b/doc/source/users/figures/ortho_full.py similarity index 100% rename from packages/basemap/doc/source/users/figures/ortho_full.py rename to doc/source/users/figures/ortho_full.py diff --git a/packages/basemap/doc/source/users/figures/ortho_partial.py b/doc/source/users/figures/ortho_partial.py similarity index 100% rename from packages/basemap/doc/source/users/figures/ortho_partial.py rename to doc/source/users/figures/ortho_partial.py diff --git a/packages/basemap/doc/source/users/figures/plotargo.py b/doc/source/users/figures/plotargo.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotargo.py rename to doc/source/users/figures/plotargo.py diff --git a/packages/basemap/doc/source/users/figures/plotboulder.py b/doc/source/users/figures/plotboulder.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotboulder.py rename to doc/source/users/figures/plotboulder.py diff --git a/packages/basemap/doc/source/users/figures/plotdaynight.py b/doc/source/users/figures/plotdaynight.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotdaynight.py rename to doc/source/users/figures/plotdaynight.py diff --git a/packages/basemap/doc/source/users/figures/plotetopo5.py b/doc/source/users/figures/plotetopo5.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotetopo5.py rename to doc/source/users/figures/plotetopo5.py diff --git a/packages/basemap/doc/source/users/figures/plotgreatcircle.py b/doc/source/users/figures/plotgreatcircle.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotgreatcircle.py rename to doc/source/users/figures/plotgreatcircle.py diff --git a/packages/basemap/doc/source/users/figures/plothighsandlows.py b/doc/source/users/figures/plothighsandlows.py similarity index 93% rename from packages/basemap/doc/source/users/figures/plothighsandlows.py rename to doc/source/users/figures/plothighsandlows.py index 3a7c3f963..d9e70bb40 100644 --- a/packages/basemap/doc/source/users/figures/plothighsandlows.py +++ b/doc/source/users/figures/plothighsandlows.py @@ -2,13 +2,14 @@ plot H's and L's on a sea-level pressure map (uses scipy.ndimage.filters and netcdf4-python) """ +import datetime as dt import numpy as np import matplotlib.pyplot as plt -from datetime import datetime from mpl_toolkits.basemap import Basemap, addcyclic from scipy.ndimage.filters import minimum_filter, maximum_filter from netCDF4 import Dataset + def extrema(mat,mode='wrap',window=10): """find the indices of local extrema (min and max) in the input array.""" @@ -19,13 +20,13 @@ def extrema(mat,mode='wrap',window=10): # Return the indices of the maxima, minima return np.nonzero(mat == mn), np.nonzero(mat == mx) -# plot 00 UTC today. -date = datetime.now().strftime('%Y%m%d')+'00' -# open OpenDAP dataset. -data=Dataset("https://nomads.ncep.noaa.gov/dods/gfs_0p50/gfs%s/gfs_0p50_%sz"%\ - (date[0:8],date[8:10])) +# Plot 00 UTC yesterday. +url = "http://nomads.ncep.noaa.gov/dods/gfs_0p50/gfs%Y%m%d/gfs_0p50_00z" +date = dt.datetime.now() - dt.timedelta(days=1) +# open OpenDAP dataset. +data = Dataset(date.strftime(url)) # read lats,lons. lats = data.variables['lat'][:] @@ -85,5 +86,7 @@ def extrema(mat,mode='wrap',window=10): ha='center',va='top',color='r', bbox = dict(boxstyle="square",ec='None',fc=(1,1,1,0.5))) xyplotted.append((x,y)) -plt.title('Mean Sea-Level Pressure (with Highs and Lows) %s' % date) + +datestr = date.strftime("%Y%m%d00") +plt.title('Mean Sea-Level Pressure (with Highs and Lows) %s' % datestr) plt.show() diff --git a/packages/basemap/doc/source/users/figures/plotprecip.py b/doc/source/users/figures/plotprecip.py similarity index 96% rename from packages/basemap/doc/source/users/figures/plotprecip.py rename to doc/source/users/figures/plotprecip.py index 95fd7ef67..7e13cdb87 100644 --- a/packages/basemap/doc/source/users/figures/plotprecip.py +++ b/doc/source/users/figures/plotprecip.py @@ -8,7 +8,7 @@ # plot rainfall from NWS using special precipitation # colormap used by the NWS, and included in basemap. -ncpath = os.path.join(*6 * [".."] + ["examples", "nws_precip_conus_20061222.nc"]) +ncpath = os.path.join(*3 * [".."] + ["examples", "nws_precip_conus_20061222.nc"]) nc = NetCDFFile(ncpath) # data from http://water.weather.gov/precip/ prcpvar = nc.variables['amountofprecip'] diff --git a/packages/basemap/doc/source/users/figures/plotsst.py b/doc/source/users/figures/plotsst.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotsst.py rename to doc/source/users/figures/plotsst.py diff --git a/packages/basemap/doc/source/users/figures/plotwindvec.py b/doc/source/users/figures/plotwindvec.py similarity index 100% rename from packages/basemap/doc/source/users/figures/plotwindvec.py rename to doc/source/users/figures/plotwindvec.py diff --git a/packages/basemap/doc/source/users/figures/poly.py b/doc/source/users/figures/poly.py similarity index 100% rename from packages/basemap/doc/source/users/figures/poly.py rename to doc/source/users/figures/poly.py diff --git a/packages/basemap/doc/source/users/figures/robin.py b/doc/source/users/figures/robin.py similarity index 100% rename from packages/basemap/doc/source/users/figures/robin.py rename to doc/source/users/figures/robin.py diff --git a/packages/basemap/doc/source/users/figures/sinu.py b/doc/source/users/figures/sinu.py similarity index 100% rename from packages/basemap/doc/source/users/figures/sinu.py rename to doc/source/users/figures/sinu.py diff --git a/packages/basemap/doc/source/users/figures/spaeqd.py b/doc/source/users/figures/spaeqd.py similarity index 100% rename from packages/basemap/doc/source/users/figures/spaeqd.py rename to doc/source/users/figures/spaeqd.py diff --git a/packages/basemap/doc/source/users/figures/splaea.py b/doc/source/users/figures/splaea.py similarity index 100% rename from packages/basemap/doc/source/users/figures/splaea.py rename to doc/source/users/figures/splaea.py diff --git a/packages/basemap/doc/source/users/figures/spstere.py b/doc/source/users/figures/spstere.py similarity index 100% rename from packages/basemap/doc/source/users/figures/spstere.py rename to doc/source/users/figures/spstere.py diff --git a/packages/basemap/doc/source/users/figures/stere.py b/doc/source/users/figures/stere.py similarity index 100% rename from packages/basemap/doc/source/users/figures/stere.py rename to doc/source/users/figures/stere.py diff --git a/packages/basemap/doc/source/users/figures/tmerc.py b/doc/source/users/figures/tmerc.py similarity index 100% rename from packages/basemap/doc/source/users/figures/tmerc.py rename to doc/source/users/figures/tmerc.py diff --git a/packages/basemap/doc/source/users/figures/vandg.py b/doc/source/users/figures/vandg.py similarity index 100% rename from packages/basemap/doc/source/users/figures/vandg.py rename to doc/source/users/figures/vandg.py diff --git a/packages/basemap/doc/source/users/gall.rst b/doc/source/users/gall.rst similarity index 100% rename from packages/basemap/doc/source/users/gall.rst rename to doc/source/users/gall.rst diff --git a/packages/basemap/doc/source/users/geography.rst b/doc/source/users/geography.rst similarity index 100% rename from packages/basemap/doc/source/users/geography.rst rename to doc/source/users/geography.rst diff --git a/packages/basemap/doc/source/users/geos.rst b/doc/source/users/geos.rst similarity index 100% rename from packages/basemap/doc/source/users/geos.rst rename to doc/source/users/geos.rst diff --git a/packages/basemap/doc/source/users/gnomon.rst b/doc/source/users/gnomon.rst similarity index 100% rename from packages/basemap/doc/source/users/gnomon.rst rename to doc/source/users/gnomon.rst diff --git a/packages/basemap/doc/source/users/graticule.rst b/doc/source/users/graticule.rst similarity index 100% rename from packages/basemap/doc/source/users/graticule.rst rename to doc/source/users/graticule.rst diff --git a/packages/basemap/doc/source/users/hammer.rst b/doc/source/users/hammer.rst similarity index 100% rename from packages/basemap/doc/source/users/hammer.rst rename to doc/source/users/hammer.rst diff --git a/packages/basemap/doc/source/users/index.rst b/doc/source/users/index.rst similarity index 100% rename from packages/basemap/doc/source/users/index.rst rename to doc/source/users/index.rst diff --git a/packages/basemap/doc/source/users/installation.rst b/doc/source/users/installation.rst similarity index 83% rename from packages/basemap/doc/source/users/installation.rst rename to doc/source/users/installation.rst index f9bd57c4e..b62b50559 100644 --- a/packages/basemap/doc/source/users/installation.rst +++ b/doc/source/users/installation.rst @@ -4,16 +4,15 @@ Installation Installing from PyPI -------------------- -Precompiled binary wheels for Windows and GNU/Linux are available in -PyPI (architectures x86 and x64, Python 2.7 and 3.5+) and can be -installed with `pip`_: +Precompiled binary wheels for Windows, GNU/Linux and MacOS are available +on PyPI and can be installed with `pip`_: .. code-block:: sh python -m pip install basemap -Installing ``basemap`` will also install ``basemap-data``, containing the -minimal data assets required by ``basemap``. If you also need the +Installing ``basemap`` will also install ``basemap-data``, containing +the minimal data assets required by ``basemap``. If you also need the high-resolution data assets, you can install them with `pip`_ too: .. code-block:: sh @@ -24,8 +23,7 @@ Installing from conda-forge --------------------------- For Miniforge users, ``basemap`` packages are available through the -``conda-forge`` channel for Windows and GNU/Linux (x64) as well as -for MacOS (x64 and arm64): +``conda-forge`` channel: .. code-block:: sh @@ -49,13 +47,11 @@ on GitHub as indicated in the following steps: - `cython`_ - `numpy`_ -2. Download the ``basemap`` source code and move to the - ``packages/basemap`` folder: +2. Download the ``basemap`` source code: .. code-block:: sh git clone --depth 1 https://github.com/matplotlib/basemap.git - cd basemap/packages/basemap 3. Build the `GEOS`_ library. You may use the helper provided in the ``utils`` folder (please note that you need `CMake`_ and a working diff --git a/packages/basemap/doc/source/users/introduction.rst b/doc/source/users/introduction.rst similarity index 100% rename from packages/basemap/doc/source/users/introduction.rst rename to doc/source/users/introduction.rst diff --git a/packages/basemap/doc/source/users/kav7.rst b/doc/source/users/kav7.rst similarity index 100% rename from packages/basemap/doc/source/users/kav7.rst rename to doc/source/users/kav7.rst diff --git a/packages/basemap/doc/source/users/laea.rst b/doc/source/users/laea.rst similarity index 100% rename from packages/basemap/doc/source/users/laea.rst rename to doc/source/users/laea.rst diff --git a/packages/basemap/doc/source/users/lcc.rst b/doc/source/users/lcc.rst similarity index 100% rename from packages/basemap/doc/source/users/lcc.rst rename to doc/source/users/lcc.rst diff --git a/packages/basemap/doc/source/users/mapcoords.rst b/doc/source/users/mapcoords.rst similarity index 100% rename from packages/basemap/doc/source/users/mapcoords.rst rename to doc/source/users/mapcoords.rst diff --git a/packages/basemap/doc/source/users/mapsetup.rst b/doc/source/users/mapsetup.rst similarity index 100% rename from packages/basemap/doc/source/users/mapsetup.rst rename to doc/source/users/mapsetup.rst diff --git a/packages/basemap/doc/source/users/mbtfpq.rst b/doc/source/users/mbtfpq.rst similarity index 100% rename from packages/basemap/doc/source/users/mbtfpq.rst rename to doc/source/users/mbtfpq.rst diff --git a/packages/basemap/doc/source/users/merc.rst b/doc/source/users/merc.rst similarity index 100% rename from packages/basemap/doc/source/users/merc.rst rename to doc/source/users/merc.rst diff --git a/packages/basemap/doc/source/users/mill.rst b/doc/source/users/mill.rst similarity index 100% rename from packages/basemap/doc/source/users/mill.rst rename to doc/source/users/mill.rst diff --git a/packages/basemap/doc/source/users/moll.rst b/doc/source/users/moll.rst similarity index 100% rename from packages/basemap/doc/source/users/moll.rst rename to doc/source/users/moll.rst diff --git a/packages/basemap/doc/source/users/nsper.rst b/doc/source/users/nsper.rst similarity index 100% rename from packages/basemap/doc/source/users/nsper.rst rename to doc/source/users/nsper.rst diff --git a/packages/basemap/doc/source/users/omerc.rst b/doc/source/users/omerc.rst similarity index 100% rename from packages/basemap/doc/source/users/omerc.rst rename to doc/source/users/omerc.rst diff --git a/packages/basemap/doc/source/users/ortho.rst b/doc/source/users/ortho.rst similarity index 100% rename from packages/basemap/doc/source/users/ortho.rst rename to doc/source/users/ortho.rst diff --git a/packages/basemap/doc/source/users/paeqd.rst b/doc/source/users/paeqd.rst similarity index 100% rename from packages/basemap/doc/source/users/paeqd.rst rename to doc/source/users/paeqd.rst diff --git a/packages/basemap/doc/source/users/plaea.rst b/doc/source/users/plaea.rst similarity index 100% rename from packages/basemap/doc/source/users/plaea.rst rename to doc/source/users/plaea.rst diff --git a/packages/basemap/doc/source/users/poly.rst b/doc/source/users/poly.rst similarity index 100% rename from packages/basemap/doc/source/users/poly.rst rename to doc/source/users/poly.rst diff --git a/packages/basemap/doc/source/users/pstere.rst b/doc/source/users/pstere.rst similarity index 100% rename from packages/basemap/doc/source/users/pstere.rst rename to doc/source/users/pstere.rst diff --git a/packages/basemap/doc/source/users/robin.rst b/doc/source/users/robin.rst similarity index 100% rename from packages/basemap/doc/source/users/robin.rst rename to doc/source/users/robin.rst diff --git a/packages/basemap/doc/source/users/sinu.rst b/doc/source/users/sinu.rst similarity index 100% rename from packages/basemap/doc/source/users/sinu.rst rename to doc/source/users/sinu.rst diff --git a/packages/basemap/doc/source/users/stere.rst b/doc/source/users/stere.rst similarity index 100% rename from packages/basemap/doc/source/users/stere.rst rename to doc/source/users/stere.rst diff --git a/packages/basemap/doc/source/users/tmerc.rst b/doc/source/users/tmerc.rst similarity index 100% rename from packages/basemap/doc/source/users/tmerc.rst rename to doc/source/users/tmerc.rst diff --git a/packages/basemap/doc/source/users/vandg.rst b/doc/source/users/vandg.rst similarity index 100% rename from packages/basemap/doc/source/users/vandg.rst rename to doc/source/users/vandg.rst diff --git a/packages/basemap/.pylintrc b/packages/basemap/.pylintrc deleted file mode 100644 index cba37d0fb..000000000 --- a/packages/basemap/.pylintrc +++ /dev/null @@ -1,529 +0,0 @@ -[MASTER] - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code. -extension-pkg-whitelist=numpy, - _geoslib - -# Add files or directories to the blacklist. They should be base names, not -# paths. -ignore=CVS - -# Add files or directories matching the regex patterns to the blacklist. The -# regex matches against base names, not paths. -ignore-patterns= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -init-hook="import sys; sys.path.insert(0, 'src'); sys.setrecursionlimit(8 * sys.getrecursionlimit())" - -# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the -# number of processors available to use. -jobs=1 - -# Control the amount of potential inferred values when inferring a single -# object. This can help the performance when dealing with large functions or -# complex, nested conditions. -limit-inference-results=100 - -# List of plugins (as comma separated values of python module names) to load, -# usually to register additional checkers. -load-plugins= - -# Pickle collected data for later comparisons. -persistent=yes - -# Specify a configuration file. -#rcfile= - -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=yes - -# Allow loading of arbitrary C extensions. Extensions are imported into the -# active Python interpreter and may run arbitrary code. -unsafe-load-any-extension=no - - -[MESSAGES CONTROL] - -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED. -confidence= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once). You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use "--disable=all --enable=classes -# --disable=W". -disable= - # Allow freedom with imports. - import-outside-toplevel, - # Allow freedom with globals. - global-statement, - global-variable-not-assigned, - global-variable-undefined, - undefined-all-variable, - # Allow freedom with inheritance. - useless-object-inheritance, - super-with-arguments, - # Allow assigning to returned None. - assignment-from-no-return, - assignment-from-none, - # Allow freedom with error raises. - raise-missing-from, - # Allow freedom with using lambda functions. - unnecessary-lambda-assignment, - # Allow freedom with old ways of doing things. - use-dict-literal, - consider-using-f-string, - # Allow freedom with multiline indentation. - useless-option-value, - bad-continuation - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). See also the "--disable" option for examples. -enable=c-extension-no-member - - -[REPORTS] - -# Python expression which should return a score less than or equal to 10. You -# have access to the variables 'error', 'warning', 'refactor', and 'convention' -# which contain the number of messages in each category, as well as 'statement' -# which is the total number of statements analyzed. This score is used by the -# global evaluation report (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details. -#msg-template= - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio). You can also give a reporter class, e.g. -# mypackage.mymodule.MyReporterClass. -output-format=text - -# Tells whether to display a full report or only the messages. -reports=no - -# Activate the evaluation score. -score=yes - - -[REFACTORING] - -# Maximum number of nested blocks for function / method body -max-nested-blocks=6 - -# Complete name of functions that never returns. When checking for -# inconsistent-return-statements if a never returning function is called then -# it will be considered as an explicit return statement and no message will be -# printed. -never-returning-functions=sys.exit - - -[BASIC] - -# Naming style matching correct argument names. -argument-naming-style=snake_case - -# Regular expression matching correct argument names. Overrides argument- -# naming-style. -#argument-rgx= - -# Naming style matching correct attribute names. -attr-naming-style=snake_case - -# Regular expression matching correct attribute names. Overrides attr-naming- -# style. -#attr-rgx= - -# Bad variable names which should always be refused, separated by a comma. -bad-names=foo, - bar, - baz, - toto, - tutu, - tata - -# Naming style matching correct class attribute names. -class-attribute-naming-style=any - -# Regular expression matching correct class attribute names. Overrides class- -# attribute-naming-style. -#class-attribute-rgx= - -# Naming style matching correct class names. -class-naming-style=PascalCase - -# Regular expression matching correct class names. Overrides class-naming- -# style. -#class-rgx= - -# Naming style matching correct constant names. -const-naming-style=any - -# Regular expression matching correct constant names. Overrides const-naming- -# style. -#const-rgx= - -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 - -# Naming style matching correct function names. -function-naming-style=snake_case - -# Regular expression matching correct function names. Overrides function- -# naming-style. -#function-rgx= - -# Good variable names which should always be accepted, separated by a comma. -good-names=i, j, k, m, n, - t, x, y, z, xy, - nx, dx, x1, x2, - ny, dy, y1, y2, - fd, ax, h, - _ - -# Include a hint for the correct naming format with invalid-name. -include-naming-hint=no - -# Naming style matching correct inline iteration names. -inlinevar-naming-style=snake_case - -# Regular expression matching correct inline iteration names. Overrides -# inlinevar-naming-style. -#inlinevar-rgx= - -# Naming style matching correct method names. -method-naming-style=snake_case - -# Regular expression matching correct method names. Overrides method-naming- -# style. -#method-rgx= - -# Naming style matching correct module names. -#module-naming-style=snake_case - -# Regular expression matching correct module names. Overrides module-naming- -# style. -module-rgx=^(test_)?((?P_{0,2}[a-z][a-z0-9_]{1,29}_{0,2})|(?P_?[A-Z][a-zA-Z0-9]{1,29}_{0,2}))$ - -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= - -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ - -# List of decorators that produce properties, such as abc.abstractproperty. Add -# to this list to register other decorators that produce valid properties. -# These decorators are taken in consideration only for invalid-name. -property-classes=abc.abstractproperty - -# Naming style matching correct variable names. -variable-naming-style=snake_case - -# Regular expression matching correct variable names. Overrides variable- -# naming-style. -#variable-rgx= - - -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -expected-line-ending-format=LF - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=" " - -# Maximum number of characters on a single line. -max-line-length=99 - -# Maximum number of lines in a module. -max-module-lines=999 - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[LOGGING] - -# Format style used to check logging format string. `old` means using % -# formatting, `new` is for `{}` formatting, and `fstr` is for f-strings. -logging-format-style=new - -# Logging modules to check that the string format arguments are in logging -# function parameter format. -logging-modules=logging - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME, - XXX, - TODO - - -[SIMILARITIES] - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - -# Ignore imports when computing similarities. -ignore-imports=no - -# Minimum lines number of a similarity. -min-similarity-lines=16 - - -[SPELLING] - -# Limits count of emitted suggestions for spelling mistakes. -max-spelling-suggestions=4 - -# Spelling dictionary name. Available dictionaries: none. To make it work, -# install the python-enchant package. -spelling-dict= - -# List of comma separated words that should not be checked. -spelling-ignore-words= - -# A path to a file that contains the private dictionary; one word per line. -spelling-private-dict-file= - -# Tells whether to store unknown words to the private dictionary (see the -# --spelling-private-dict-file option) instead of raising a message. -spelling-store-unknown-words=no - - -[STRING] - -# This flag controls whether the implicit-str-concat-in-sequence should -# generate a warning on implicit string concatenation in sequences defined over -# several lines. -check-str-concat-over-line-jumps=no - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members=numpy, - pyproj, - netCDF4, - mpl_toolkits.basemap.Basemap - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# Tells whether to warn about missing members when the owner of the attribute -# is inferred to be None. -ignore-none=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=yes - -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values, - thread._local, - _thread._local - -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis). It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules=_geoslib - -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes - -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 - -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 - -# List of decorators that change the signature of a decorated function. -signature-mutators= - - -[VARIABLES] - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid defining new builtins when possible. -additional-builtins= - -# Tells whether unused global variables should be treated as a violation. -allow-global-unused-variables=yes - -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_, - _cb - -# A regular expression matching the name of dummy variables (i.e. expected to -# not be used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore. -ignored-argument-names=_.*|^ignored_|^unused_ - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# List of qualified module names which can have objects that can redefine -# builtins. -redefining-builtins-modules=past.builtins, - future.builtins, - builtins, - io - - -[CLASSES] - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__, - __new__, - setUp, - __post_init__ - -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict, - _fields, - _replace, - _source, - _make - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs - - -[DESIGN] - -# Maximum number of arguments for function / method (see R0913). -max-args=6 - -# Maximum number of attributes for a class (see R0902). -max-attributes=12 - -# Maximum number of boolean expressions in an if statement (see R0916). -max-bool-expr=6 - -# Maximum number of branch for function / method body (see R0912). -max-branches=24 - -# Maximum number of locals for function / method body (see R0914). -max-locals=24 - -# Maximum number of parents for a class (see R0901). -max-parents=18 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=90 - -# Maximum number of return / yield for function / method body. -max-returns=6 - -# Maximum number of statements in function / method body (see R0915). -max-statements=90 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=1 - - -[IMPORTS] - -# List of modules that can be imported at any level, not just the top level -# one. -allow-any-import-level= - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Analyse import fallback blocks. This can be used to support both Python 2 and -# 3 compatible code, which means that the block might have code that exists -# only in one or another interpreter, leading to false positives when analysed. -analyse-fallback-blocks=no - -# Deprecated modules which should not be used, separated by a comma. -deprecated-modules=optparse, - tkinter.tix - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled). -ext-import-graph= - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled). -import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled). -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - -# Couples of modules and preferred modules, separated by a comma. -preferred-modules= - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "builtins.BaseException, builtins.Exception". -overgeneral-exceptions=builtins.BaseException, - builtins.Exception diff --git a/packages/basemap/LICENSE b/packages/basemap/LICENSE deleted file mode 100644 index 120eb7e3f..000000000 --- a/packages/basemap/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2014 Jeffrey Whitaker -Copyright (c) 2015-2024 The Matplotlib development team - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/basemap/MANIFEST.in b/packages/basemap/MANIFEST.in deleted file mode 100644 index 93b419369..000000000 --- a/packages/basemap/MANIFEST.in +++ /dev/null @@ -1,9 +0,0 @@ -include requirements*.txt -recursive-include doc * -recursive-exclude doc/build * -recursive-include test * -recursive-include utils *.py -recursive-exclude **/__pycache__ * -recursive-exclude **/.DS_Store * -exclude **/*.pyc -exclude **/.gitkeep diff --git a/packages/basemap/README.md b/packages/basemap/README.md deleted file mode 100644 index be631e774..000000000 --- a/packages/basemap/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# basemap - -Plot on map projections (with coastlines and political boundaries) using -[`matplotlib`]. - -This package depends on the support package [`basemap-data`] with the -basic [`basemap`] data assets, and optionally on the support package -[`basemap-data-hires`] with high-resolution data assets. - -## Installation - -Precompiled binary wheels for Windows and GNU/Linux are available in -PyPI (architectures x86 and x64, Python 2.7 and 3.5+) and can be -installed with [`pip`]: -```sh -python -m pip install basemap -``` - -If you need to install from source, please visit the -[GitHub repository](https://github.com/matplotlib/basemap) for a -step-by-step description. - -## License - -The library is licensed under the terms of the [MIT] license (see -[`LICENSE`]). The GEOS dynamic library bundled with the package wheels -is provided under the terms of the [LGPLv2.1] license as given in -[`LICENSE.geos`]. - - -[`matplotlib`]: -https://matplotlib.org/ -[`basemap`]: -https://matplotlib.org/basemap/ -[`basemap-data`]: -https://pypi.org/project/basemap-data -[`basemap-data-hires`]: -https://pypi.org/project/basemap-data-hires -[`pip`]: -https://pip.pypa.io/ - -[LGPLv2.1]: -https://spdx.org/licenses/LGPL-2.1-only.html -[MIT]: -https://spdx.org/licenses/MIT.html - -[`LICENSE`]: -https://github.com/matplotlib/basemap/blob/v1.4.1/packages/basemap/LICENSE -[`LICENSE.geos`]: -https://github.com/matplotlib/basemap/blob/v1.4.1/packages/basemap/LICENSE.geos diff --git a/packages/basemap/pyproject.toml b/packages/basemap/pyproject.toml deleted file mode 100644 index 6a50e2c78..000000000 --- a/packages/basemap/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[build-system] -requires = [ - 'setuptools', - 'wheel', - 'numpy == 1.26.1; python_version >= "3.12"', - 'numpy == 1.23.3; python_version == "3.11"', - 'numpy == 1.21.4; python_version == "3.10"', - 'numpy == 1.21.4; sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")', - 'numpy == 1.16.6; sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")', - 'numpy == 1.16.6; python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")', - 'numpy == 1.11.3; python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")', - 'cython >= 0.29, < 3.1; python_version >= "3.3" or python_version < "3.0"', - 'cython >= 0.26, < 0.27; python_version == "3.2"' -] -build-backend = "setuptools.build_meta" diff --git a/packages/basemap/requirements-doc.txt b/packages/basemap/requirements-doc.txt deleted file mode 100644 index 385d1e158..000000000 --- a/packages/basemap/requirements-doc.txt +++ /dev/null @@ -1,6 +0,0 @@ -sphinx >= 5.3, < 7.2; python_version >= "3.8" -furo >= 2022.4.7, < 2023.9.11; python_version >= "3.8" - -scipy >= 1.2, < 1.12; python_version >= "3.5" -cftime >= 1.4.0, < 1.7.0; python_version >= "3.6" -netCDF4 >= 1.5.6, < 1.7.0; python_version >= "3.6" diff --git a/packages/basemap/requirements-lint.txt b/packages/basemap/requirements-lint.txt deleted file mode 100644 index 2b2a187c4..000000000 --- a/packages/basemap/requirements-lint.txt +++ /dev/null @@ -1,17 +0,0 @@ -unittest2; python_version <= "3.9" - -flake8 >= 2.6, < 3.0; python_version == "2.6" -flake8 >= 2.6, < 4.0; python_version == "2.7" -flake8 >= 2.6, < 3.0; python_version == "3.2" -flake8 >= 2.6, < 3.0; python_version == "3.3" -flake8 >= 2.6, < 3.9; python_version == "3.4" -flake8 >= 2.6, < 6.2; python_version >= "3.5" - -astroid >= 1.6, < 2.0; python_version == "2.7" -astroid >= 2.4, < 2.5; python_version == "3.5" -astroid >= 2.5, < 2.7; python_version == "3.6" -astroid >= 2.8, < 3.1; python_version >= "3.7" -pylint >= 1.9, < 2.0; python_version == "2.7" -pylint >= 2.6, < 2.7; python_version == "3.5" -pylint >= 2.7, < 2.10; python_version == "3.6" -pylint >= 2.11, < 3.1; python_version >= "3.7" diff --git a/packages/basemap/requirements-owslib.txt b/packages/basemap/requirements-owslib.txt deleted file mode 100644 index 5c4f0439d..000000000 --- a/packages/basemap/requirements-owslib.txt +++ /dev/null @@ -1,8 +0,0 @@ -ordereddict; python_version == "2.6" -OWSLib >= 0.8.0, < 0.15.0; python_version == "2.6" -OWSLib >= 0.8.0, < 0.19.0; python_version == "2.7" -OWSLib >= 0.8.0, < 0.11.0; python_version == "3.2" -OWSLib >= 0.8.0, < 0.11.0; python_version == "3.3" -OWSLib >= 0.8.0, < 0.18.0; python_version == "3.4" -OWSLib >= 0.8.0, < 0.20.0; python_version == "3.5" -OWSLib >= 0.28.1, < 0.30.0; python_version >= "3.6" diff --git a/packages/basemap/requirements-pillow.txt b/packages/basemap/requirements-pillow.txt deleted file mode 100644 index 647257799..000000000 --- a/packages/basemap/requirements-pillow.txt +++ /dev/null @@ -1,8 +0,0 @@ -pillow >= 3.4.0, < 4.0.0; python_version == "2.6" -pillow >= 6.2.2, < 7.0.0; python_version == "2.7" -pillow >= 3.4.0, < 4.0.0; python_version == "3.2" -pillow >= 4.3.0, < 5.0.0; python_version == "3.3" -pillow >= 5.4.0, < 6.0.0; python_version == "3.4" -pillow >= 7.1.0, < 8.0.0; python_version == "3.5" -pillow >= 8.3.2, < 9.0.0; python_version == "3.6" -pillow >= 9.4.0, < 10.2.0; python_version >= "3.7" diff --git a/packages/basemap/requirements-setup.txt b/packages/basemap/requirements-setup.txt deleted file mode 100644 index 6f39a1a05..000000000 --- a/packages/basemap/requirements-setup.txt +++ /dev/null @@ -1,2 +0,0 @@ -cython >= 0.29, < 3.1; python_version >= "3.3" or python_version < "3.0" -cython >= 0.26, < 0.27; python_version == "3.2" diff --git a/packages/basemap/requirements-test.txt b/packages/basemap/requirements-test.txt deleted file mode 100644 index 7491b2686..000000000 --- a/packages/basemap/requirements-test.txt +++ /dev/null @@ -1,23 +0,0 @@ -unittest2; python_version <= "3.9" - -pytest >= 3.2.0, < 3.3; python_version == "2.6" -pytest >= 4.6.9, < 5.0; python_version == "2.7" -pytest >= 2.9.0, < 3.0; python_version == "3.2" -pytest >= 3.2.0, < 3.3; python_version == "3.3" -pytest >= 4.6.9, < 5.0; python_version == "3.4" -pytest >= 6.1.2, < 6.2; python_version == "3.5" -pytest >= 6.2.5, < 7.5; python_version >= "3.6" - -coverage >= 4.5, < 5.0; python_version == "2.6" -coverage >= 5.5, < 6.0; python_version == "2.7" -coverage >= 3.7, < 4.0; python_version == "3.2" -coverage >= 4.5, < 5.0; python_version == "3.3" -coverage >= 4.5, < 5.0; python_version == "3.4" -coverage >= 5.5, < 6.0; python_version == "3.5" -coverage >= 5.5, < 7.4; python_version >= "3.6" -pytest-cov >= 2.5, < 2.6; python_version == "2.6" -pytest-cov >= 2.9, < 3.0; python_version == "2.7" -pytest-cov >= 2.5, < 2.6; python_version == "3.2" -pytest-cov >= 2.5, < 2.6; python_version == "3.3" -pytest-cov >= 2.5, < 2.9; python_version == "3.4" -pytest-cov >= 2.9, < 4.2; python_version >= "3.5" diff --git a/packages/basemap/requirements.txt b/packages/basemap/requirements.txt deleted file mode 100644 index 3c028489e..000000000 --- a/packages/basemap/requirements.txt +++ /dev/null @@ -1,38 +0,0 @@ -basemap_data >= 1.3.2, < 1.4 - -numpy >= 1.11, < 1.12; python_version == "2.6" -numpy >= 1.16, < 1.17; python_version == "2.7" -numpy >= 1.11, < 1.12; python_version == "3.2" -numpy >= 1.11, < 1.12; python_version == "3.3" -numpy >= 1.15, < 1.17; python_version == "3.4" -numpy >= 1.16, < 1.19; python_version == "3.5" -numpy >= 1.19, < 1.20; python_version == "3.6" -numpy >= 1.21, < 1.22; python_version == "3.7" -numpy >= 1.21, < 1.27; python_version >= "3.8" - -cycler < 0.11; python_version == "3.2" -pyparsing >= 1.5, < 2.4.1; python_version == "2.6" -pyparsing >= 1.5, < 2.3.1; python_version == "3.2" -matplotlib >= 1.5, < 2.0; python_version == "2.6" -matplotlib >= 1.5, < 3.0; python_version == "2.7" -matplotlib >= 1.5, < 2.0; python_version == "3.2" -matplotlib >= 1.5, < 2.0; python_version == "3.3" -matplotlib >= 1.5, < 3.0; python_version == "3.4" -matplotlib >= 1.5, < 3.9; python_version >= "3.5" - -pyproj >= 1.9.3, < 2.1.0; python_version == "2.6" -pyproj >= 1.9.3, < 2.2.0; python_version == "2.7" -pyproj >= 1.9.3, < 1.9.6; python_version == "3.2" -pyproj >= 1.9.3, < 2.1.0; python_version == "3.3" -pyproj >= 1.9.3, < 2.1.0; python_version == "3.4" -pyproj >= 1.9.3, < 3.7.0; python_version >= "3.5" - -pyshp >= 1.2, < 2.0; python_version == "2.6" -pyshp >= 1.2, < 2.4; python_version >= "2.7" - -packaging >= 16.0, < 17.0; python_version == "2.6" -packaging >= 16.0, < 21.0; python_version == "2.7" -packaging >= 16.0, < 17.0; python_version == "3.2" -packaging >= 16.0, < 17.0; python_version == "3.3" -packaging >= 16.0, < 21.0; python_version == "3.4" -packaging >= 16.0, < 24.0; python_version >= "3.5" diff --git a/packages/basemap/setup.cfg b/packages/basemap/setup.cfg deleted file mode 100644 index 58e39b69a..000000000 --- a/packages/basemap/setup.cfg +++ /dev/null @@ -1,42 +0,0 @@ -[metadata] -license_files = - LICENSE - LICENSE.geos - -[sdist] -formats = zip - -[flake8] -ignore = - E301,E306,E402,E501,E731,F401,F403,W503,W504 -# E301: expected-blank-line-missing -# E306: no-blank-line-before-nested-def -# E402: module-import-not-at-top-file -# E501: line-too-long -# E731: used-lambda -# F401: unused-import -# F403: wildcard-import -# W503: line-break-before-binary-operator -# W504: line-break-after-binary-operator - -[tool:pytest] -filterwarnings = - error - # To be removed when replacing `unittest2`. - ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated:DeprecationWarning:unittest2.compatibility:143 - # To be removed with `dateutil` release after 2.8.2. - # See: https://github.com/dateutil/dateutil/issues/1314 - ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:dateutil.tz.tz:37 - -[coverage:paths] -source = - src - /opt/pyenv/versions/**/site-packages - -[coverage:report] -exclude_lines = - pragma: no cover - def __repr__ - def __str__ - raise NotImplementedError - if __name__ == .__main__.: diff --git a/packages/basemap/src/mpl_toolkits/__init__.py b/packages/basemap/src/mpl_toolkits/__init__.py deleted file mode 100644 index b5cd40f18..000000000 --- a/packages/basemap/src/mpl_toolkits/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import (absolute_import, division, print_function) - -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - pass # must not have setuptools diff --git a/packages/basemap/test/__init__.py b/packages/basemap/test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/basemap/test/mpl_toolkits/__init__.py b/packages/basemap/test/mpl_toolkits/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/basemap_data/setup.cfg b/packages/basemap_data/setup.cfg deleted file mode 100644 index 46fc44d00..000000000 --- a/packages/basemap_data/setup.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[metadata] -license_files = - COPYING - COPYING.LESSER - LICENSE.epsg - LICENSE.mit - -[sdist] -formats = zip - -[bdist_wheel] -universal = 1 diff --git a/packages/basemap_data/src/__init__.py b/packages/basemap_data/src/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/basemap_data/src/mpl_toolkits/__init__.py b/packages/basemap_data/src/mpl_toolkits/__init__.py deleted file mode 100644 index 02de4115d..000000000 --- a/packages/basemap_data/src/mpl_toolkits/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - pass # must not have setuptools diff --git a/packages/basemap_data/src/mpl_toolkits/basemap_data/__init__.py b/packages/basemap_data/src/mpl_toolkits/basemap_data/__init__.py deleted file mode 100644 index 02de4115d..000000000 --- a/packages/basemap_data/src/mpl_toolkits/basemap_data/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - pass # must not have setuptools diff --git a/packages/basemap_data_hires/setup.cfg b/packages/basemap_data_hires/setup.cfg deleted file mode 100644 index e408a4da9..000000000 --- a/packages/basemap_data_hires/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[metadata] -license_files = - COPYING - COPYING.LESSER - -[sdist] -formats = zip - -[bdist_wheel] -universal = 1 diff --git a/packages/basemap_data_hires/src/__init__.py b/packages/basemap_data_hires/src/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/basemap_data_hires/src/mpl_toolkits/__init__.py b/packages/basemap_data_hires/src/mpl_toolkits/__init__.py deleted file mode 100644 index 02de4115d..000000000 --- a/packages/basemap_data_hires/src/mpl_toolkits/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - pass # must not have setuptools diff --git a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/__init__.py b/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/__init__.py deleted file mode 100644 index 02de4115d..000000000 --- a/packages/basemap_data_hires/src/mpl_toolkits/basemap_data/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - pass # must not have setuptools diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..390e03843 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = [ + "setuptools >= 67.0, < 81.0", + "wheel >= 0.40, < 0.46", + "cython >= 3.0, < 3.2", + "numpy == 2.1.0; python_version == '3.13'", + "numpy == 2.0.0; python_version <= '3.12'", +] +build-backend = "setuptools.build_meta" + +[tool.flake8] +ignore = [ + "E301", # expected-blank-line-missing + "E306", # no-blank-line-before-nested-def + "E402", # module-import-not-at-top-file + "E501", # line-too-long + "E731", # used-lambda + "F401", # unused-import + "F403", # wildcard-import + "W503", # line-break-before-binary-operator + "W504", # line-break-after-binary-operator +] + +[tool.pytest.ini_options] +filterwarnings = [ + "error", +] + +[tool.coverage.paths] +source = [ + "src", + "*/site-packages", +] + +[tool.coverage.report] +exclude_also = [ + "pragma: no cover", + "def __repr__", + "def __str__", + "raise NotImplementedError", + "if __name__ == .__main__.:", +] diff --git a/packages/basemap/setup.py b/setup.py similarity index 76% rename from packages/basemap/setup.py rename to setup.py index 4c98a8776..070b49501 100644 --- a/packages/basemap/setup.py +++ b/setup.py @@ -10,16 +10,10 @@ import glob import warnings from setuptools import setup -from setuptools import find_packages +from setuptools import find_namespace_packages from setuptools.command.sdist import sdist from setuptools.extension import Extension -try: - import Cython - cython_major_version = int(Cython.__version__.split(".", 1)[0]) -except ImportError: - cython_major_version = 0 - def get_content(name, splitlines=False): """Return the file contents with project root as root folder.""" @@ -162,59 +156,38 @@ def run(self): for ext in ext_modules: ext.cython_directives = [ ("language_level", str(sys.version_info[0])), - ("legacy_implicit_noexcept", True), - ][:1 + int(cython_major_version >= 3)] - -# Define all the different requirements. -setup_requires = get_content("requirements-setup.txt", splitlines=True) -install_requires = get_content("requirements.txt", splitlines=True) -if sys.version_info[:2] == (3, 2): - # Hack for Python 3.2 because pip < 8 cannot handle version markers. - marker1 = '; python_version == "3.2"' - marker2 = '; python_version >= "2.7"' - setup_requires = [ - item.replace(marker1, "").replace(marker2, "") for item in setup_requires - if item.endswith(marker1) or item.endswith(marker2) - or "python_version" not in item] - install_requires = [ - item.replace(marker1, "").replace(marker2, "") for item in install_requires - if item.endswith(marker1) or item.endswith(marker2) - or "python_version" not in item] -else: - marker1 = '; python_version == "3.2"' - setup_requires = [item for item in setup_requires if not item.endswith(marker1)] - install_requires = [item for item in install_requires if not item.endswith(marker1)] + ] setup(**{ "name": "basemap", "version": get_version("mpl_toolkits.basemap"), - "license": - "MIT", "description": "Plot data on map projections with matplotlib", "long_description": get_content("README.md"), "long_description_content_type": "text/markdown", - "url": - "https://matplotlib.org/basemap", "author": "Jeff Whitaker", "author_email": "jeffrey.s.whitaker@noaa.gov", "maintainer": - "Víctor Molina García", + "The Matplotlib development team", "maintainer_email": - "molinav@users.noreply.github.com", + "matplotlib-users@python.org", + "license": + "MIT", + "license_files": [ + "LICENSE", + "LICENSE.geos", + ], "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Education", "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Visualization", "Topic :: Software Development :: Libraries :: Python Modules", @@ -224,49 +197,42 @@ def run(self): "maps", "plots", ], - "namespace_packages": [ - "mpl_toolkits", - ], "package_dir": {"": "src"}, "packages": - find_packages(where="src"), + find_namespace_packages(where="src"), "ext_modules": ext_modules, "data_files": data_files, "python_requires": ", ".join([ - ">=2.6", - "!=3.0.*", - "!=3.1.*", - "<3.13", + ">=3.9", + "<3.14", ]), - "setup_requires": - setup_requires, "install_requires": - install_requires, + get_content("dep/requirements.txt", splitlines=True), "extras_require": { "doc": - get_content("requirements-doc.txt", splitlines=True), + get_content("dep/requirements-doc.txt", splitlines=True), "lint": - get_content("requirements-lint.txt", splitlines=True), + get_content("dep/requirements-lint.txt", splitlines=True), "test": - get_content("requirements-test.txt", splitlines=True), + get_content("dep/requirements-test.txt", splitlines=True), "owslib": - get_content("requirements-owslib.txt", splitlines=True), - "pillow": - get_content("requirements-pillow.txt", splitlines=True), + get_content("dep/requirements-owslib.txt", splitlines=True), }, "cmdclass": { "sdist": basemap_sdist, }, "project_urls": { - "Bug Tracker": - "https://github.com/matplotlib/basemap/issues", - "Documentation": - "https://matplotlib.org/basemap/", - "Source": + "Homepage": "https://github.com/matplotlib/basemap", + "Documentation": + "https://matplotlib.org/basemap", + "Repository": + "https://github.com/matplotlib/basemap.git", + "Issues": + "https://github.com/matplotlib/basemap/issues", }, }) diff --git a/packages/basemap/src/_geoslib.pyx b/src/_geoslib.pyx similarity index 99% rename from packages/basemap/src/_geoslib.pyx rename to src/_geoslib.pyx index 1e2ced532..2aab76867 100644 --- a/packages/basemap/src/_geoslib.pyx +++ b/src/_geoslib.pyx @@ -2,7 +2,7 @@ import sys import numpy cimport numpy as cnp -__version__ = "1.4.1" +__version__ = "2.1.0.dev0" # Need some Python C-API functions for strings. @@ -112,7 +112,7 @@ cdef extern from "geos_c.h": # Cython 3: Next cdef needs "noexcept" declaration unless # the compiler directive "legacy_implicit_noexcept" is used # ("noexcept" syntax supported since Cython 0.29.31). -cdef void notice_h(const char *fmt, ...): +cdef void notice_h(const char *fmt, ...) noexcept: pass #format = PyBytes_FromString(fmt) #message = PyBytes_FromString(msg) diff --git a/packages/basemap/src/mpl_toolkits/basemap/__init__.py b/src/mpl_toolkits/basemap/__init__.py similarity index 99% rename from packages/basemap/src/mpl_toolkits/basemap/__init__.py rename to src/mpl_toolkits/basemap/__init__.py index 651a2dd5a..46458b95b 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/__init__.py +++ b/src/mpl_toolkits/basemap/__init__.py @@ -48,7 +48,7 @@ from . proj import Proj -__version__ = "1.4.1" +__version__ = "2.1.0.dev0" # basemap data files now installed in lib/matplotlib/toolkits/basemap/data # check to see if environment variable BASEMAPDATA set to a directory, @@ -3570,7 +3570,7 @@ def contour(self,x,y,data,*args,**kwargs): "region to be consistent with your data, or (if your", "data is on a global lat/lon grid) use the shiftdata", "method to adjust the data to be consistent with the", - "map projection region (see examples/shiftdata.py)"])) + "map projection region (see doc/examples/shiftdata.py)"])) # mask for points more than one grid length outside projection limb. xx = ma.masked_where(x > 1.e20, x) yy = ma.masked_where(y > 1.e20, y) @@ -3667,7 +3667,7 @@ def contourf(self,x,y,data,*args,**kwargs): "region to be consistent with your data, or (if your", "data is on a global lat/lon grid) use the shiftgrid", "function to adjust the data to be consistent with the", - "map projection region (see examples/contour_demo.py)"])) + "map projection region (see doc/examples/contour_demo.py)"])) # mask for points more than one grid length outside projection limb. xx = ma.masked_where(x > 1.e20, x) yy = ma.masked_where(y > 1.e20, y) @@ -4413,6 +4413,7 @@ def wmsimage(self,server,\ verbose if True, print WMS server info (default False). \**kwargs extra keyword arguments passed on to + OWSLib.wms.WebMapService and OWSLib.wms.WebMapService.getmap. ============== ==================================================== @@ -4452,7 +4453,11 @@ def wmsimage(self,server,\ if ypixels is None: ypixels = int(self.aspect*xpixels) if verbose: print(server) - wms = WebMapService(server) + wms_keys = ["version", "xml", "username", "password", + "parse_remote_metadata", "timeout", "headers", "auth"] + wms_options = {k: kwargs[k] for k in wms_keys if k in kwargs} + kwargs = {k: kwargs[k] for k in kwargs if k not in wms_keys} + wms = WebMapService(server, **wms_options) if verbose: print('id: %s, version: %s' % (wms.identification.type,wms.identification.version)) @@ -4836,10 +4841,11 @@ def shiftdata(self,lonsin,datain=None,lon_0=None,fix_wrap_around=True): [lon_0-180, lon_0+180] range. ================ ====================================================== - if datain given, returns ``dataout,lonsout`` (data and longitudes shifted to fit in interval - [lon_0-180,lon_0+180]), otherwise just returns longitudes. If - transformed longitudes lie outside map projection region, data is - masked and longitudes are set to 1.e30. + If datain is given, returns ``lonsout, dataout`` (longitudes and data + shifted to fit in the interval [lon_0-180, lon_0+180]); otherwise, + returns just the shifted longitudes. If transformed longitudes lie + outside the map projection region, data is masked and longitudes are + set to 1.e30. """ if lon_0 is None and 'lon_0' not in self.projparams: raise ValueError('lon_0 keyword must be provided') diff --git a/packages/basemap/src/mpl_toolkits/basemap/cm.py b/src/mpl_toolkits/basemap/cm.py similarity index 99% rename from packages/basemap/src/mpl_toolkits/basemap/cm.py rename to src/mpl_toolkits/basemap/cm.py index 0114205c6..1b0b64798 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/cm.py +++ b/src/mpl_toolkits/basemap/cm.py @@ -11,7 +11,7 @@ * A sea surface temperature anomaly colormap: sstanom. * A stepped-sequential scheme: StepSeq. -Run `examples/show_colormaps.py` to see what these colormaps look like. +Run `doc/examples/show_colormaps.py` to see what these colormaps look like. """ from matplotlib import rcParams diff --git a/packages/basemap/src/mpl_toolkits/basemap/diagnostic.py b/src/mpl_toolkits/basemap/diagnostic.py similarity index 100% rename from packages/basemap/src/mpl_toolkits/basemap/diagnostic.py rename to src/mpl_toolkits/basemap/diagnostic.py diff --git a/packages/basemap/src/mpl_toolkits/basemap/proj.py b/src/mpl_toolkits/basemap/proj.py similarity index 100% rename from packages/basemap/src/mpl_toolkits/basemap/proj.py rename to src/mpl_toolkits/basemap/proj.py diff --git a/packages/basemap/src/mpl_toolkits/basemap/solar.py b/src/mpl_toolkits/basemap/solar.py similarity index 100% rename from packages/basemap/src/mpl_toolkits/basemap/solar.py rename to src/mpl_toolkits/basemap/solar.py diff --git a/packages/basemap/test/conftest.py b/test/conftest.py similarity index 100% rename from packages/basemap/test/conftest.py rename to test/conftest.py diff --git a/packages/basemap/test/mpl_toolkits/basemap/test_Basemap.py b/test/mpl_toolkits/basemap/test_Basemap.py similarity index 99% rename from packages/basemap/test/mpl_toolkits/basemap/test_Basemap.py rename to test/mpl_toolkits/basemap/test_Basemap.py index 6a94d291f..f18b2c29e 100644 --- a/packages/basemap/test/mpl_toolkits/basemap/test_Basemap.py +++ b/test/mpl_toolkits/basemap/test_Basemap.py @@ -4,10 +4,7 @@ import shutil import tempfile import datetime as dt -try: - import unittest2 as unittest -except ImportError: - import unittest +import unittest import numpy as np import matplotlib as mpl diff --git a/packages/basemap/test/mpl_toolkits/basemap/test_cm.py b/test/mpl_toolkits/basemap/test_cm.py similarity index 92% rename from packages/basemap/test/mpl_toolkits/basemap/test_cm.py rename to test/mpl_toolkits/basemap/test_cm.py index 77df7d3bf..66d8ef665 100644 --- a/packages/basemap/test/mpl_toolkits/basemap/test_cm.py +++ b/test/mpl_toolkits/basemap/test_cm.py @@ -1,10 +1,6 @@ """Import test for :mod:`mpl_toolkits.basemap.cm`.""" -try: - import unittest2 as unittest -except ImportError: - import unittest - +import unittest from mpl_toolkits.basemap import cm diff --git a/packages/basemap/test/mpl_toolkits/basemap/test_diagnostic.py b/test/mpl_toolkits/basemap/test_diagnostic.py similarity index 93% rename from packages/basemap/test/mpl_toolkits/basemap/test_diagnostic.py rename to test/mpl_toolkits/basemap/test_diagnostic.py index b5bacce3a..f5ac65564 100644 --- a/packages/basemap/test/mpl_toolkits/basemap/test_diagnostic.py +++ b/test/mpl_toolkits/basemap/test_diagnostic.py @@ -1,11 +1,7 @@ """Import test for :mod:`mpl_toolkits.basemap.diagnostic`.""" +import unittest from collections import namedtuple -try: - import unittest2 as unittest -except ImportError: - import unittest - from mpl_toolkits.basemap import diagnostic diff --git a/packages/basemap/test/mpl_toolkits/basemap/test_proj.py b/test/mpl_toolkits/basemap/test_proj.py similarity index 97% rename from packages/basemap/test/mpl_toolkits/basemap/test_proj.py rename to test/mpl_toolkits/basemap/test_proj.py index dfdcd69ba..4385c8f6f 100644 --- a/packages/basemap/test/mpl_toolkits/basemap/test_proj.py +++ b/test/mpl_toolkits/basemap/test_proj.py @@ -1,10 +1,6 @@ """Import test for :mod:`mpl_toolkits.basemap.proj`.""" -try: - import unittest2 as unittest -except ImportError: - import unittest - +import unittest from mpl_toolkits.basemap.proj import Proj diff --git a/packages/basemap/test/mpl_toolkits/test_basemap.py b/test/mpl_toolkits/test_basemap.py similarity index 73% rename from packages/basemap/test/mpl_toolkits/test_basemap.py rename to test/mpl_toolkits/test_basemap.py index 80a31cb2e..9aab0ef48 100644 --- a/packages/basemap/test/mpl_toolkits/test_basemap.py +++ b/test/mpl_toolkits/test_basemap.py @@ -1,10 +1,6 @@ """Import test for the :mod:`mpl_toolkits.basemap` package.""" -try: - import unittest2 as unittest -except ImportError: - import unittest - +import unittest from mpl_toolkits import basemap @@ -18,8 +14,8 @@ def test_version_attribute(self): basemap_version = basemap.__version__ num = r"(?:0|[1-9]\d*)" - build = r"(?:dev|a[1-4]|b[1-3]|rc[1-2])" - semver = r"^({0}\.{0}\.{0})(?:[+-]?({1}))?$".format(num, build) + build = r"(?:dev[0]?|a[1-4]|b[1-3]|rc[1-2])" + semver = r"^({0}\.{0}\.{0})(?:[+-\.]?({1}))?$".format(num, build) self.assertRegex(basemap_version, semver) diff --git a/packages/basemap/utils/GeosLibrary.py b/utils/GeosLibrary.py similarity index 98% rename from packages/basemap/utils/GeosLibrary.py rename to utils/GeosLibrary.py index 4db6b88e9..0462d6775 100644 --- a/packages/basemap/utils/GeosLibrary.py +++ b/utils/GeosLibrary.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2021-2024 Víctor Molina García +# Copyright (c) 2021-2025 Víctor Molina García # # GeosLibrary.py is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published @@ -62,7 +62,7 @@ def __init__(self, version, root=None): def __del__(self): """Clean up after :class:`GeosLibrary` destruction.""" - if self.temp: + if getattr(self, "temp", None) and getattr(self, "root", None): try: shutil.rmtree(self.root) except OSError: diff --git a/packages/basemap/utils/__init__.py b/utils/__init__.py similarity index 100% rename from packages/basemap/utils/__init__.py rename to utils/__init__.py