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

kickoff infrastructure, CI, & packaging #17

Merged
merged 14 commits into from
Oct 5, 2024
85 changes: 85 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Continuous Integration

on:
push:
branches: [main]
pull_request:
branches:
- "*"
schedule:
- cron: '59 23 * * *'
workflow_dispatch:
inputs:
version:
description: Manual CI Run
default: test
required: false

jobs:
tests:
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest]
environment-file: [
ci/py310_sgeop-oldest.yaml,
ci/py311_sgeop-latest.yaml,
ci/py312_sgeop-latest.yaml,
ci/py312_sgeop-dev.yaml,
]
include:
- environment-file: ci/py312_sgeop-latest.yaml
os: macos-13 # Intel
- environment-file: ci/py312_sgeop-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/py312_sgeop-latest.yaml
os: windows-latest
fail-fast: false

defaults:
run:
shell: bash -l {0}

steps:
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"

# - must be editable install for current tests to pass
# - due to data & pathing; probably need to:
# 1. rethink current 'convenience' funcs;
# 2. move `data/` into `core/data/`
# 3. something else
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
- name: install package
run: "pip install -e .[tests]"
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved

- name: environment info
run: "micromamba info && micromamba list"

jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
- name: spatial versions
run: 'python -c "import geopandas; geopandas.show_versions();"'

- name: run tests
run: |
pytest \
sgeop/ \
--verbose \
-r a \
--numprocesses logical \
--color yes \
--cov core \
--cov-append \
--cov-report term-missing \
--cov-report xml .

- name: codecov
uses: codecov/codecov-action@v4
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,7 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

cache/
cache/

# macOS stuff
*.DS_Store
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
files: "sgeop\/|notebooks\/"
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.8"
hooks:
- id: ruff
- id: ruff-format

ci:
autofix_prs: false
autoupdate_schedule: quarterly
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
# sgeop
# `sgeop`: Street Geometry Processing Toolkit

[![Continuous Integration](https://github.com/uscuni/sgeop/actions/workflows/testing.yml/badge.svg)](https://github.com/uscuni/sgeop/actions/workflows/testing.yml)

Street geometry processing toolkit

```py
import sgeop

simplified = sgeop.simplify_network(gdf)
```
```

This package developed & and maintained by:
* [Martin Fleischmann](https://github.com/martinfleis)
* [Anastassia Vybornova](https://github.com/anastassiavybornova)
* [James D. Gaboardi](https://github.com/jGaboardi)


## Introduction

## Documentation

## Examples

## Contribution

## Recommended Citation

---------------------------------------

Copyright (c) 2023-, SGeoP Developers
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
26 changes: 26 additions & 0 deletions ci/py310_sgeop-oldest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: py310_sgeop-oldest
channels:
- conda-forge
dependencies:
- python=3.10
- esda=2.5.1
- fiona=1.9
- geopandas=0.13.0
- git
- libpysal
- momepy
- networkx
- numpy
- pandas
- pip
- pyarrow
- pyogrio
- scipy
- shapely
# testing
- pytest
- pytest-cov
- pytest-xdist
- pip:
# from bleeding edge functionality
- git+https://github.com/pysal/momepy.git
jGaboardi marked this conversation as resolved.
Show resolved Hide resolved
26 changes: 26 additions & 0 deletions ci/py311_sgeop-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: py311_sgeop-latest
channels:
- conda-forge
dependencies:
- python=3.11
- esda
- geopandas
- git
- libpysal
- momepy
- networkx
- numpy
- osmnx
- pandas
- pip
- pyarrow
- pyogrio
- scipy
- shapely
# testing
- pytest
- pytest-cov
- pytest-xdist
- pip:
# from bleeding edge functionality
- git+https://github.com/pysal/momepy.git
28 changes: 28 additions & 0 deletions ci/py312_sgeop-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: py312_sgeop-dev
channels:
- conda-forge
dependencies:
- python=3.12
- geos # for shapely
- git
- pip
# testing
- pytest
- pytest-cov
- pytest-xdist
- pip:
# dev versions of packages
- --pre \
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--extra-index-url https://pypi.org/simple
- numpy
- pandas
- pyarrow
- pyogrio
- scipy
- git+https://github.com/pysal/esda.git
- git+https://github.com/geopandas/geopandas.git
- git+https://github.com/pysal/libpysal.git
- git+https://github.com/pysal/momepy.git
- git+https://github.com/networkx/networkx.git
- git+https://github.com/shapely/shapely.git
26 changes: 26 additions & 0 deletions ci/py312_sgeop-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: py311_sgeop-latest
channels:
- conda-forge
dependencies:
- python=3.12
- esda
- geopandas
- git
- libpysal
- momepy
- networkx
- numpy
- osmnx
- pandas
- pip
- pyarrow
- pyogrio
- scipy
- shapely
# testing
- pytest
- pytest-cov
- pytest-xdist
- pip:
# from bleeding edge functionality
- git+https://github.com/pysal/momepy.git
19 changes: 19 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: sgeop
channels:
- conda-forge
dependencies:
- python=3.12
- esda
- geopandas
- git
- libpysal
- momepy
- networkx
- numpy
- pandas
- pip
- scipy
- shapely
- pip:
# from bleeding edge functionality
- git+https://github.com/pysal/momepy.git
19 changes: 9 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,17 @@ classifiers = [
]
requires-python = ">=3.10"
dependencies = [
'geopandas',
'momepy',
'numpy',
'pandas',
'shapely',
'esda',
'libpysal',
'scipy',
'networkx',
"esda",
"geopandas",
"libpysal",
"momepy",
"networkx",
"numpy",
"pandas",
"scipy",
"shapely",
]


[project.urls]
Home = "https://github.com/uscuni/"
Repository = "https://github.com/uscuni/sgeop"
Expand Down
Loading