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

V1 Refactor RC #327

Open
wants to merge 101 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
4913036
intitial separation
e-lo Apr 10, 2023
247d90f
initial refactor
e-lo Apr 11, 2023
8eb9cc0
Refactor selection, segments, apply
e-lo Apr 13, 2023
6351925
Factored out major parts or RoadwayNetwork to other classes
e-lo Apr 27, 2023
34c0ddb
Merge branch 'develop' into selection-refactor
e-lo Apr 27, 2023
a1ca5c9
debugging
e-lo Apr 29, 2023
5208330
update project card formats
e-lo May 3, 2023
396676b
update selection tests to have answers
e-lo May 8, 2023
4f943b1
selections tests passing
e-lo May 11, 2023
6402ef4
test_properties passs
e-lo May 11, 2023
f0310d1
Passing almost all roadway tests now
e-lo Jun 5, 2023
58d27f8
Format updates, linting
e-lo Jun 14, 2023
80cad3c
Refactor transit selection
e-lo Aug 1, 2023
3ffc565
transit tests working
e-lo Aug 2, 2023
ff21855
refactor transit project application
e-lo Aug 7, 2023
fdfa5b2
Update project cards and API to be consistent with projectcard structure
e-lo Dec 12, 2023
7ef4580
rename to timespans
e-lo Mar 11, 2024
c4048fa
Add roadway network clipping feature
e-lo Mar 27, 2024
b55414b
Fix roadway single node example with incorrect ..referenceID --> ..re…
e-lo Mar 27, 2024
50652d6
Update transit timespan --> timespans per project card v1 spec
e-lo Mar 27, 2024
dbcddb1
Remove LocationReferences / Speed up I/O and allow other serializatio…
e-lo Mar 27, 2024
e70b32a
Update notebooks and tests to use updatated API
e-lo Mar 27, 2024
867753d
Update organization of pydantic and pandera data models
e-lo Mar 27, 2024
9318a06
Improved small-network example
e-lo Apr 16, 2024
aa18ffe
Implement roadway and transit data models.
e-lo Apr 16, 2024
311ae50
Vectorize input reading tasks and minimize overhead.
e-lo Apr 16, 2024
d7a3c51
Update setup scripts/configs
e-lo Apr 16, 2024
30072e0
Add network format conversions.
e-lo Apr 16, 2024
fc52ba8
Define very basic project card models
e-lo Apr 16, 2024
6131994
add clipping functionality for transit and highways
e-lo Apr 16, 2024
166bac7
Draft an overview of v1 release features
e-lo Apr 16, 2024
61748ee
Fix bug in selection dictionary
e-lo Apr 16, 2024
cb1d0d8
bug fixes for transit data models
e-lo Apr 16, 2024
24eac37
remove cruft we aren't using
e-lo Apr 17, 2024
0da4f32
Move roadway and transit networks to ../net
e-lo Apr 17, 2024
b530e20
rename small network single --> small
e-lo Apr 17, 2024
9971f51
update API for scripts
e-lo Apr 17, 2024
d470cc0
WIP: Improve installation with environmnents and pypi publishing
e-lo Apr 17, 2024
92eb4f7
Remove partridge dependency. try to fix setup.py bug
e-lo Apr 17, 2024
a208654
Make sure specified optional columns are added as blanks
e-lo Apr 18, 2024
02a3cea
small renaming
e-lo Apr 18, 2024
1bf40ef
Update test workflow for coverage commenting
e-lo Jun 10, 2024
8a24f96
Update script calls
e-lo Jun 10, 2024
036efc7
Pull out 'scoped', improve performance, fix bugs, add docs
e-lo Jun 10, 2024
bdef653
Fix one-to-many update function
e-lo Jun 11, 2024
2e376ed
Add feed path to feed obj
e-lo Jun 11, 2024
82d2bca
Fix typo in project card
e-lo Jun 11, 2024
c7a60f7
Fix selection type lookups
e-lo Jun 11, 2024
e39ad3e
Update ml_access/egress_point to be bool rather than list of nodes
e-lo Jun 11, 2024
4ab5530
All tests passing; all linters run!
e-lo Jun 13, 2024
aaf0c3d
Fix strange copilot copy/paste; add test for installation/import
e-lo Jun 13, 2024
f003b06
update requirements to install projectcard from github
e-lo Jun 13, 2024
aa003f0
See if specifying version/branch in git requirements will fix.
e-lo Jun 18, 2024
0a1c094
main not master (doh)
e-lo Jun 18, 2024
beef6cf
clean up docs / bump version
e-lo Jun 20, 2024
c705ea3
Fix subnet not grabbing right mode
e-lo Jul 12, 2024
645b421
Update pytest and gitignore
e-lo Jul 12, 2024
0197a39
projectcard can now pull from pypi
e-lo Jul 12, 2024
8f3beef
Fix FK checking
e-lo Jul 16, 2024
6193bf5
Fix pyproject to explictly state package name
e-lo Jul 16, 2024
fa18f1a
Linting!
e-lo Jul 16, 2024
0377428
add framework for adding transit route
e-lo Jul 16, 2024
40e9fc9
add import statement...
e-lo Jul 16, 2024
3d1c1e7
pin Mike for rebuild flag
e-lo Jul 17, 2024
ee41c84
forgot about pyproject.toml...pin that too
e-lo Jul 17, 2024
745cd89
update documentation build for autodoc
e-lo Jul 17, 2024
986d565
bump version
e-lo Jul 17, 2024
bb379b0
lint
e-lo Jul 17, 2024
eae3954
Fix timespan ---> timespans for transit trip selection
e-lo Aug 12, 2024
6445495
Fix default for "access" ---> none
e-lo Aug 12, 2024
f3445cb
add route docs + param for card type
e-lo Aug 12, 2024
48fd539
fix deep copy call
e-lo Aug 12, 2024
9049a21
fix: subprojects is _subprojects
e-lo Aug 12, 2024
10f2dd4
Fix: process multiple timespans, not single timespan
e-lo Aug 12, 2024
f55fcf0
remove agency raw name -not needed
e-lo Aug 15, 2024
3916b41
leverage uniqueness reusable check rather than custom
e-lo Aug 15, 2024
6933c75
Add geographic-filter-on-read capability; start chunking
e-lo Aug 15, 2024
aed82ec
lint...
e-lo Aug 15, 2024
6828330
Fill empty "name" values with "unknown"
e-lo Aug 16, 2024
60d7ab9
changes copy to deepcopy()
e-lo Aug 19, 2024
e0427f5
Generates link and node ids based on available range rather than a sc…
e-lo Aug 19, 2024
55c3350
Add conversion of complex link properties on I/O
e-lo Aug 19, 2024
777f9e1
Document network wrangler network format. (#329)
e-lo Aug 21, 2024
1f8e263
small bug fix - erroneous copy
e-lo Aug 21, 2024
a0e7ec3
Merge branch 'selection-refactor' of https://github.com/wsp-sag/netwo…
e-lo Aug 21, 2024
754b966
Passing tests for converting v0 <-->v1 scoped values
e-lo Aug 23, 2024
dde7540
Default to "any" mode when project is link deletion
e-lo Aug 23, 2024
fc35831
Add validation scripts / modernize bin dir
e-lo Aug 27, 2024
6f82ec2
add docs on validating networks
e-lo Aug 27, 2024
c0b4581
Project card list default is None, not a mutable object.
e-lo Aug 27, 2024
f21f6fb
Propagate offset distance parameterizatio to a few more methods.
e-lo Aug 27, 2024
7b8d6f7
Format installation tips
e-lo Aug 27, 2024
091ef2e
Fix error code for existing value.
e-lo Aug 27, 2024
3b922b7
Update gtfs data model "stop_id" is a valid "model_node_id" (#365)
e-lo Aug 27, 2024
71199d2
Write out scoped items from object not dict
e-lo Aug 28, 2024
49ddfe3
lint
e-lo Aug 28, 2024
3b68343
Enforce GeoSeries for ML_Geometry
e-lo Sep 3, 2024
b7b3b91
Fix timespan queries; Add applied project to roadway and transit feat…
e-lo Sep 3, 2024
67dc0ae
Fix: allow timespans over midnight (#377)
e-lo Sep 10, 2024
beb00fa
Update pandera requirement > 0.19
e-lo Sep 10, 2024
5bf40e6
add ability to have project be a prereq for multiple projects
e-lo Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .coverage
Binary file not shown.
20 changes: 9 additions & 11 deletions .github/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
## What existing problem does the pull request solve and why should we include it?
# Pull Request

## What existing problem does the pull request solve and why should we include it?

## What is the testing plan?

*Demonstrate the code is solid by discussing how results are verified and covered by tests*

- [ ] Code for this PR is covered in tests
- [ ] Code passes all existing tests
- [ ] Code for this PR is covered in tests
- [ ] Code passes all existing tests

## Code formatting

*Code should be PEP8 compliant before merging by running a package like [`black`](https://pypi.org/project/black/)*

- [ ] Code linted
- [ ] Code linted

## Applicable Issues

*Please do not create a Pull Request without creating an issue first.*

*Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes.*


#### Issues List

- closes...
- closes...


- closes...
- closes...
13 changes: 8 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,33 @@ assignees: ''
---

## Describe the bug
A clear and concise description of what the bug is or the error code you got. e.g.
```python

A clear and concise description of what the bug is or the error code you got. e.g.

```python
KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'
```

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Failing tests

- [ ] No applicable test failed, need to create.
- [ ]
- [ ]

### Triggering line of code


### Thoughts on resolution

### Full stack trace


### Environment

Operating system:
Expand Down
15 changes: 10 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,30 @@ assignees: ''
---

### User Story

*As a ...insert type of user... I'd like to ...insert desired feature or behavior...*

### Priority
### Priority

### Level of Effort

### Resolution Ideas

### Project

*Is there a funder or project associated with this feature?*

### Who should be involved?
Implementer:
Commenters:
Users:
Reviewers:

Implementer:
Commenters:
Users:
Reviewers:

### Risk

*Will this potentially break anything?*

#### Tests

*What are relevant tests or what tests need to be created in order to determine that this issue is complete?*
79 changes: 79 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish Python Package 📦 to PyPI and TestPyPI
on:
push:
branches: [main]
release:
types: [created]
workflow_dispatch: # Manual trigger for both PyPI and TestPyPI
inputs:
publish_target:
description: 'Publish Target (pypi/testpypi)'
required: true
default: 'testpypi'
jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_target == 'pypi')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/network_wrangler
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_target == 'testpypi')
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/gmnspy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
34 changes: 19 additions & 15 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,38 @@ jobs:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Document branch
run: echo ${{ github.ref_name }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.tests.txt
- name: Lint
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install package
run: |
pip install -e .[test]
- name: Test with pytest
- name: Run Ruff
run: ruff check --output-format=github .
- name: Run tests with coverage
run: |
pytest -s -m "not skipci"
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=network_wrangler tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
if: github.event_name == 'pull_request'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: If a pull request, add a comment about coverage
if: github.event_name == 'pull_request'
uses: coroo/[email protected]
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ scratch/*
.pytest_cache
*.bak
.cache
cache
tests/t_*
tests/*.txt
tests/out/**
wranglertest/
.coverage
coverage.xml

# Logs
*.log
scenario_log.txt
Expand Down Expand Up @@ -65,4 +71,5 @@ env/
.project
.pydevproject
.settings
.vscode
*.hubstorinfo
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ MD013: false

# Remove "no emphasis as heading"
MD036: false

# Remove "no first line must by h1" b/c sometimes importing from other sources
MD041: false

# Code block style - want to be able to use fenced code blocks to apply coloring
MD046: false
26 changes: 17 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.8
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
# Run the linter.
- id: ruff
types_or: [ python ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand All @@ -20,6 +23,11 @@ repos:
- id: requirements-txt-fixer
- id: mixed-line-ending
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
rev: v0.34.0
hooks:
- id: markdownlint
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
additional_dependencies: [pyyaml]
hooks:
- id: markdownlint
- id: mypy
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Contributing to Network Wrangler


## Roles


## How to Contribute


### Setup

1. Make sure you have a [GitHub](https://github.com/) account.
Expand Down
Loading
Loading