Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pysal/esda into corrfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwolf committed Aug 16, 2024
2 parents c643524 + 90c69cd commit 4248521
Show file tree
Hide file tree
Showing 64 changed files with 1,607 additions and 1,250 deletions.
14 changes: 0 additions & 14 deletions .coveragerc

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
strategy:
matrix:
os: ['ubuntu-latest']
environment-file: [ci/311.yaml]
environment-file: [ci/312-latest.yaml]
experimental: [false]
defaults:
run:
Expand Down
44 changes: 17 additions & 27 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,30 @@
jobs:
unittests:
env:
FETCH_DATA: python -c 'from libpysal.examples import load_example as ex; [ex(e) for e in ["columbus", "desmith", "sids2", "stl"]]'
RUN_TEST: pytest esda -v -r a -n auto --cov esda --cov-config .coveragerc --cov-report xml --color yes --cov-append --cov-report term-missing
FETCH_DATA: python -c 'from libpysal.examples import load_example as ex; [ex(e) for e in ["columbus", "desmith", "sids2", "stl", "Sacramento1"]]'
RUN_TEST: pytest esda -v -r a -n auto --cov esda --cov-report xml --color yes --cov-append --cov-report term-missing
name: CI (${{ matrix.os }}, ${{ matrix.environment-file }})
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
matrix:
os: [ubuntu-latest]
environment-file:
- ci/38-minimal.yaml
- ci/38-minimal-numba.yaml
- ci/39.yaml
- ci/39-numba.yaml
- ci/310.yaml
- ci/310-numba.yaml
- ci/310-DEV.yaml
- ci/310-numba-DEV.yaml
- ci/311.yaml
- ci/311-numba.yaml
- ci/311-DEV.yaml
- ci/311-numba-DEV.yaml
- ci/310-oldest.yaml
- ci/310-numba-oldest.yaml
- ci/311-latest.yaml
- ci/311-numba-latest.yaml
- ci/312-min.yaml
- ci/312-latest.yaml
- ci/312-dev.yaml
- ci/312-numba-latest.yaml
- ci/312-numba-dev.yaml
include:
- environment-file: ci/310-numba.yaml
os: macos-latest
- environment-file: ci/311.yaml
os: macos-latest
- environment-file: ci/310-numba.yaml
os: windows-latest
- environment-file: ci/311.yaml
- environment-file: ci/312-numba-latest.yaml
os: macos-13 # Intel
- environment-file: ci/312-numba-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/312-numba-latest.yaml
os: windows-latest
fail-fast: false
defaults:
Expand All @@ -63,11 +58,6 @@
micromamba-version: 'latest'
environment-file: ${{ matrix.environment-file }}

- name: install bleeding edge libpysal (Ubuntu / Python 3.10)
run: |
pip install git+https://github.com/pysal/libpysal.git@main
if: matrix.os == 'ubuntu-latest' && contains(matrix.environment-file, 'DEV')

