Skip to content

Commit 8cbcf35

Browse files
authored
Merge pull request #45 from jGaboardi/modernize_infra
Modernize infrastructure
2 parents 7939ea9 + 593c7e6 commit 8cbcf35

File tree

151 files changed

+8372
-37993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+8372
-37993
lines changed

.github/CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributing Guidelines for `spglm`
2+
3+
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).
4+
5+
6+
## Style and format
7+
8+
This project utilizes:
9+
* [`black`](https://black.readthedocs.io/en/stable/) for formatting;
10+
* [`ruff`](https://docs.astral.sh/ruff/) for linting; and
11+
* [`pre-commit`](https://pre-commit.com) to check format and lint on commits prior to pull requests being made.

.github/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- dependabot
7+
categories:
8+
- title: Bug Fixes
9+
labels:
10+
- bug
11+
- title: Enhancements
12+
labels:
13+
- enhancement
14+
- title: Other Changes
15+
labels:
16+
- "*"

.github/workflows/build_docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build Docs
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: Manual Doc Build Reason
12+
default: test
13+
required: false
14+
jobs:
15+
docs:
16+
name: build & push docs
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 90
19+
strategy:
20+
matrix:
21+
os: ['ubuntu-latest']
22+
environment-file: [.ci/311.yaml]
23+
experimental: [false]
24+
defaults:
25+
run:
26+
shell: bash -l {0}
27+
28+
steps:
29+
- name: checkout repo
30+
uses: actions/checkout@v4
31+
32+
- name: setup micromamba
33+
uses: mamba-org/setup-micromamba@v1
34+
with:
35+
environment-file: ${{ matrix.environment-file }}
36+
micromamba-version: 'latest'
37+
38+
- name: Install package
39+
run: pip install .
40+
41+
- name: make docs
42+
run: cd docs; make html
43+
44+
- name: commit docs
45+
run: |
46+
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
47+
cp -r docs/_build/html/* gh-pages/
48+
cd gh-pages
49+
git config --local user.email "action@github.com"
50+
git config --local user.name "GitHub Action"
51+
git add .
52+
git commit -m "Update documentation" -a || true
53+
# The above command will fail if no changes were present,
54+
# so we ignore the return code.
55+
56+
- name: push to gh-pages
57+
uses: ad-m/github-push-action@master
58+
with:
59+
branch: gh-pages
60+
directory: gh-pages
61+
github_token: ${{ secrets.GITHUB_TOKEN }}
62+
force: true
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Package
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: Manual Release
12+
default: test
13+
required: false
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.x'
27+
28+
- name: Install Dependencies
29+
run: |
30+
python -m pip install --upgrade pip build twine
31+
python -m build
32+
twine check --strict dist/*
33+
34+
- name: Create Release Notes
35+
uses: actions/github-script@v6
36+
with:
37+
github-token: ${{secrets.GITHUB_TOKEN}}
38+
script: |
39+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
40+
tag_name: "${{ github.ref }}",
41+
generate_release_notes: true
42+
});
43+
44+
- name: Publish distribution 📦 to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
with:
47+
user: __token__
48+
password: ${{ secrets.PYPI_PASSWORD }}

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
files: "spglm\/"
2+
repos:
3+
- repo: https://github.com/psf/black
4+
rev: "23.9.1"
5+
hooks:
6+
- id: black
7+
language_version: python3
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: "v0.1.2"
10+
hooks:
11+
- id: ruff
12+
13+
ci:
14+
autofix_prs: false
15+
autoupdate_schedule: quarterly

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

LICENSE renamed to LICENSE.txt

File renamed without changes.

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

codecov.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
codecov:
2+
notify:
3+
after_n_builds: 5
4+
coverage:
5+
range: 50..95
6+
round: nearest
7+
precision: 1
8+
status:
9+
project:
10+
default:
11+
threshold: 2%
12+
patch:
13+
default:
14+
threshold: 2%
15+
target: 80%
16+
ignore:
17+
- "tests/*"
18+
comment:
19+
layout: "reach, diff, files"
20+
behavior: once
21+
after_n_builds: 5
22+
require_changes: true

docs/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20+
@rsync -r --exclude '.ipynb_checkpoints/' ../notebooks/ ./notebooks/
2021
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2122

23+
github:
24+
@make html
25+
26+
sync:
27+
@rsync -avh _build/html/ ../docs/ --delete
28+
@make clean
29+
touch .nojekyll
30+
2231
clean:
2332
rm -rf $(BUILDDIR)/*
2433
rm -rf auto_examples/
34+
rm -rf generated/

docs/_build/doctrees/api.doctree

-6.85 KB
Binary file not shown.
-1.57 MB
Binary file not shown.
Binary file not shown.

docs/_build/doctrees/index.doctree

-3.44 KB
Binary file not shown.
-9.61 KB
Binary file not shown.
-2.63 KB
Binary file not shown.

docs/_build/html/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)