-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
364 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.