Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 51 additions & 65 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,51 @@
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
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

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: 'latest'

- name: reinstall for version
run: |
pip install -e . --no-deps --force-reinstall

- 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 "[email protected]"
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
---
name: Build Docs
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
version:
description: Manual Doc Build
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_giddy-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: reinstall for version
run: |
pip install -e . --no-deps --force-reinstall
- 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
60 changes: 29 additions & 31 deletions .github/workflows/release_and_publish.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
---
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
- v*
workflow_dispatch:
inputs:
version:
description: Manual Release
default: test
required: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Build source and wheel distributions
run: |
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 }}
- 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: Build source and wheel distributions
run: |
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 }}
47 changes: 21 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
---
name: Continuous Integration

on:
push:
branches:
- '*'
- "*"
pull_request:
branches:
- '*'
- "*"
schedule:
- cron: '59 23 * * *'
- cron: 59 23 * * *
workflow_dispatch:
inputs:
version:
description: Manual Unittest Run
default: test
required: false

jobs:
unittests:
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
Expand All @@ -26,43 +25,41 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
os: [ubuntu-latest]
os:
- ubuntu-latest
environment-file:
- ci/311-oldest.yaml
- ci/311-latest.yaml
- ci/312-latest.yaml
- ci/313-latest.yaml
- ci/313-dev.yaml
- ci/py311_giddy-oldest.yaml
- ci/py311_giddy-latest.yaml
- ci/py312_giddy-latest.yaml
- ci/py313_giddy-latest.yaml
- ci/py313_giddy-dev.yaml
include:
- environment-file: ci/313-latest.yaml
os: macos-13 # Intel
- environment-file: ci/313-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/313-latest.yaml
- environment-file: ci/py313_giddy-latest.yaml
os: macos-13
- environment-file: ci/py313_giddy-latest.yaml
os: macos-14
- environment-file: ci/py313_giddy-latest.yaml
os: windows-latest
fail-fast: false

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'

micromamba-version: latest
- name: environment info
shell: bash -l {0}
run: |
micromamba info
micromamba list

- name: spatial versions (if geopandas is installed)
shell: bash -l {0}
run: 'python -c "import geopandas; geopandas.show_versions();"'
run: python -c "import geopandas; geopandas.show_versions();"
if: contains(matrix.environment-file, 'dev')

- name: run pytest
run: |
pytest \
Expand All @@ -75,9 +72,8 @@ jobs:
--cov-append \
--cov-report xml \
--cov-report term-missing

- name: run docstring tests
if: contains(matrix.environment-file, '313-dev') && contains(matrix.os, 'ubuntu')
if: contains(matrix.environment-file, 'dev') && contains(matrix.os, 'ubuntu')
run: |
pytest \
giddy \
Expand All @@ -91,7 +87,6 @@ jobs:
--cov-report term-missing \
--doctest-only \
--doctest-continue-on-failure

- name: codecov
uses: codecov/codecov-action@v5
with:
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ pip install git+https://github.com/pysal/giddy

#### Requirements

- scipy>=1.8
- libpysal>=4.8
- mapclassify>=2.5
- esda>=2.4
- quantecon>=0.7
*see currently supported versions in [`pyproject.toml[dependencies]`](https://github.com/pysal/giddy/blob/main/pyproject.toml)*

- scipy
- libpysal
- mapclassify
- esda
- quantecon

Contribute
--------------
Expand Down
2 changes: 1 addition & 1 deletion ci/311-latest.yaml → ci/py311_giddy-latest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: py311-giddy-latest
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion ci/311-oldest.yaml → ci/py311_giddy-oldest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: py311-giddy-oldest
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion ci/312-latest.yaml → ci/py312_giddy-latest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: py312-giddy-latest
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion ci/313-dev.yaml → ci/py313_giddy-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: py313-giddy-dev
channels:
- conda-forge
dependencies:
Expand Down
10 changes: 9 additions & 1 deletion ci/313-latest.yaml → ci/py313_giddy-latest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: py313-giddy-latest
channels:
- conda-forge
dependencies:
Expand All @@ -17,3 +17,11 @@ dependencies:
- pytest
- pytest-cov
- pytest-xdist
# docs (this env only)
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinxcontrib-napoleon
- sphinx-gallery
- sphinx_bootstrap_theme
6 changes: 3 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = giddy
SPHINXPROJ = PACKAGE_NAME
SOURCEDIR = .
BUILDDIR = _build
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -24,7 +24,7 @@ github:
@make html

sync:
@rsync -avh _build/html/ ../docs/ --delete
@rsync -avh build/html/ ../docs/ --delete
@make clean
touch .nojekyll

Expand Down
Loading
Loading