- name: environment info
run: |
micromamba info
Expand All @@ -82,7 +72,7 @@
${{ env.RUN_TEST }}
- name: ${{ matrix.os }}, ${{ matrix.environment-file }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -29,7 +29,7 @@ jobs:
twine check --strict dist/*
- name: Create Release Notes
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dist
.bash_history
.cache/
.conda/
.coverage
*.coverage*
.coverage.snuc.30509.410533
.eggs/
.ipython/
Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
files: "esda\/"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.3"
hooks:
- id: ruff
- id: ruff-format

ci:
autofix_prs: false
autoupdate_schedule: quarterly
44 changes: 32 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Exploratory Spatial Data Analysis in PySAL

![tag](https://img.shields.io/github/v/release/pysal/esda?include_prereleases&sort=semver)
[![Continuous Integration](https://github.com/pysal/esda/actions/workflows/testing.yml/badge.svg)](https://github.com/pysal/esda/actions/workflows/testing.yml)
[![codecov](https://codecov.io/gh/pysal/esda/branch/master/graph/badge.svg)](https://codecov.io/gh/pysal/esda)
[![codecov](https://codecov.io/gh/pysal/esda/branch/main/graph/badge.svg)](https://codecov.io/gh/pysal/esda)
[![DOI](https://zenodo.org/badge/81873636.svg)](https://zenodo.org/badge/latestdoi/81873636)

Methods for testing for global and local autocorrelation in areal unit data.
Expand All @@ -11,41 +12,60 @@ Methods for testing for global and local autocorrelation in areal unit data.
- [Tutorial](https://pysal.org/esda/tutorial.html)
- [API](https://pysal.org/esda/api.html)


## Installation

Install esda by running:
Install `esda` by running:

### conda-forge

*preferred*

```
$ conda install -c conda-forge esda
```

### PyPI

```
$ pip install esda
```

### GitHub

```
$ pip install git+https://github.com/pysal/esda@main
```

## Requirements

- libpysal
- `geopandas>=0.12`
- `libpysal>=4.12`
- `numpy>=1.24`
- `pandas>1.5`
- `scikit-learn>=1.2`
- `scipy>=1.9`
- `shapely>=2.0`

### Optional dependencies

- `numba`, version `0.50.1` or greater, is used to accelerate computational geometry and permutation-based statistical inference. Unfortunately, versions before `0.50.1` may cause some local statistical functions to break, so please ensure you have `numba>=0.50.1` installed.
- `numba>=0.57` - used to accelerate computational geometry and permutation-based statistical inference.
- `rtree>=1.0` - required for `esda.topo.isolation()`
- `matplotlib` - required for `esda.moran.explore()`

## Contribute

PySAL-esda is under active development and contributors are welcome.

If you have any suggestion, feature request, or bug report, please open a new [issue](https://github.com/pysal/esda/issues) on GitHub. To submit patches, please follow the PySAL development [guidelines](https://github.com/pysal/pysal/wiki) and open a [pull request](https://github.com/pysal/esda). Once your changes get merged, you’ll automatically be added to the [Contributors List](https://github.com/pysal/esda/graphs/contributors).


## Support

If you are having issues, please talk to us in the [gitter room](https://gitter.im/pysal/pysal).


## License
If you are having issues, please talk to us in the [`esda` Discord channel](https://discord.gg/Re46DjyB9U).

The project is licensed under the [BSD 3-Clause license](https://github.com/pysal/esda/blob/master/LICENSE).
## License

The project is licensed under the [BSD 3-Clause license](https://github.com/pysal/esda/blob/main/LICENSE).

## Funding

[<img align="middle" src="/Users/the-gaboardi/esda/docs/_static/images/nsf_logo.jpg" width="100">](https://www.nsf.gov/index.jsp) National Science Foundation Award #1421935: [New Approaches to Spatial Distribution Dynamics](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1421935)
[<img align="middle" src="https://github.com/pysal/esda/blob/main/docs/_static/images/nsf_logo.jpg" width="100">](https://www.nsf.gov/index.jsp) National Science Foundation Award #1421935: [New Approaches to Spatial Distribution Dynamics](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1421935)
24 changes: 24 additions & 0 deletions ci/310-numba-oldest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: test
channels:
- conda-forge
dependencies:
- python=3.10
# required
- libpysal=4.12
- geopandas=0.12
- numpy=1.24
- pandas<1.6
- scikit-learn=1.2
- scipy=1.9
- shapely=2.0
# optional
- numba=0.57
- rtree=1.0
# testing
- codecov
- folium
- mapclassify
- matplotlib
- pytest
- pytest-cov
- pytest-xdist
19 changes: 11 additions & 8 deletions ci/310-numba.yaml → ci/310-oldest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ channels:
dependencies:
- python=3.10
# required
- libpysal
- numba
- pandas>=1.0
- scikit-learn
- scipy>=1.0
- libpysal=4.12
- geopandas=0.12
- numpy=1.24
- pandas<1.6
- scikit-learn=1.2
- scipy=1.9
- shapely=2.0
# optional
- rtree=1.0
# testing
- codecov
- folium
- mapclassify
- matplotlib
- pytest
- pytest-cov
- pytest-xdist
# optional
- geopandas>=0.7.0
- shapely>=2
17 changes: 9 additions & 8 deletions ci/39-numba.yaml → ci/311-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.11
# required
- libpysal
- numba
- pandas>=1.0
- geopandas
- libpysal>=4.12
- pandas
- scikit-learn
- scipy>=1.0
- scipy
- shapely
# testing
- codecov
- folium
- mapclassify
- matplotlib
- pytest
- pytest-cov
- pytest-xdist
- rtree
# optional
- geopandas>=0.7.0
- shapely>=2
- rtree
18 changes: 11 additions & 7 deletions ci/310-numba-DEV.yaml → ci/311-numba-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
# required
- numba
- pandas>=1.0
- geopandas
- libpysal>=4.12
- numpy
- pandas
- scikit-learn
- scipy>=1.0
- scipy
- shapely
# testing
- codecov
- folium
- mapclassify
- matplotlib
- pytest
- pytest-cov
- pytest-xdist
- rtree
# optional
- geopandas>=0.12.0
- shapely>=2
- numba
- rtree
28 changes: 0 additions & 28 deletions ci/311-numba.yaml

This file was deleted.

14 changes: 5 additions & 9 deletions ci/311-DEV.yaml → ci/312-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.11
- python=3.12
# required
- geos
# optional
- rtree
# testing
- codecov
- folium
- mapclassify
- matplotlib
- pytest
- pytest-cov
- pytest-xdist
- rtree
# doc build
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinxcontrib-napoleon
- sphinx_bootstrap_theme
- pip:
- --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple
- scikit-learn
Expand Down
Loading

0 comments on commit 4248521

Please sign in to comment.