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

Draft
wants to merge 55 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 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
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
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/
20 changes: 9 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,32 @@ 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: 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"
pytest --cache-clear --cov=network_wtangler tests/ > pytest-coverage.txt
- 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: If a pull request, add a comment about coverage
if: github.event_name == 'pull_request'
uses: coroo/pytest-coverage-commentator@v1.0.2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ scratch/*
.pytest_cache
*.bak
.cache
cache
tests/t_*
tests/*.txt
tests/out/**
# Logs
*.log
scenario_log.txt
Expand Down Expand Up @@ -65,4 +67,5 @@ env/
.project
.pydevproject
.settings
.vscode
*.hubstorinfo
3 changes: 3 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ 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
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