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

Make Lasso generic #112

Open
wants to merge 158 commits into
base: generic_agency
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
6bc8675
start on parameters
DavidOry Jul 16, 2020
57dd32f
add maz data, additional parameters
DavidOry Aug 5, 2020
9e7958f
update parameters and roadway
DavidOry Aug 11, 2020
3a7eb3a
updates to transit.py
DavidOry Aug 25, 2020
d6b2dce
add attribute lookups
DavidOry Aug 25, 2020
e60283c
add lane computations, update and add attribute lookups
DavidOry Aug 26, 2020
d552c5e
mtc lasso lanes
i-am-sijia Oct 9, 2020
004ce01
mtc lasso facility type
i-am-sijia Oct 9, 2020
96cef81
mtc module
i-am-sijia Oct 9, 2020
1d78f06
make base network with numlanes, ft, etc.
i-am-sijia Oct 19, 2020
d64f311
apply project cards, write MTC format
i-am-sijia Oct 21, 2020
bef6467
revert to lanes
i-am-sijia Oct 21, 2020
f920013
commit tomtom lanes data (was ignored)
i-am-sijia Oct 22, 2020
dd85127
write out useclass by tod
i-am-sijia Oct 22, 2020
c90ff68
remove NAME and ROADWAY from cube
i-am-sijia Oct 23, 2020
d94c6fe
update requirements
DavidOry Oct 26, 2020
822f520
refactor MTC module
DavidOry Oct 26, 2020
e6a860a
move roadway_standard_to_mtc_network to lasso
i-am-sijia Oct 27, 2020
56cf2e5
update lasso
i-am-sijia Oct 28, 2020
a67c25c
update mtc transit module
i-am-sijia Oct 29, 2020
036f5ca
legacy .lin - N instead of NODES
i-am-sijia Oct 29, 2020
eadcfdb
add operator, faresystem
i-am-sijia Oct 30, 2020
3a839a7
fix pad call
DavidOry Oct 30, 2020
8819158
remove FARESYSTEM for routes with FARESYSTEM=0
i-am-sijia Oct 30, 2020
ac52b93
use 99 (missing) as operator code for MV routes
i-am-sijia Oct 30, 2020
d5c5587
replace dashes in SHORTNAME with underscores
i-am-sijia Nov 2, 2020
71f4722
SHORTNAME: replace spaces with underscores; LONGNAME: concat 30 char
i-am-sijia Nov 2, 2020
18c6199
LINE NAME: concat 30 chars; SHORTNAME: replace spaces with .
i-am-sijia Nov 2, 2020
9dd1320
align truncation with Cube spec
DavidOry Nov 3, 2020
3efb2e0
create taps (translated from existing reference script, to be cont'd)
i-am-sijia Nov 6, 2020
0a0ad20
Merge branch 'mtc_parameters' of https://github.com/BayAreaMetro/Lass…
i-am-sijia Nov 6, 2020
a3a3b2c
Merge branch 'generic_agency' into mtc_parameters
e-lo Nov 14, 2020
3d9a88c
tap methods and express bus method
i-am-sijia Dec 9, 2020
67d9f24
Merge branch 'mtc_parameters' of https://github.com/BayAreaMetro/Lass…
i-am-sijia Dec 9, 2020
bfd7b9d
temporary workaround to bypass agency inconsistencies
i-am-sijia Dec 10, 2020
6d2d333
temporary workaround to bypass agency inconsistencies
i-am-sijia Dec 10, 2020
9af0cad
temporary workaround
i-am-sijia Dec 11, 2020
2c3510f
export distance to cube network
i-am-sijia Dec 15, 2020
f2adb93
add shape id to transit line NAME
i-am-sijia Dec 29, 2020
a1e8bb6
unique line NAME; replace comma from LONGNAME; start FAREZONE method
i-am-sijia Jan 6, 2021
2975495
USERA1 use gtfs name when agency_id is missing
i-am-sijia Jan 8, 2021
15a1204
FT=8 for ML access/egress links
i-am-sijia Jan 21, 2021
55cbb29
drop duplicate tap-stop connectors
i-am-sijia Jan 26, 2021
f5791e9
union city test network
i-am-sijia Jan 26, 2021
19ad3ae
union city transit.lin
i-am-sijia Jan 27, 2021
420b3f9
add ohio mug demo files
DavidOry Feb 3, 2021
e1392b9
farezone, faresystem, fare matrix, .far file
i-am-sijia Feb 11, 2021
6e19dbc
gtfs issue: routes with more than one fare_id, e.g. VTA gtfs
i-am-sijia Feb 12, 2021
b264218
a few updates - still working on fare
i-am-sijia Feb 23, 2021
daa85e4
update fare methods
i-am-sijia Feb 26, 2021
9156de1
update lookup
i-am-sijia Feb 26, 2021
d01b4f4
correct path
i-am-sijia Mar 2, 2021
1b1ee8c
Cube transit route NAMEs too long for `tri-delta-transit` routes
i-am-sijia Mar 2, 2021
62101bb
pass parameters as an argument when create cube transit from .lin
i-am-sijia Mar 2, 2021
de77b84
add quotes around `SHORTNAME`
i-am-sijia Mar 2, 2021
9f8cece
update cube transit class
i-am-sijia Mar 2, 2021
e0ba63d
update conditions in calculate_distance
i-am-sijia Mar 3, 2021
7187ae5
write out NNTIME from gtfs to CUBE line
i-am-sijia Mar 3, 2021
8522bef
updates to Ohio example
DavidOry Mar 8, 2021
218011b
handle `nntime` anomalies
i-am-sijia Mar 8, 2021
2d6cdc0
pass parameters as an argument when create cube transit from .lin
i-am-sijia Mar 2, 2021
1d0b60f
merge cherry pick conflict
i-am-sijia Mar 3, 2021
0e0de0d
Merge pull request #116 from BayAreaMetro/partial-change
i-am-sijia Mar 8, 2021
7cbf0b3
update transit line NAME to include the actual `shape_id`
i-am-sijia Mar 9, 2021
d582a84
use `FREE` in .far when price = 0
i-am-sijia Mar 9, 2021
e3fddd6
update transfer fare in .far
i-am-sijia Mar 10, 2021
72c8c56
centroidconnect default to False in calculate distance
DavidOry Mar 10, 2021
0844464
remove quotes within `LONGNAME`
i-am-sijia Mar 10, 2021
39f79eb
update creating project card from cube log file
i-am-sijia Mar 11, 2021
ed80a2c
project card change error
DavidOry Mar 11, 2021
993ecc0
adding st_paul log example
DavidOry Mar 12, 2021
440a08e
update calculate number of lanes method
DavidOry Mar 12, 2021
505002e
do not write out changes in split-properties format for non-ml projec…
i-am-sijia Mar 15, 2021
d68e766
example yml and notebook #117
i-am-sijia Mar 16, 2021
fc51e00
update MUG notebook
DavidOry Mar 16, 2021
0acdac3
add NNTIME for ferries
i-am-sijia Mar 17, 2021
41abcb3
remove NNTIME=0
i-am-sijia Mar 17, 2021
25226e2
small changes
i-am-sijia Mar 25, 2021
768930c
separate marin transit from gg transit operator code
i-am-sijia Mar 25, 2021
7795c1b
`CNTYPE` for bus-only links
i-am-sijia Mar 31, 2021
346d926
add `ACCESS` #120; `NNTIME` correction for circular route
i-am-sijia Apr 2, 2021
792d81e
write out `shape_id` in transit project card
i-am-sijia Apr 5, 2021
03f2531
update assignable and centroid connectors
i-am-sijia Apr 9, 2021
26bea18
update NNTIME calculation (when time is missing for the first few stops)
i-am-sijia Apr 9, 2021
62f4f56
metcouncil .lin file update
i-am-sijia Apr 14, 2021
c29d78d
update project.py when only node changes are made #123
i-am-sijia Apr 15, 2021
d8e37e5
cherry-pick merge upstream/develop/39f79eb
i-am-sijia Mar 11, 2021
12044df
do not write out changes in split-properties format for non-ml projec…
i-am-sijia Mar 15, 2021
b78b042
update project.py when only node changes are made #123
i-am-sijia Apr 15, 2021
47cc167
update nntime code
i-am-sijia Apr 20, 2021
f3d104e
add vehicle type in transit line and pts
i-am-sijia Apr 22, 2021
9dbe1ea
updates: tap connectors for new stop nodes, centroid connectors, assi…
i-am-sijia May 5, 2021
8f63f5a
deflate transit fares to 2010 dollars
i-am-sijia May 18, 2021
df60035
write out `tap_id` as a roadway node attribute
i-am-sijia May 18, 2021
6765be4
add express bus definitions for Soltrains and VINE
i-am-sijia May 19, 2021
9ea4bb9
version 11 changes
i-am-sijia Jul 1, 2021
298a3a2
expand changeable attributes
i-am-sijia Jul 1, 2021
1c02de3
default lanes to 0 (it should already be so, but just to be safe)
i-am-sijia Jul 19, 2021
1fad75a
temp solve pickle and pandas (>=1.3) conflict
i-am-sijia Jul 20, 2021
997b559
optionally write out drive-only shapefiles
i-am-sijia Jul 20, 2021
b0b9b36
update documentation
i-am-sijia Jul 20, 2021
4a8fba3
fix bug in add_counts
i-am-sijia Aug 5, 2021
fd328eb
make TriDelta route 300 express bus (version 12)
i-am-sijia Aug 5, 2021
eeab0fa
Addresses #128
DavidOry Aug 16, 2021
80511c0
modify write_roadway_as_fixed_width to not use tokens #128
i-am-sijia Aug 18, 2021
17d28fb
version 12: make tri-delta route 300 as express bus
i-am-sijia Sep 11, 2021
72584b5
version 12: update farezone calculation
i-am-sijia Sep 11, 2021
89d5be1
version 12: cube net - remove ML_lanes, add name
i-am-sijia Sep 11, 2021
683e041
version 12: small change
i-am-sijia Sep 11, 2021
e1f8ba6
first check-in emme.py and tests
i-am-sijia Sep 13, 2021
0f10797
write out all 4 types of emme networks, passed tests
i-am-sijia Sep 20, 2021
1fc3d7b
method for shorten OSM name
i-am-sijia Sep 27, 2021
1812815
add missing county values
i-am-sijia Sep 27, 2021
6c87de2
mute error msg when bus_only is not in the network
i-am-sijia Sep 27, 2021
51b63a9
lasso emme: union city test data (from version 12)
i-am-sijia Sep 29, 2021
37e27b1
lasos emme: update scripts
i-am-sijia Sep 29, 2021
89542f5
lasso emme: notebook for lasso emme example
i-am-sijia Sep 29, 2021
8346e56
lasso emme: update tests
i-am-sijia Sep 30, 2021
93b88a6
lasso emme: split active mode network along the Bay
i-am-sijia Sep 30, 2021
a908afa
version 12: update tap links A/B node IDs due to changes in rail node…
i-am-sijia Sep 30, 2021
c3a9a62
lasso emme: combine taz and maz drive networks
i-am-sijia Sep 30, 2021
26a94ef
lasso emme: write network in mtc's projection, add projection info
i-am-sijia Oct 13, 2021
e8c1d7d
update name method for non-English characters
i-am-sijia Nov 19, 2021
b6e944a
update requirement
i-am-sijia Jan 20, 2022
6ab5078
update mtc.py (no changes in functionality)
i-am-sijia Jan 20, 2022
1335375
create emme taz-scale transit network
i-am-sijia Jan 20, 2022
326385f
create project cards from Emme ems
i-am-sijia Jan 20, 2022
6b077ad
Add functionality to run cube script to create network from text
lmz Jan 21, 2022
02b28a1
Update write_cube_fare_files() to take transfer fare dataframe as arg
lmz Jan 21, 2022
48cc9c0
Update import; previous version errors
lmz Jan 26, 2022
cf41504
Add output_dir arg to write_roadway_as_fixedwidth()
lmz Jan 26, 2022
1645dc4
Extend write_roadway_as_shp() to output geopackage of model network
lmz Jan 27, 2022
06797ab
Temp fixes to make GeoPackage work
lmz Jan 28, 2022
c2a51a0
add `b` to drive and bus link mode in emme transit
i-am-sijia Feb 14, 2022
23d7154
make emme transit project card more compact
i-am-sijia Feb 15, 2022
039b3df
update transit change condition
i-am-sijia Feb 15, 2022
3eedf19
tests for emme project card
i-am-sijia Feb 15, 2022
9dd484a
#131 exclude records that first get added then edited from compatibil…
i-am-sijia Feb 19, 2022
c5a65e3
Add functionality to export cube network to geopackage
lmz Feb 25, 2022
6022a00
Add trip summary details
lmz Feb 28, 2022
e9cdb0f
Fix error from previous commit; this line shouldn't have been dropped
lmz Feb 28, 2022
225c5c3
adding lane heuristic number to the model network
FlaviaTsang Mar 1, 2022
3fe2855
deal with case when base_transit_network is not provided
yuqiww Mar 10, 2022
91e2aea
add documentation to fare methods in mtc.py
yuqiww Mar 11, 2022
49e67bd
update union city files names
i-am-sijia Mar 14, 2022
c627e16
PRE_COMMIT_ALLOW_NO_CONFIG=1 git
e-lo Mar 17, 2022
554ce0b
Merge pull request #133 from wsp-sag/fix-write-out-type-conversion
DavidOry Mar 21, 2022
52f529f
Add sphinx doc generation to workflow
lmz Mar 22, 2022
c24f6ac
Move sphinx.yaml to correct location
lmz Mar 22, 2022
7da90a7
Try to clone and install network_wrangler, generic_agency branch
lmz Mar 22, 2022
b94f5b5
Fix syntax errror
lmz Mar 22, 2022
c061c94
Debug failed network_wrangler install
lmz Mar 22, 2022
1c35ffb
Try cloning network wrangler into special dir
lmz Mar 22, 2022
a8d287a
Fix link
lmz Mar 22, 2022
e488899
Update conf.py footer
lmz Mar 22, 2022
32b32dd
Merge branch 'bart' into mtc_parameters
i-am-sijia Apr 11, 2022
d3688b9
Revert "Merge branch 'bart' into mtc_parameters"
i-am-sijia Sep 23, 2022
fe957a6
fix the projection for emme network
i-am-sijia Jun 13, 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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.net filter=lfs diff=lfs merge=lfs -text
cc_link.pickle filter=lfs diff=lfs merge=lfs -text
cc_shape.pickle filter=lfs diff=lfs merge=lfs -text
centroid_node.pickle filter=lfs diff=lfs merge=lfs -text
170 changes: 170 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@

# references:
# * understanding github actions: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions
# * example sphinx publishing action: https://github.com/coderefinery/sphinx-lesson/blob/master/.github/workflows/sphinx.yml

name: sphinx
on: [push]

env:
DEFAULT_BRANCH: mtc_parameters
#SPHINXOPTS: "-W --keep-going -T"
# ^-- If these SPHINXOPTS are enabled, then be strict about the builds and fail on any warnings

jobs:
build-and-deploy:
name: Build and gh-pages
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true

# https://github.com/marketplace/actions/setup-python
# ^-- This gives info on matrix testing.
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.8

# https://docs.github.com/en/actions/guides/building-and-testing-python#caching-dependencies
# ^-- How to set up caching for pip on Ubuntu
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

# https://github.com/marketplace/actions/checkout
# Git clone network_wrangler
- name: Git clone network_wrangler
uses: actions/checkout@v3
with:
# Repository name with owner. For example, actions/checkout
repository: 'BayAreaMetro/network_wrangler'
# The branch, tag or SHA to checkout.
ref: 'generic_agency'
# Relative path under $GITHUB_WORKSPACE to place the repository
path: 'network_wrangler_clone'

# https://docs.github.com/en/actions/guides/building-and-testing-python#installing-dependencies
# ^-- This gives info on installing dependencies with pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev-requirements.txt
# this should be local from the Git clone action above
ls -l network_wrangler_clone
pip install ./network_wrangler_clone
- name: Debugging information
run: |
echo "github.ref:" ${{github.ref}}
echo "github.event_name:" ${{github.event_name}}
echo "github.head_ref:" ${{github.head_ref}}
echo "github.base_ref:" ${{github.base_ref}}
set -x
git rev-parse --abbrev-ref HEAD
git branch
git branch -a
git remote -v
python -V
pip list --not-required
pip list

# Build
- uses: ammaraskar/sphinx-problem-matcher@master
- name: Build Sphinx docs
run: |
cd docs
make dirhtml
# This fixes broken copy button icons, as explained in
# https://github.com/coderefinery/sphinx-lesson/issues/50
# https://github.com/executablebooks/sphinx-copybutton/issues/110
# This can be removed once these PRs are accepted (but the
# fixes also need to propagate to other themes):
# https://github.com/sphinx-doc/sphinx/pull/8524
# https://github.com/readthedocs/sphinx_rtd_theme/pull/1025
sed -i 's/url_root="#"/url_root=""/' _build/dirhtml/index.html || true

# The following supports building all branches and combining on
# gh-pages

# Clone and set up the old gh-pages branch
- name: Clone old gh-pages
if: ${{ github.event_name == 'push' }}
run: |
set -x
git fetch
( git branch gh-pages remotes/origin/gh-pages && git clone . --branch=gh-pages _gh-pages/ ) || mkdir _gh-pages
rm -rf _gh-pages/.git/
mkdir -p _gh-pages/branch/

# If a push and default branch, copy build to _gh-pages/ as the "main"
# deployment.
- name: Copy new build (default branch)
if: |
contains(github.event_name, 'push') &&
contains(github.ref, env.DEFAULT_BRANCH)
run: |
set -x
# Delete everything under _gh-pages/ that is from the
# primary branch deployment. Excludes the other branches
# _gh-pages/branch-* paths, and not including
# _gh-pages itself.
find _gh-pages/ -mindepth 1 ! -path '_gh-pages/branch*' -delete
rsync -a docs/_build/dirhtml/ _gh-pages/

# If a push and not on default branch, then copy the build to
# _gh-pages/branch/$brname (transforming '/' into '--')
- name: Copy new build (branch)
if: |
contains(github.event_name, 'push') &&
!contains(github.ref, env.DEFAULT_BRANCH)
run: |
set -x
#brname=$(git rev-parse --abbrev-ref HEAD)
brname="${{github.ref}}"
echo "brname:" ${brname}}
brname="${brname##refs/heads/}"
echo "brname:" ${brname}}
brdir=${brname//\//--} # replace '/' with '--'
echo "brdir:" ${brdir}}
rm -rf _gh-pages/branch/${brdir}
rsync -a docs/_build/dirhtml/ _gh-pages/branch/${brdir}
# Go through each branch in _gh-pages/branch/, if it's not a
# ref, then delete it.
- name: Delete old feature branches
if: ${{ github.event_name == 'push' }}
run: |
set -x
for brdir in `ls _gh-pages/branch/` ; do
brname=${brdir//--/\/} # replace '--' with '/'
if ! git show-ref remotes/origin/$brname ; then
echo "Removing $brdir"
rm -r _gh-pages/branch/$brdir/
fi
done

# Add the .nojekyll file
- name: nojekyll
if: ${{ github.event_name == 'push' }}
run: |
touch _gh-pages/.nojekyll

# Deploy
# https://github.com/peaceiris/actions-gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
#if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/$defaultBranch' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _gh-pages/
force_orphan: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,8 @@ env/

# large metcouncil data file
metcouncil_data/mrcc/*.mrcc.out.matched.geojson
# proprietary mtc data file
mtc_data/lookups/tomtom_attributes.csv
.Rproj.user
scripts/.Rhistory

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# -- Project information -----------------------------------------------------

project = "lasso"
copyright = "2019 Metropolitan Council"
copyright = "2019-2022 Metropolitan Council, Metropolitan Transportation Commission"
author = "Sijia Wang and Elizabeth Sall"


Expand Down
9 changes: 5 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ Welcome to lasso's documentation!
=================================

This package of utilities is a wrapper around the
[network_wrangler](http://github.com/wsp-sag/network_wrangler) package
for MetCouncil. It aims to have the following functionality:
`network_wrangler <https://github.com/BayAreaMetro/network_wrangler/tree/generic_agency>`_ package
for MetCouncil and MTC. It aims to have the following functionality:

1. parse Cube log files and base highway networks and create ProjectCards
for Network Wrangler
2. parse two Cube transit line files and create ProjectCards for NetworkWrangler
3. refine Network Wrangler highway networks to contain specific variables and
settings for Metropolitan Council and export them to a format that can
be read in by Citilab's Cube software.
settings for the respective agency and export them to a format that can
be read in by Citilab's Cube software.

.. toctree::
:maxdepth: 3
Expand Down
Loading