-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modernize infrastructure #121
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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: | ||
- "*" |
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.yml] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why downgrade to |
||
experimental: [false] | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: setup micromamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
- uses: actions/checkout@v2 | ||
jGaboardi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- uses: actions/cache@v2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the need for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure actually |
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for not using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no... which package has the most current recipes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good question... seems to be a hodgepodge |
||
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/ | ||
|
@@ -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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be testing against |
||
os: macos-latest | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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("../")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not needed? It seems to still be needed in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. im not sure about this. I've had to remove it from tobler and segregation otherwise the docs build will fail There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm OK. |
||
|
||
# import your package to obtain the version info to display on the docs website | ||
import spreg | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,105 @@ | ||||||
[build-system] | ||||||
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"] | ||||||
build-backend = "setuptools.build_meta" | ||||||
|
||||||
[tool.setuptools_scm] | ||||||
|
||||||
[project] | ||||||
name = "spreg" | ||||||
dynamic = ["version"] | ||||||
authors = [ | ||||||
{ name = "Luc Anselin", email = "anselin@uchicago.edu" }, | ||||||
{ name = "Serge Rey", email = "sjsrey@gmail.com" }, | ||||||
{ name = "Pedo Amaral", email = "pedrovma@gmail.com" }, | ||||||
] | ||||||
maintainers = [{ name = "pysal contributors" }] | ||||||
license = { text = "BSD 3-Clause" } | ||||||
description = "PySAL Spatial Econometric Regression in Python" | ||||||
keywords = [ | ||||||
"spatial econometrics, regression, statistics, spatial modeling" | ||||||
] | ||||||
readme = { text = """\ | ||||||
Spatial Econometric Regression in Python" | ||||||
|
||||||
""", content-type = "text/x-rst" } | ||||||
classifiers = [ | ||||||
"Programming Language :: Python :: 3", | ||||||
"License :: OSI Approved :: BSD License", | ||||||
"Operating System :: OS Independent", | ||||||
"Intended Audience :: Science/Research", | ||||||
"Topic :: Scientific/Engineering :: GIS", | ||||||
] | ||||||
requires-python = ">=3.8" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
dependencies = [ | ||||||
"scipy>=0.11", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs (desires?) indent. |
||||||
"numpy>=1.3", | ||||||
"pandas", | ||||||
"libpysal>=4.0.0", | ||||||
"scikit-learn>=0.22", | ||||||
] | ||||||
|
||||||
[project.urls] | ||||||
Home = "https://github.com/pysal/spreg/" | ||||||
Repository = "https://github.com/pysal/spreg" | ||||||
|
||||||
[project.optional-dependencies] | ||||||
dev = ["pre-commit"] | ||||||
docs = [ | ||||||
"nbsphinx", | ||||||
"numpydoc", | ||||||
"pandoc", | ||||||
"sphinx", | ||||||
"sphinxcontrib-bibtex", | ||||||
"sphinx_bootstrap_theme", | ||||||
"mkdocs-jupyter", | ||||||
"myst-parser" | ||||||
] | ||||||
tests = [ | ||||||
"codecov", | ||||||
"coverage", | ||||||
"pytest", | ||||||
"pytest-mpl", | ||||||
"pytest-cov", | ||||||
"watermark", | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
] | ||||||
|
||||||
[tool.setuptools.packages.find] | ||||||
include = ["spreg", "spreg.*"] | ||||||
|
||||||
[tool.black] | ||||||
line-length = 88 | ||||||
|
||||||
[tool.ruff] | ||||||
line-length = 88 | ||||||
select = ["E", "F", "W", "I", "UP", "N", "B", "A", "C4", "SIM", "ARG"] | ||||||
target-version = "py39" | ||||||
ignore = [ | ||||||
"B006", | ||||||
"B008", | ||||||
"B009", | ||||||
"B010", | ||||||
"C408", | ||||||
"E731", | ||||||
"F401", | ||||||
"F403", | ||||||
"N803", | ||||||
"N806", | ||||||
"N999", | ||||||
"UP007" | ||||||
] | ||||||
exclude = ["spreg/tests/*", "docs/*"] | ||||||
|
||||||
[tool.coverage.run] | ||||||
source = ["./spreg"] | ||||||
|
||||||
[tool.coverage.report] | ||||||
exclude_lines = [ | ||||||
"if self.debug:", | ||||||
"pragma: no cover", | ||||||
"raise NotImplementedError", | ||||||
"except ModuleNotFoundError:", | ||||||
"except ImportError", | ||||||
] | ||||||
ignore_errors = true | ||||||
omit = ["spreg/tests/*", "docs/conf.py"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still have a
master
here?