Skip to content

geopandas: Use io.StringIO to read geojson data and handle compatibility with geopandas v0.x and v1.x #1818

geopandas: Use io.StringIO to read geojson data and handle compatibility with geopandas v0.x and v1.x

geopandas: Use io.StringIO to read geojson data and handle compatibility with geopandas v0.x and v1.x #1818

Workflow file for this run

# Static type checks
#
# This workflow runs static type checks using mypy.
#
# It is run on every commit to the main and pull request branches. It is also
# scheduled to run daily on the main branch.
#
name: Static Type Checks
on:
push:
branches: [ main ]
paths:
- 'pygmt/**/*.py'
- '.github/workflows/type_checks.yml'
pull_request:
paths:
- 'pygmt/**/*.py'
- '.github/workflows/type_checks.yml'
# Schedule daily tests
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
static_check:
name: Static Type Check
runs-on: ubuntu-latest
steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v4.1.5
# Setup Python
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.12'
- name: Install packages
run: |
# Need to install four groups of packages:
# 1. required packages
# 2. optional packages
# 3. type checker and stub packages
# 4. other packages that are used somewhere in PyGMT
python -m pip install \
numpy pandas xarray netcdf4 packaging \
contextily geopandas ipython rioxarray \
mypy pandas-stubs \
matplotlib pytest
python -m pip list
- name: Static type check
run: make typecheck