Skip to content

Commit f158d6f

Browse files
authored
Merge pull request #413 from jGaboardi/update_unittests
Update unittests, etc
2 parents 289c9ee + 947125d commit f158d6f

File tree

6 files changed

+89
-93
lines changed

6 files changed

+89
-93
lines changed

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
strategy:
2121
matrix:
2222
os: ['ubuntu-latest']
23-
environment-file: [ci/38.yaml]
23+
environment-file: [ci/39.yaml]
2424
experimental: [false]
2525
defaults:
2626
run:

.github/workflows/release_and_publish.yml

Lines changed: 48 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,66 +7,59 @@
77
# under the user's name, not the organzation.
88

99
#--------------------------------------------------
10-
name: release_and_publish
11-
10+
name: Release & Publish
11+
1212
on:
1313
push:
1414
# Sequence of patterns matched against refs/tags
1515
tags:
16-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
17-
16+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
17+
1818
jobs:
1919
build:
20+
name: Create release & publish to PyPI
2021
runs-on: ubuntu-latest
2122
steps:
22-
- uses: actions/checkout@v2
23-
- name: Set up Python
24-
uses: actions/setup-python@v2
25-
with:
26-
python-version: '3.x'
27-
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip
30-
pip install setuptools wheel twine jupyter urllib3 pandas pyyaml
31-
python setup.py sdist bdist_wheel
32-
- name: Run Changelog
33-
run: |
34-
jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb
35-
- name: Cat Changelog
36-
uses: pCYSl5EDgo/cat@master
37-
id: changetxt
38-
with:
39-
path: ./tools/changelog.md
40-
env:
41-
TEXT: ${{ steps.changetxt.outputs.text }}
42-
- name: Create Release
43-
id: create_release
44-
uses: actions/create-release@v1
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # token is provided by GHA, DO NOT create
47-
with:
48-
tag_name: ${{ github.ref }}
49-
release_name: Release ${{ github.ref }}
50-
body: ${{ steps.changetxt.outputs.text }}
51-
draft: false
52-
prerelease: false
53-
- name: Get Asset name
54-
run: |
55-
export PKG=$(ls dist/)
56-
set -- $PKG
57-
echo "name=$1" >> $GITHUB_ENV
58-
- name: Upload Release Asset
59-
id: upload-release-asset
60-
uses: actions/upload-release-asset@v1
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63-
with:
64-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
65-
asset_path: dist/${{ env.name }}
66-
asset_name: ${{ env.name }}
67-
asset_content_type: application/zip
68-
- name: Publish distribution 📦 to PyPI
69-
uses: pypa/gh-action-pypi-publish@master
70-
with:
71-
user: __token__
72-
password: ${{ secrets.PYPI_PASSWORD }}
23+
- name: Checkout repo
24+
uses: actions/checkout@v2
25+
26+
- name: Set up python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: "3.x"
30+
31+
- name: Install Dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install setuptools wheel twine jupyter urllib3 pandas pyyaml
35+
python setup.py sdist bdist_wheel
36+
37+
- name: run Changelog
38+
run: |
39+
jupyter nbconvert --to notebook --execute --inplace --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python3 tools/gitcount.ipynb
40+
41+
- name: cat Changelog
42+
uses: pCYSl5EDgo/cat@master
43+
id: changetxt
44+
with:
45+
path: ./tools/changelog.md
46+
env:
47+
TEXT: ${{ steps.changetxt.outputs.text }}
48+
49+
- name: Get the tag name
50+
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
51+
52+
- name: Release
53+
uses: softprops/action-gh-release@v1
54+
with:
55+
body: ${{ steps.changetxt.outputs.text }}
56+
body_path: ${{ steps.changetxt.outputs.path }}
57+
name: Release ${{ env.TAG }}
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- name: Publish distribution 📦 to PyPI
62+
uses: pypa/gh-action-pypi-publish@master
63+
with:
64+
user: __token__
65+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/unittests.yml

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,39 @@
1010

