Skip to content
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

Finalizing v0.7 #187

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9fca283
GitHub Actions (#153)
smmaurer Dec 8, 2020
7f9b45b
Resolve Windows dtype error (#154)
smmaurer Dec 16, 2020
de0b047
Notebook cleanup
smmaurer Dec 22, 2020
87ef861
Require C++11 (#155)
smmaurer Jan 4, 2021
236b0b1
Binary installers now available on Pip (#157)
smmaurer Mar 15, 2021
4bacf4c
Fix build on non-x86 (#158)
pkubaj Mar 16, 2021
4cc4666
Native support for ARM Macs (#159)
smmaurer Mar 16, 2021
9a6ebfe
Staging v0.6.1 (#160)
smmaurer Mar 19, 2021
3e3d35c
Documentation cleanup (#163)
sablanchard Apr 6, 2021
657406a
Versioning
smmaurer Jan 5, 2021
c50bdc1
Initial range query
smmaurer Jan 5, 2021
abbe120
Cython language_level
smmaurer Jan 7, 2021
bd76d5b
Node id conversion in c++
smmaurer Jan 7, 2021
1d46875
Multiple source nodes
smmaurer Jan 8, 2021
0b57562
Range example
smmaurer Feb 9, 2021
2603c2e
add docstrings
ljwolf Jul 9, 2021
d39f7ee
remove 2.7 and add 3.9
ljwolf Jul 9, 2021
47b99fa
cast output to indexed dataframe
ljwolf Jul 9, 2021
fc37202
drop duplicated node pairs
ljwolf Jul 9, 2021
63f01ff
censor results (cached or otherwise) greater than search radius
ljwolf Jul 9, 2021
7aee012
move radius filter logic to pandas postprocessing
ljwolf Jul 9, 2021
5760c15
add test and blacken
ljwolf Jul 9, 2021
14b20bf
Support mapping_distance with POIs
Rikuoja Aug 30, 2021
afd5759
Change pytables dependency for python 3.10.x up to 3.7
thomastu Apr 27, 2022
b5b62f4
Merge pull request #167 from ljwolf/range-queries
smmaurer Aug 23, 2022
09b51c4
Merge branch 'dev' into patch-1
smmaurer Aug 23, 2022
1e3920f
Merge pull request #178 from thomastu/patch-1
smmaurer Aug 23, 2022
da0965f
New setup.py/pyproject.toml packaging standards (#165)
smmaurer Aug 23, 2022
e5443e1
Merge branch 'dev' of https://github.com/GispoCoding/pandana into Gis…
smmaurer Aug 23, 2022
7529473
Merge branch 'GispoCoding-dev' into dev
smmaurer Aug 23, 2022
88ec50a
Merge branch 'dev' of https://github.com/udst/pandana into dev
smmaurer Aug 23, 2022
0e82a24
Support Pandas 2.0 (#185)
smmaurer Jul 25, 2023
9616c2c
Informative warning for shortest path unsigned integer (#169)
PyMap Jul 25, 2023
9bcebd6
Staging v0.7 release (#186)
smmaurer Jul 26, 2023
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
65 changes: 65 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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 provide 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: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
- 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.8, 3.9, '3.10', '3.11']
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 build clang llvm-openmp
- name: Build wheel
run: |
python -m build --sdist --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
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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.10'
- name: Install Pandana
run: |
pip install .
pip install osmnet

# `coverage run ...` is failing in GitHub Actions, but I'm not able to reproduce the
# problem locally. We should look into this again another time. (11-May-2021)

# - name: Generate coverage report
# run: |
# pip install pytest coverage
# coverage run --source pandana --module pytest --verbose
# coverage report --show-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
66 changes: 66 additions & 0 deletions .github/workflows/cross-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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.8, 3.9, '3.10', '3.11']
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
pytest -s

build-conda:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0} # needed for conda persistence
strategy:
matrix:
os: [windows-latest]
python-version: [3.8, 3.9, '3.10', '3.11']
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 .

# OSMNet is causing a version of Pandas to be installed that crashes in GitHub Actions.
# Assume this will resolve itself on its own. (11-May-2021)

# conda install osmnet --channel conda-forge
- name: Run demo
run: |
python examples/simple_example.py
# - name: Run unit tests
# run: |
# pip install pytest
# pytest -s
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.8, 3.9, '3.10', '3.11']
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.8, 3.9, '3.10', '3.11']
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.10'
- name: Install Pandana
run: |
pip install .
pip install osmnet
- name: Run unit tests
run: |
pip install pytest
pytest -s
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
v0.7
====

2023/07/26

* Adds support for calculating accessibility isochrones: which nodes are within x network distance of a source node
* Allows a maximum distance to be set for POIs
* Adds a warning when a shortest path is requested between unconnected nodes
* Supports PyTables 3.7+
* Support Pandas 2.0
* Switches to pyproject.toml packaging standards
* Adds binaries on PyPI to support Python 3.10 and 3.11
* Improves compilation in MacOS 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
17 changes: 13 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can contact Sam Maurer, the lead maintainer, at `[email protected]`.

- Take a look at the [open issues](https://github.com/UDST/pandana/issues) and [closed issues](https://github.com/UDST/pandana/issues?q=is%3Aissue+is%3Aclosed) to see if there's already a related discussion

- Open a new issue describing the problem -- if possible, include any error messages, the operating system and version of python you're using, and versions of any libraries that may be relevant
- Open a new issue describing the problem -- if possible, include any error messages, a full reproducible example of the code that generated the error, the operating system and version of python you're using, and versions of any libraries that may be relevant


## Feature proposals:
Expand All @@ -25,7 +25,7 @@ You can contact Sam Maurer, the lead maintainer, at `[email protected]`.

- Make your changes, following the existing styles for code and inline documentation

- Add [tests](https://github.com/UDST/urbansim/tree/master/pandana/tests) if possible!
- Add [tests](https://github.com/UDST/pandana/tree/master/pandana/tests) if possible!

- Open a pull request to the `UDST/pandana` dev branch, including a writeup of your changes -- take a look at some of the closed PR's for examples

Expand All @@ -46,7 +46,8 @@ You can contact Sam Maurer, the lead maintainer, at `[email protected]`.
- `setup.py`
- `pandana/__init__.py`
- `docs/source/index.rst`

- `docs/source/conf.py`

- Make sure all the tests are passing, and check if updates are needed to `README.md` or to the documentation

- Open a pull request to the master branch to finalize it
Expand All @@ -68,11 +69,19 @@ 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.

How to create wheels for ARM Macs: As of 7/2023, GitHub Actions doesn't provide this environment yet. You'll need an ARM Mac to create the wheels. One at a time, set up a Conda environment with Python 3.8, 3.9, etc. Include cython, numpy, clang, llvm-openmp, and pytables. These need to be ARM-native Conda environments -- check that you're getting `osx-arm64` versions of libraries. Run `python setup.py bdist_wheel` to generate a wheel file. Once one is built for each Python version, upload them to PyPI using the command 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)
Loading
Loading