Skip to content

Commit

Permalink
v0.6.1 (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
smmaurer authored Mar 19, 2021
1 parent f76cbe6 commit 5021e00
Show file tree
Hide file tree
Showing 26 changed files with 364 additions and 176 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build-wheels

# This workflow builds "wheels", which are the binary package installers hosted on PyPI.
# GitHub Actions is super helpful here because each one needs to be compiled in its own
# target environment. The wheel files are saved as artifacts, which you can download from
# the GitHub website. Wheels should be uploaded manually to PyPI -- see CONTRIBUTING.md.

# The Linux wheels cannot be generated using `ubuntu-latest` because they require a
# special Docker image to ensure cross-Linux compatibility. There are at least a couple
# of third-party actions set up using the official image; we could switch to another if
# this ever breaks.

on:
# push:
pull_request:
release:
workflow_dispatch:

jobs:

build-manylinux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# with:
# ref: 'v0.6' # enable to check out prior version of codebase
- name: Build wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'cython numpy'
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*-manylinux*.whl

build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0} # needed for conda persistence
strategy:
matrix:
os: [macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
# with:
# ref: 'v0.6' # enable to check out prior version of codebase
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up environment
run: |
conda config --append channels conda-forge
conda install cython numpy clang llvm-openmp
- name: Build wheel
run: |
python setup.py bdist_wheel
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*.whl
21 changes: 21 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code style

# This workflow runs code style checks.

on:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Check code style
run: |
pip install pycodestyle
pycodestyle pandana
35 changes: 35 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Coverage

# This workflow generates a coverage report (how much of the codebase is covered by the
# unit tests) and posts headline metrics to the PR thread.

on:
# push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Pandana
run: |
pip install .
pip install osmnet
- name: Generate coverage report
run: |
pip install 'pytest<4.0' 'pytest-cov<2.10' coverage
python setup.py test --pytest-args "--cov pandana --cov-report term-missing"
echo "coverage=$(coverage report | grep '^TOTAL' | grep -oE '[^ ]+$')" >> $GITHUB_ENV
- name: Post comment on PR
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: "Test coverage is ${{ env.coverage }}"
check_for_duplicate_msg: true
62 changes: 62 additions & 0 deletions .github/workflows/cross-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Cross-compatibility

# This workflow runs the Pandana unit tests across a comprehensive range of Python
# versions and operating systems. Windows needs conda in order to install geospatial
# dependencies.

on:
# push:
pull_request:
workflow_dispatch:

jobs:
build-pip:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Pandana
run: |
pip install .
pip install osmnet
- name: Run demo
run: |
python examples/simple_example.py
- name: Run unit tests
run: |
pip install 'pytest<4.0'
python setup.py test
build-conda:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0} # needed for conda persistence
strategy:
matrix:
os: [windows-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Pandana
run: |
pip install .
conda install osmnet --channel conda-forge
- name: Run demo
run: |
python examples/simple_example.py
- name: Run unit tests
run: |
pip install 'pytest<4.0'
python setup.py test
58 changes: 58 additions & 0 deletions .github/workflows/installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Installation

# This workflow installs Pandana from Pip and Conda across a range of Python versions and
# operating systems. You can run this manually after a new release is posted to confirm
# that it installs smoothly. This workflow also runs periodically in the background to
# catch dependency updates that break Pandana.

on:
# push:
# pull_request:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1' # every Monday at 3am UTC (Sunday evening Calif time)

jobs:
build-pip:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# Pip installation for Windows is not supported. Pip installation for Mac is
# broken in the GitHub Actions environment with Pandana v0.6 but should be fixed
# in the next Pandana release.
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Pandana
run: |
pip install pandana
- name: Run demo
run: |
python examples/simple_example.py
build-conda:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0} # needed for conda persistence
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Pandana
run: |
conda install pandana --channel conda-forge
- name: Run demo
run: |
python examples/simple_example.py
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit tests

