Skip to content
e-lo edited this page Sep 4, 2014 · 9 revisions

Name

Please name folders as:

<mode/agency/street>_<what is happening>_<scope/phase/length-if applicable>

Examples:

  • Folsom_RoadDiet_4th_8th
  • Muni_71Haight_Frequency
  • Muni_109TreasureIsland

Projects should start with a Roadname, Muni, etc.

Note that for projects that affect the physical infrastructure of the roadway, it would be best if they can be categorized as that road name primarily so that when we review projects in the networks folder, we can see all the projects affecting that physical infrastructure together.

Example: Sansome_Contraflow_Clay_Broadway

Functions

Required Functions

apply

desc

returns a description

year

returns a date

networks

returns a list that may include ["hwy","bus","muni","rail"]

champVersion

returns a tuple of floats with min and max champ versions (4.3, 5.0)

wranglerVersion

returns a tuple of floats

prereqs

returns a list of projects that must be implemented before this one

coreqs

returns a list of suggested projects to implement at same time

Optional Functions

dateImplemented

returns a date/time function of when a project is opened for service.

Files in a project folder

Required:

  • __init__.py

Optional:

  • apply.s
  • description.xls

Retired files that should no longer be in there as of Wrangler 2.0:

  • desc.txt
  • champVersion.txt

Examples

Preferred ordering of functions in __init__.py

# Network project config file.
# --------------------------------------------------------------------------

import copy, os.path, re
import Wrangler
from Wrangler import NetworkException, TransitLine, WranglerLogger

MODELYEAR = None  

# --------------------------------------------------------------------------

def desc():
    d=" "
    return d
    
def year():
    if MODELYEAR:
        return MODELYEAR
    else:
        return 2020
    
def prereqs():
    return []
    
def coreqs():
    return []
    
# --------------------------------------------------------------------------

def champVersion():
    return (4.3, Null)

def wranglerVersion():
    return (2.0, Null)

# --------------------------------------------------------------------------

# Don't edit these:
  
def apply(net, modelyear=None):
    MODELYEAR = modelyear
    if MODELYEAR==None or MODELYEAR >= 2020:
        applyFiles(net); 
        applyEdits(net)
    else:
        pass
    
def applyFiles(net): 
    pass

# --------------------------------------------------------------------------

def networks():
    return ["hwy", "bus", "muni", "rail"]
    
def applyEdits(net):
    pass