pax_global_header 0000666 0000000 0000000 00000000064 15035177621 0014521 g ustar 00root root 0000000 0000000 52 comment=27a29e112fef7998cff4956cc92edb3b26a53eb9 spopt-0.7.0/ 0000775 0000000 0000000 00000000000 15035177621 0012672 5 ustar 00root root 0000000 0000000 spopt-0.7.0/.gitattributes 0000664 0000000 0000000 00000000041 15035177621 0015560 0 ustar 00root root 0000000 0000000 *.ipynb linguist-language=Python spopt-0.7.0/.github/ 0000775 0000000 0000000 00000000000 15035177621 0014232 5 ustar 00root root 0000000 0000000 spopt-0.7.0/.github/CONTRIBUTING.md 0000664 0000000 0000000 00000001732 15035177621 0016466 0 ustar 00root root 0000000 0000000 # Contributing Guidelines for `spopt` Thank you for your interest in contributing! We work primarily on Github. Please review the contributing procedures [here](http://pysal.org/getting_started#for-developers) and [here](https://github.com/pysal/pysal/wiki/GitHub-Standard-Operating-Procedures) so that we can accept your contributions! Alternatively, contact someone in the [development chat channel](https://gitter.im//pysal/pysal). ## Style and format 1. At the time of this writing, Python 3.10, 3.11, and 3.12 are the officially supported versions. 2. This project implements the linting and formatting conventions of [`ruff`](https://docs.astral.sh/ruff/) on all incoming Pull Requests. To ensure a PR is properly linted and formatted prior to creating a Pull Request, [install `pre-commit`](https://pre-commit.com/#installation) in your development environment and then [set up the configuration of pre-commit hooks](https://pre-commit.com/#3-install-the-git-hook-scripts). spopt-0.7.0/.github/dependabot.yml 0000664 0000000 0000000 00000001164 15035177621 0017064 0 ustar 00root root 0000000 0000000 # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" reviewers: - "jGaboardi" - "xf37" - package-ecosystem: "pip" directory: "/" schedule: interval: "daily" reviewers: - "jGaboardi" - "xf37" spopt-0.7.0/.github/release.yml 0000664 0000000 0000000 00000000725 15035177621 0016401 0 ustar 00root root 0000000 0000000 changelog: exclude: labels: - ignore-for-release authors: - dependabot categories: - title: Bug Fixes labels: - bug - title: Enhancements labels: - enhancement - title: Regionalization labels: - region - title: Facility Location labels: - locate - title: Transportation & Routing labels: - transport - title: Other Changes labels: - "*" spopt-0.7.0/.github/workflows/ 0000775 0000000 0000000 00000000000 15035177621 0016267 5 ustar 00root root 0000000 0000000 spopt-0.7.0/.github/workflows/build_docs.yml 0000664 0000000 0000000 00000002263 15035177621 0021124 0 ustar 00root root 0000000 0000000 --- name: Build Docs on: push: tags: - v* workflow_dispatch: inputs: version: description: Manual Doc Build Reason default: test required: false jobs: docs: name: build & push docs runs-on: ${{ matrix.os }} timeout-minutes: 90 strategy: matrix: os: - ubuntu-latest environment-file: - ci/py313_spopt-latest.yaml experimental: - false defaults: run: shell: bash -l {0} steps: - name: checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 - name: setup micromamba uses: mamba-org/setup-micromamba@v2 with: environment-file: ${{ matrix.environment-file }} micromamba-version: latest - name: install pulp via pip run: pip install pulp - name: install package run: pip install . - name: make docs run: cd docs; make html - name: Publish to Github Pages uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/build/html/ keep_files: false spopt-0.7.0/.github/workflows/release_and_publish.yml 0000664 0000000 0000000 00000002267 15035177621 0023011 0 ustar 00root root 0000000 0000000 --- name: Release Package on: push: tags: - v* workflow_dispatch: inputs: version: description: Manual Release default: test required: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.x - name: Install Dependencies run: | python -m pip install --upgrade pip python -m pip install --upgrade build twine python -m build twine check --strict dist/* - name: Create Release Notes uses: actions/github-script@v7 with: github-token: ${{secrets.GITHUB_TOKEN}} script: > await github.request(`POST /repos/${{ github.repository }}/releases`, { tag_name: "${{ github.ref }}", generate_release_notes: true }); - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} spopt-0.7.0/.github/workflows/testing.yml 0000664 0000000 0000000 00000003720 15035177621 0020471 0 ustar 00root root 0000000 0000000 --- name: Continuous Integration on: push: branches: - "*" pull_request: branches: - "*" schedule: - cron: 59 23 * * * workflow_dispatch: inputs: version: description: Manual CI Run default: test required: false jobs: tests: name: ${{ matrix.os }}, ${{ matrix.environment-file }} runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: matrix: os: - ubuntu-latest environment-file: - ci/py311_spopt-oldest.yaml - ci/py311_spopt-latest.yaml - ci/py312_spopt-latest.yaml - ci/py313_spopt-latest.yaml - ci/py313_spopt-dev.yaml include: - environment-file: ci/py313_spopt-latest.yaml os: macos-13 - environment-file: ci/py313_spopt-latest.yaml os: macos-14 - environment-file: ci/py313_spopt-latest.yaml os: windows-latest fail-fast: false defaults: run: shell: bash -l {0} steps: - name: checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 - name: setup micromamba uses: mamba-org/setup-micromamba@v2 with: environment-file: ${{ matrix.environment-file }} micromamba-version: latest - name: environment info run: | micromamba info micromamba list - name: spatial versions run: python -c "import geopandas; geopandas.show_versions();" - name: Download test files run: | python -c ' import libpysal libpysal.examples.fetch_all() ' - name: run tests run: | pytest spopt \ -v \ -r a \ -n logical \ --color yes \ --cov spopt \ --cov-append \ --cov-report term-missing \ --cov-report xml . - name: codecov uses: codecov/codecov-action@v5 spopt-0.7.0/.gitignore 0000664 0000000 0000000 00000000410 15035177621 0014655 0 ustar 00root root 0000000 0000000 *.swp *.pyc .rope* .idea/ notebooks/.ipynb_checkpoints/ .DS_Store .ipynb_checkpoints/ *.bak .eggs/ *.egg-info/ # Packages *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg lib lib64 __pycache__ .coverage .ruff_cache .pytest_cache spopt-0.7.0/.pre-commit-config.yaml 0000664 0000000 0000000 00000000343 15035177621 0017153 0 ustar 00root root 0000000 0000000 files: "spopt\/|notebooks\/" repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.12.2" hooks: - id: ruff-check - id: ruff-format ci: autofix_prs: false autoupdate_schedule: quarterly spopt-0.7.0/LICENSE.txt 0000664 0000000 0000000 00000002721 15035177621 0014517 0 ustar 00root root 0000000 0000000 BSD 3-Clause License Copyright 2018 pysal-spopt developers Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. spopt-0.7.0/README.md 0000664 0000000 0000000 00000020714 15035177621 0014155 0 ustar 00root root 0000000 0000000
](https://www.nsf.gov/index.jsp) National Science Foundation Award #1831615: [RIDIR: Scalable Geospatial Analytics for Social Science Research](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1831615)
spopt-0.7.0/ci/ 0000775 0000000 0000000 00000000000 15035177621 0013265 5 ustar 00root root 0000000 0000000 spopt-0.7.0/ci/py311_spopt-latest.yaml 0000664 0000000 0000000 00000000624 15035177621 0017547 0 ustar 00root root 0000000 0000000 name: py311_spopt-latest
channels:
- conda-forge
dependencies:
- python=3.11
- fast_hdbscan # for sa3
- geopandas
- libpysal
- mapclassify
- networkx
- numba # for sa3
- numpy
- pandas
- pointpats
- scikit-learn
- scipy
- shapely
- spaghetti
- tqdm
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp
spopt-0.7.0/ci/py311_spopt-oldest.yaml 0000664 0000000 0000000 00000001010 15035177621 0017533 0 ustar 00root root 0000000 0000000 name: py311_spopt-oldest
channels:
- conda-forge
dependencies:
- python=3.11
- fast_hdbscan=0.2.2 # for sa3
- fiona<1.10 # see gh#492
- geopandas=0.14.0
- libpysal=4.10.0
- mapclassify=2.7.0
- networkx=3.2
- numba # for sa3
- numpy=1.26.0
- pandas=2.1.0
- pointpats=2.4.0
- scikit-learn=1.4.0
- scipy=1.12.0
- shapely=2.1.0
- spaghetti=1.7.4
- tqdm=4.66.0
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp==2.8
spopt-0.7.0/ci/py312_spopt-latest.yaml 0000664 0000000 0000000 00000000625 15035177621 0017551 0 ustar 00root root 0000000 0000000 name: py3112_spopt-latest
channels:
- conda-forge
dependencies:
- python=3.12
- fast_hdbscan # for sa3
- geopandas
- libpysal
- mapclassify
- networkx
- numba # for sa3
- numpy
- pandas
- pointpats
- scikit-learn
- scipy
- shapely
- spaghetti
- tqdm
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp
spopt-0.7.0/ci/py313_spopt-dev.yaml 0000664 0000000 0000000 00000001524 15035177621 0017033 0 ustar 00root root 0000000 0000000 name: py313_spopt-dev
channels:
- conda-forge
dependencies:
- python=3.13
- fast_hdbscan # for sa3
- folium # for geopandas.explore()
- matplotlib # for geopandas.explore()
- numba # for sa3
- tqdm
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
# dev versions of packages
- --pre \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--extra-index-url https://pypi.org/simple
- networkx
- numpy
- pandas
- pulp
- scikit-learn
- scipy
- shapely
- git+https://github.com/geopandas/geopandas.git
- git+https://github.com/pysal/libpysal.git
- git+https://github.com/pysal/mapclassify.git
- git+https://github.com/pysal/pointpats.git
- git+https://github.com/pysal/spaghetti.git
spopt-0.7.0/ci/py313_spopt-latest.yaml 0000664 0000000 0000000 00000001010 15035177621 0017537 0 ustar 00root root 0000000 0000000 name: py313_spopt-latest
channels:
- conda-forge
dependencies:
- python=3.13
- fast_hdbscan # for sa3
- geopandas
- libpysal
- mapclassify
- networkx
- numba # for sa3
- numpy
- pandas
- pointpats
- scikit-learn
- scipy
- shapely
- spaghetti
- tqdm
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# docs - only this env
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
# with pip
- pip
- pip:
- pulp
spopt-0.7.0/codecov.yml 0000664 0000000 0000000 00000000543 15035177621 0015041 0 ustar 00root root 0000000 0000000 codecov:
notify:
after_n_builds: 5
coverage:
range: 50..95
round: nearest
precision: 1
status:
project:
default:
threshold: 5%
patch:
default:
threshold: 20%
target: 60%
ignore:
- "tests/*"
comment:
layout: "reach, diff, files"
behavior: once
after_n_builds: 5
require_changes: true
spopt-0.7.0/docs/ 0000775 0000000 0000000 00000000000 15035177621 0013622 5 ustar 00root root 0000000 0000000 spopt-0.7.0/docs/Makefile 0000664 0000000 0000000 00000001361 15035177621 0015263 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = PACKAGE_NAME
SOURCEDIR = .
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@rsync -r --exclude '.ipynb_checkpoints/' ../notebooks/ ./notebooks/
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
github:
@make html
clean:
rm -rf $(BUILDDIR)/*
rm -rf auto_examples/
spopt-0.7.0/docs/_static/ 0000775 0000000 0000000 00000000000 15035177621 0015250 5 ustar 00root root 0000000 0000000 spopt-0.7.0/docs/_static/images/ 0000775 0000000 0000000 00000000000 15035177621 0016515 5 ustar 00root root 0000000 0000000 spopt-0.7.0/docs/_static/images/lscpb-predef.png 0000664 0000000 0000000 00002606722 15035177621 0021610 0 ustar 00root root 0000000 0000000 PNG
IHDR ^ $ c
iCCPICC Profile HT7ZBzH .l$@(!Y\EDEWE\"kAD-
dQQV`C!;&g|dܹ(p4XtQ$ד=$'T)fDfC/&m\E p?ID_Ē, P{,$w L "|wyd
b" \I dgd