pax_global_header 0000666 0000000 0000000 00000000064 14635030442 0014513 g ustar 00root root 0000000 0000000 52 comment=030538d0bacb0de81776d90171179e31f29ed825 spopt-0.6.1/ 0000775 0000000 0000000 00000000000 14635030442 0012664 5 ustar 00root root 0000000 0000000 spopt-0.6.1/.gitattributes 0000664 0000000 0000000 00000000041 14635030442 0015552 0 ustar 00root root 0000000 0000000 *.ipynb linguist-language=Python spopt-0.6.1/.github/ 0000775 0000000 0000000 00000000000 14635030442 0014224 5 ustar 00root root 0000000 0000000 spopt-0.6.1/.github/CONTRIBUTING.md 0000664 0000000 0000000 00000001732 14635030442 0016460 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.6.1/.github/dependabot.yml 0000664 0000000 0000000 00000001164 14635030442 0017056 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.6.1/.github/release.yml 0000664 0000000 0000000 00000000725 14635030442 0016373 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.6.1/.github/workflows/ 0000775 0000000 0000000 00000000000 14635030442 0016261 5 ustar 00root root 0000000 0000000 spopt-0.6.1/.github/workflows/build_docs.yml 0000664 0000000 0000000 00000003652 14635030442 0021121 0 ustar 00root root 0000000 0000000 name: Build Docs on: push: # Sequence of patterns matched against refs/tags tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 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/312-latest.yaml] experimental: [false] defaults: run: shell: bash -l {0} steps: - name: checkout repo uses: actions/checkout@v4 with: fetch-depth: 0 # Fetch all history for all branches and tags. - name: setup micromamba uses: mamba-org/setup-micromamba@v1 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: commit docs run: | git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages cp -r docs/_build/html/* gh-pages/ cd gh-pages git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add . git commit -m "Update documentation" -a || true # The above command will fail if no changes were present, # so we ignore the return code. - name: push to gh-pages uses: ad-m/github-push-action@master with: branch: gh-pages directory: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} force: true spopt-0.6.1/.github/workflows/release_and_publish.yml 0000664 0000000 0000000 00000002454 14635030442 0023001 0 ustar 00root root 0000000 0000000 name: Release Package on: push: # Sequence of patterns matched against refs/tags tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 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 # Fetch all history for all branches and tags. - 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.6.1/.github/workflows/testing.yml 0000664 0000000 0000000 00000004312 14635030442 0020461 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/310-oldest.yaml, ci/310-latest.yaml, ci/311-latest.yaml, ci/312-latest.yaml, ci/312-dev.yaml, ] include: - environment-file: ci/312-latest.yaml os: macos-latest - environment-file: ci/312-latest.yaml os: macos-14 # Apple Silicon - environment-file: ci/312-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 # Fetch all history for all branches and tags. - name: setup micromamba uses: mamba-org/setup-micromamba@v1 with: environment-file: ${{ matrix.environment-file }} micromamba-version: 'latest' ############################################################################## #- name: install pulp via pip # run: | # pip install pulp # pulptest ############################################################################## - name: environment info run: | micromamba info micromamba list - name: spatial versions run: 'python -c "import geopandas; geopandas.show_versions();"' - 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@v4 spopt-0.6.1/.gitignore 0000664 0000000 0000000 00000000410 14635030442 0014647 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.6.1/.pre-commit-config.yaml 0000664 0000000 0000000 00000000320 14635030442 0017140 0 ustar 00root root 0000000 0000000 files: "spopt\/" repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.4.2" hooks: - id: ruff - id: ruff-format ci: autofix_prs: false autoupdate_schedule: quarterly spopt-0.6.1/LICENSE.txt 0000664 0000000 0000000 00000002721 14635030442 0014511 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.6.1/README.md 0000664 0000000 0000000 00000020714 14635030442 0014147 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.6.1/ci/ 0000775 0000000 0000000 00000000000 14635030442 0013257 5 ustar 00root root 0000000 0000000 spopt-0.6.1/ci/310-latest.yaml 0000664 0000000 0000000 00000000525 14635030442 0015742 0 ustar 00root root 0000000 0000000 name: test
channels:
- conda-forge
dependencies:
- python=3.10
- geopandas
- libpysal
- mapclassify
- networkx
- numpy
- pandas
- scikit-learn
- scipy
- shapely
- spaghetti
- tqdm
- pointpats
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp
spopt-0.6.1/ci/310-oldest.yaml 0000664 0000000 0000000 00000000621 14635030442 0015735 0 ustar 00root root 0000000 0000000 name: test
channels:
- conda-forge
dependencies:
- python=3.10
- geopandas=0.12
- libpysal=4.6
- mapclassify=2.5
- networkx=2.7
- numpy=1.22
- pandas=1.4
- scikit-learn=1.1
- scipy=1.8
- shapely=2.0.1
- spaghetti=1.6.4
- tqdm=4.63
- pointpats=2.3
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp==2.7
spopt-0.6.1/ci/311-latest.yaml 0000664 0000000 0000000 00000000512 14635030442 0015737 0 ustar 00root root 0000000 0000000 name: test
channels:
- conda-forge
dependencies:
- python=3.11
- geopandas
- libpysal
- mapclassify
- networkx
- numpy
- pandas
- scikit-learn
- scipy
- spaghetti
- tqdm
- pointpats
# testing
- codecov
- coverage
- pytest
- pytest-cov
- pytest-xdist
# with pip
- pip
- pip:
- pulp
spopt-0.6.1/ci/312-dev.yaml 0000664 0000000 0000000 00000001564 14635030442 0015232 0 ustar 00root root 0000000 0000000 name: test
channels:
- conda-forge
dependencies:
- python=3.12
- folium # for geopandas.explore()
- geos # for shapely
- matplotlib # for geopandas.explore()
- 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
- numpy
- pandas
- pulp
- scikit-learn
- scipy
- 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/networkx/networkx.git
- git+https://github.com/pysal/pointpats.git
- git+https://github.com/shapely/shapely.git
- git+https://github.com/pysal/spaghetti.git
spopt-0.6.1/ci/312-latest.yaml 0000664 0000000 0000000 00000000674 14635030442 0015751 0 ustar 00root root 0000000 0000000 name: test
channels:
- conda-forge
dependencies:
- python=3.12
- geopandas
- libpysal
- mapclassify
- networkx
- numpy
- pandas
- scikit-learn
- scipy
- spaghetti
- tqdm
- pointpats
# 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.6.1/codecov.yml 0000664 0000000 0000000 00000000543 14635030442 0015033 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.6.1/docs/ 0000775 0000000 0000000 00000000000 14635030442 0013614 5 ustar 00root root 0000000 0000000 spopt-0.6.1/docs/Makefile 0000664 0000000 0000000 00000001353 14635030442 0015256 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 = spopt
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.6.1/docs/_static/ 0000775 0000000 0000000 00000000000 14635030442 0015242 5 ustar 00root root 0000000 0000000 spopt-0.6.1/docs/_static/images/ 0000775 0000000 0000000 00000000000 14635030442 0016507 5 ustar 00root root 0000000 0000000 spopt-0.6.1/docs/_static/images/lscpb-predef.png 0000664 0000000 0000000 00002606722 14635030442 0021602 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