Skip to content

Commit

Permalink
merge upstream/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jGaboardi committed Oct 7, 2023
2 parents 8a5a8a1 + c0ead26 commit 9644f56
Show file tree
Hide file tree
Showing 53 changed files with 4,493 additions and 47,959 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

16 changes: 16 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Bug Fixes
labels:
- bug
- title: Enhancements
labels:
- enhancement
- title: Other Changes
labels:
- "*"
63 changes: 33 additions & 30 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
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
branches:
- master
- main
jobs:
docs:
name: build & push docs
name: CI (${{ matrix.os }}-${{ matrix.environment-file }})
runs-on: ${{ matrix.os }}
timeout-minutes: 90
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 20
strategy:
matrix:
os: ['ubuntu-latest']
environment-file: [ci/310.yaml]
environment-file: [ci/39.yaml]
experimental: [false]
defaults:
run:
shell: bash -l {0}

steps:
- name: checkout repo
uses: actions/checkout@v3

- name: setup micromamba
uses: mamba-org/provision-with-micromamba@main
- uses: actions/checkout@v4
- uses: actions/cache@v3
env:
CACHE_NUMBER: 0
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: 'latest'

- name: make docs
run: cd docs; make html

- name: commit docs
path: ~/conda_pkgs_dir
key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: 'latest'
channels: conda-forge
channel-priority: true
auto-update-conda: true
auto-activate-base: false
environment-file: ${{ matrix.environment-file }}
activate-environment: test
use-only-tar-bz2: true
- run: conda info --all
- run: conda list
- run: conda config --show-sources
- run: conda config --show
- run: pip install -e . --no-deps --force-reinstall
- run: cd docs; make html
- name: Commit documentation changes
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/
Expand All @@ -47,10 +51,9 @@
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
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
Expand Down
103 changes: 48 additions & 55 deletions .github/workflows/release_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,52 @@
# under the user's name, not the organzation.

#--------------------------------------------------
name: Release & Publish
name: Release & Publish

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: Create release & publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine jupyter urllib3 pandas pyyaml versioneer
python setup.py sdist bdist_wheel
- name: run Changelog
run: |
jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb
- name: cat Changelog
uses: pCYSl5EDgo/cat@master
id: changetxt
with:
path: ./tools/changelog.md
env:
TEXT: ${{ steps.changetxt.outputs.text }}

- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changetxt.outputs.text }}
body_path: ${{ steps.changetxt.outputs.path }}
name: Release ${{ env.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
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:
name: Create release & publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- 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@v6
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 }}
6 changes: 3 additions & 3 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
matrix:
os: [ubuntu-latest]
environment-file:
- ci/38.yaml
- ci/39.yaml
- ci/310.yaml
- ci/310-BASE.yaml
- ci/310-DEV.yaml
- ci/311.yaml
include:
- environment-file: ci/310.yaml
os: macos-latest
Expand All @@ -34,7 +34,7 @@

steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup micromamba
uses: mamba-org/provision-with-micromamba@main
Expand All @@ -44,7 +44,7 @@

- name: install bleeding edge libpysal (only Ubuntu / Python 3.9)
shell: bash -l {0}
run: pip install git+https://github.com/pysal/libpysal.git@master
run: pip install git+https://github.com/pysal/libpysal.git@main
if: matrix.os == 'ubuntu-latest' && contains(matrix.environment-file, 'DEV')

- name: run tests - bash
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion ci/38.yaml → ci/311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.11
# required
- libpysal
- numpy>=1.3
Expand Down
22 changes: 11 additions & 11 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Regimes models are variants of spatial regression models which allow for structu
:toctree: generated/

spreg.OLS_Regimes
spreg.TSLS_Regimes
spreg.ML_Lag_Regimes
spreg.ML_Error_Regimes
spreg.GM_Lag_Regimes
Expand All @@ -59,6 +60,7 @@ Regimes models are variants of spatial regression models which allow for structu
spreg.GM_Endog_Error_Regimes
spreg.GM_Endog_Error_Hom_Regimes
spreg.GM_Endog_Error_Het_Regimes
spreg.Skater_reg

Seemingly-Unrelated Regressions
--------------------------------
Expand All @@ -74,17 +76,6 @@ Seemingly-unrelated regression models are a generalization of linear regression.
spreg.SURlagIV
spreg.ThreeSLS

Panel Models
------------

.. autosummary::
:toctree: generated/

spreg.Panel_FE_Lag
spreg.Panel_FE_Error
spreg.Panel_RE_Lag
spreg.Panel_RE_Error

Spatial Panel Models
--------------------

Expand All @@ -93,6 +84,10 @@ Spatial panel models allow for evaluating correlation in both spatial and time d
.. autosummary::
:toctree: generated/

spreg.Panel_FE_Lag
spreg.Panel_FE_Error
spreg.Panel_RE_Lag
spreg.Panel_RE_Error
spreg.GM_KKP

Diagnostics
Expand Down Expand Up @@ -128,3 +123,8 @@ Diagnostic tests are useful for identifying model fit, sufficiency, and specific
spreg.surLMe
spreg.surLMlag
spreg.constant_check
spreg.panel_LMlag
spreg.panel_LMerror
spreg.panel_rLMlag
spreg.panel_rLMerror
spreg.panel_Hausman
4 changes: 0 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import sys, os
import sphinx_bootstrap_theme


sys.path.insert(0, os.path.abspath("../"))

# import your package to obtain the version info to display on the docs website
import spreg

Expand Down
6 changes: 6 additions & 0 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ Tutorials
:caption: Spatial Panel Models with Fixed Effects

notebooks/Panel_FE_example.ipynb

.. toctree::
:maxdepth: 1
:caption: Skater_reg: Endogenous Spatial Regimes

notebooks/skater_reg.ipynb
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: notebooks-environment
name: spreg
channels:
- conda-forge
dependencies:
- python=3.10
- python>=3.10
- bokeh
- folium
- geojson
Expand Down
Loading

0 comments on commit 9644f56

Please sign in to comment.