# This workflow runs the Pandana unit tests in a single generic environment (recent but
# stable Python version on recent but stable Ubuntu). The cross-compatibility.yml
# workflow runs the same tests across multiple platforms.

on:
push:
# pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Pandana
run: |
pip install .
pip install osmnet
- name: Run unit tests
run: |
pip install 'pytest<4.0'
python setup.py test
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
v0.6.1
======

2021/03/17

* Adds support for non-x86 CPUs, including ARM-based Macs
* Removes accommodations for pre-C++11 compilers
* Formally ends support for Python 2.7

v0.6
====

Expand Down
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ You can contact Sam Maurer, the lead maintainer, at `[email protected]`.

- Check https://pypi.org/project/pandana/ for the new version

The binary package installers or "wheels" are built using a GitHub Actions workflow, because each one needs to be compiled in its own target environment. This should run automatically when a PR is opened, to confirm nothing is broken, and again when a release is tagged in GitHub. You can download the resulting wheel files from the Action status page and then upload them to PyPI using the same command as above.


## Distributing a release on Conda Forge (for conda installation):

- The [conda-forge/pandana-feedstock](https://github.com/conda-forge/pandana-feedstock) repository controls the Conda Forge release
- The [conda-forge/pandana-feedstock](https://github.com/conda-forge/pandana-feedstock) repository controls the Conda Forge release, including which GitHub users have maintainer status for the repo

- Conda Forge bots usually detect new releases on PyPI and set in motion the appropriate feedstock updates, which a current maintainer will need to approve and merge

- Maintainers can add on additional changes before merging the PR, for example to update the requirements or edit the list of maintainers

- You can also fork the feedstock and open a PR manually. It seems like this must be done from a personal account (not a group account like UDST) so that the bots can be granted permission for automated cleanup

- Check https://anaconda.org/conda-forge/pandana for the new version (may take a few minutes for it to appear)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Coverage Status](https://coveralls.io/repos/github/UDST/pandana/badge.svg?branch=master)](https://coveralls.io/github/UDST/pandana?branch=master)
![Coverage Status](https://img.shields.io/badge/coverage-90%25-green)

# Pandana

Expand All @@ -11,11 +11,12 @@ Documentation: http://udst.github.io/pandana

### Installation

Pandana runs on Mac, Linux, and Windows with Python 2.7, 3.6, 3.7, and 3.8.
As of March 2021, binary installers are provided for Mac, Linux, and Windows through both PyPI and Conda Forge.

The easiest way to install Pandana is using the [Anaconda](https://www.anaconda.com/distribution/) package manager. Pandana's Anaconda distributions are pre-compiled and include multi-threading support on all platforms.
- `pip install pandana`
- `conda install pandana --channel conda-forge`

`conda install pandana --channel conda-forge`
Pandana is easiest to install in Python 3.6 to 3.9. The last version of Pandana with Python 2.7 binaries is v0.4.4 on Conda Forge. The last version with Python 3.5 binaries is v0.6 on Pip.

See the documentation for information about other [installation options](http://udst.github.io/pandana/installation.html).

Expand All @@ -25,7 +26,6 @@ See the documentation for information about other [installation options](http://
[Pandana-demo.ipynb](examples/Pandana-demo.ipynb)



### Acknowledgments

Pandana was created by [Fletcher Foti](https://github.com/fscottfoti), with subsequent contributions from [Matt Davis](https://github.com/jiffyclub), [Federico Fernandez](https://github.com/federicofernandez), [Sam Maurer](https://github.com/smmaurer), and others. Sam Maurer is currently the lead maintainer. Pandana relies on contraction hierarchy code from [Dennis Luxen](https://github.com/DennisOSRM) and his [OSRM project](https://github.com/DennisOSRM/Project-OSRM).
Expand Down
24 changes: 0 additions & 24 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit 5021e00

Please sign in to comment.