1111
jobs:
1212
unittests:
13-
name: conda (${{ matrix.os }}, ${{ matrix.environment-file }})
13+
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
1414
runs-on: ${{ matrix.os }}
15-
# timeout-minutes: 25
15+
#timeout-minutes: 25
1616
strategy:
1717
matrix:
1818
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
19-
environment-file: [ci/36.yaml, ci/37.yaml, ci/38.yaml]
20-
exclude:
21-
- environment-file: ci/36.yaml
22-
os: windows-latest
23-
defaults:
24-
run:
25-
shell: bash -l {0}
19+
environment-file: [ci/37.yaml, ci/38.yaml, ci/39.yaml]
20+
2621
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions/cache@v2
29-
env:
30-
CACHE_NUMBER: 0
31-
with:
32-
path: ~/conda_pkgs_dir
33-
key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }}
34-
- uses: conda-incubator/setup-miniconda@v2
22+
- name: checkout repo
23+
uses: actions/checkout@v2
24+
25+
- name: setup micromamba
26+
uses: mamba-org/provision-with-micromamba@main
3527
with:
36-
miniconda-version: 'latest'
37-
mamba-version: '*'
38-
channels: conda-forge
39-
channel-priority: true
40-
auto-update-conda: false
41-
auto-activate-base: false
42-
environment-file: ${{ matrix.environment-file }}
43-
activate-environment: test
44-
use-only-tar-bz2: true
45-
- run: mamba info --all
46-
- run: mamba list
47-
- run: conda config --show-sources
48-
- run: conda config --show
49-
- run: python -c 'import libpysal; libpysal.examples.fetch_all()'
50-
- run: py.test -v libpysal --cov=libpysal --cov-report=xml
51-
- name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }})
28+
environment-file: ${{ matrix.environment-file }}
29+
micromamba-version: 'latest'
30+
31+
- name: run tests - bash
32+
shell: bash -l {0}
33+
run: |
34+
python -c 'import libpysal; libpysal.examples.fetch_all()'
35+
pytest -v libpysal --cov=libpysal --cov-report=xml
36+
if: matrix.os != 'windows-latest'
37+
38+
- name: run tests - powershell
39+
shell: powershell
40+
run: |
41+
python -c 'import libpysal; libpysal.examples.fetch_all()'
42+
pytest -v libpysal --cov=libpysal --cov-report=xml
43+
if: matrix.os == 'windows-latest'
44+
45+
- name: ${{ matrix.os }}, ${{ matrix.environment-file }}
5246
uses: codecov/codecov-action@v1
5347
with:
5448
token: ${{ secrets.CODECOV_TOKEN }}

ci/36.yaml renamed to ci/39.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: test
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.6
5+
- python=3.9
66
- beautifulsoup4
77
- jinja2
88
- pandas>=1.0
@@ -16,4 +16,13 @@ dependencies:
1616
# optional
1717
- geopandas>=0.7.0
1818
- numba
19+
- xarray
20+
- joblib
1921
- zstd
22+
# for docs build action (this env only)
23+
- nbsphinx
24+
- numpydoc
25+
- sphinx>=1.4.3
26+
- sphinxcontrib-bibtex<2.0.0
27+
- sphinx_bootstrap_theme
28+

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273

274274

275275
def setup(app):
276-
app.add_stylesheet("pysal-styles.css")
276+
app.add_css_file("pysal-styles.css")
277277

278278

279279
# Example configuration for intersphinx: refer to the Python standard library.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def setup_package():
8787
"Topic :: Scientific/Engineering :: GIS",
8888
"License :: OSI Approved :: BSD License",
8989
"Programming Language :: Python",
90-
"Programming Language :: Python :: 3.6",
9190
"Programming Language :: Python :: 3.7",
9291
"Programming Language :: Python :: 3.8",
92+
"Programming Language :: Python :: 3.9",
9393
],
9494
package_data={"libpysal": list(example_data_files)},
9595
install_requires=install_reqs,
9696
extras_require=extras_reqs,
9797
cmdclass={"build_py": build_py},
98-
python_requires=">3.5",
98+
python_requires=">=3.7",
9999
)
100100

101101

0 commit comments

Comments
 (0)