Skip to content

Commit

Permalink
chore: clean up warnings and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-willis-arcadis committed Oct 3, 2024
1 parent 517d895 commit 368e843
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
# The MIT License (MIT)

Copyright (c) 2016 Conveyal

Expand Down
7 changes: 4 additions & 3 deletions __tests__/test-utils/mock-data/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export const mockFeedWithoutVersion = {
versionCount: 0
}

// a mock feedversion that has validation data
// a mock feed version that has validation data
export const mockFeedVersion = {
dateCreated: 1543389038810,
feedLoadResult: {
Expand Down Expand Up @@ -390,7 +390,7 @@ mockProjectWithDeploymentUnloaded.id = 'mock-project-with-deployments-id'
mockProjectWithDeploymentUnloaded.name = 'mock-project-with-deployments'

/**
* A mock project with a feed soure and deployment that are already loaded
* A mock project with a feed source and deployment that are already loaded
*/
export const mockProjectWithDeployment = clone(mockProject)
mockProjectWithDeployment.id = 'mock-project-with-deployments-id'
Expand All @@ -405,7 +405,8 @@ mockProjectWithDeployment.deployments.push(mockDeployment)
mockProjectWithDeployment.feedSources.push(mockFeedWithVersion)

/***************************************************************************
User helpers
User helpers
***************************************************************************/

/**
Expand Down
19 changes: 7 additions & 12 deletions docs/user/editor/fares.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
### Fare attributes

Fare attributes describe the basic information about a fare including the price, currency type and transfer information. See the [GTFS specification fare attribute reference](https://gtfs.org/schedule/reference/#fare_attributestxt) for more information.

### Fare rules

Fare rules describe how much riders pay to use a transit system, based on factors such as distance traveled, time of day, and type of fare media used (such as a mobile app). In other words, they govern how fare attributes are applied. See the [GTFS specification fare rule reference](https://gtfs.org/schedule/reference/#fare_rulestxt) for more information.


## Editing/Creating Fares

To begin editing fares, click the fare ticket button on the lefthand navigation bar (outlined in red).
To begin editing fares, click the fare ticket button on the left hand navigation bar (outlined in red).

Choose a fare from the list to begin editing. To create a new fare, click `+ New fare`, or, if this is the first fare being created for this feed, click `+ Create first fare` (highlighted in yellow).

![fare-tab](https://datatools-builds.s3.amazonaws.com/docs/fares/fare-tab.png)

### Edit fare attributes

In the `Attributes` tab, required and optional information about the fare can be entered, like `fare_id`, `price` and `currency_type`.

**Note: Be sure to click the save button (💾) after changes to fare attributes or fare rules are made. Clicking save after adding attributes will allow you to edit fare rules.**
Expand All @@ -33,20 +34,14 @@ To edit fare rules, you must first create and save a fare with attributes. After
2. **From/to zone** - applies to any itinerary that travels from the origin zone to the destination zone
3. **Contains zone** - applies to any itinerary that passes through *each* `contains` zone

<img src="https://datatools-builds.s3.amazonaws.com/docs/fares/edit-fare-rules.png" style="box-shadow: 3px 3px 3px gray; border-radius: 10px; width: 600px">
![Edit fare rules](https://datatools-builds.s3.amazonaws.com/docs/fares/edit-fare-rules.png)

### Creating fare zones

To create a fare zone, you must first select a stop that you would like to include in the zone by clicking the location pin icon on the sidebar and selecting one of the stop names. Next, click in the `zone_id` dropdown and begin typing the new `zone_id`. Click `Create new zone: [zone_id]` and then save the stop. Repeat for as many zones as needed.

<img src="https://datatools-builds.s3.amazonaws.com/docs/fares/add-fare-zone.png" style="box-shadow: 3px 3px 3px gray; border-radius: 10px;">
![Add fare zone](https://datatools-builds.s3.amazonaws.com/docs/fares/add-fare-zone.png)

### Tutorial Video: Editing/Creating Fares
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/oiWK_A5emlE"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>

[![Tutorial Video: Editing/Creating Fares](https://img.youtube.com/vi/oiWK_A5emlE/0.jpg)](https://www.youtube.com/watch?v=oiWK_A5emlE)
14 changes: 7 additions & 7 deletions gtfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
required: false
inputType: TEXT
columnWidth: 12
helpContent: "The agency_phone field contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's \"503-238-RIDE\") is permitted, but the field must not contain any other descriptive text."
helpContent: "The agency_phone field contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Disable text (for example, TriMet's \"503-238-RIDE\") is permitted, but the field must not contain any other descriptive text."
- name: "agency_fare_url"
required: false
inputType: URL
Expand Down Expand Up @@ -219,7 +219,7 @@
inputType: TIMEZONE
bulkEditEnabled: true
columnWidth: 12
helpContent: "The stop_timezone field contains the timezone in which this stop or station is located. If omitted, the stop should be assumed to be located in the timezone specified byagency_timezone in agency.txt."
helpContent: "The stop_timezone field contains the timezone in which this stop or station is located. If omitted, the stop should be assumed to be located in the timezone specified by agency_timezone in agency.txt."
- name: "wheelchair_boarding"
required: false
inputType: DROPDOWN
Expand Down Expand Up @@ -565,7 +565,7 @@
required: true
inputType: GTFS_SERVICE
columnWidth: 6
helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from thecalendar.txt or calendar_dates.txt file."
helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from the calendar.txt or calendar_dates.txt file."
- name: "trip_id"
required: true
inputType: GTFS_ID
Expand Down Expand Up @@ -659,7 +659,7 @@
inputType: TEXT
bulkEditEnabled: true
columnWidth: 6
helpContent: "The stop_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the defaulttrip_headsign when the headsign changes between stops. If this headsign is associated with an entire trip, use trip_headsign instead."
helpContent: "The stop_headsign field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default trip_headsign when the headsign changes between stops. If this headsign is associated with an entire trip, use trip_headsign instead."
- name: "pickup_type"
required: false
inputType: DROPDOWN
Expand Down Expand Up @@ -814,7 +814,7 @@
- value: '1'
- value: '2'
columnWidth: 6
helpContent: "The exception_type indicates whether service is available on the date specified in thedate field."
helpContent: "The exception_type indicates whether service is available on the date specified in the date field."


- id: fare_attributes
Expand Down Expand Up @@ -929,7 +929,7 @@
required: false
inputType: GTFS_ZONE
columnWidth: 6
helpContent: "The contains_id field associates the fare ID with a zone ID, referenced from thestops.txt file. The fare ID is then associated with itineraries that pass through every contains_id zone."
helpContent: "The contains_id field associates the fare ID with a zone ID, referenced from the stops.txt file. The fare ID is then associated with itineraries that pass through every contains_id zone."

- id: fare_leg_rules
name: fare_leg_rules.txt
Expand Down Expand Up @@ -1013,7 +1013,7 @@
inputType: POSITIVE_INT
bulkEditEnabled: true
columnWidth: 6
helpContent: "The headway_secs field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by start_time andend_time. The headway value must be entered in seconds."
helpContent: "The headway_secs field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by start_time and end_time. The headway value must be entered in seconds."
- name: "exact_times"
required: false
inputType: DROPDOWN
Expand Down
2 changes: 1 addition & 1 deletion lib/editor/actions/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function lockEditorFeedSource (feedId: string, itemToLock: string) {
const duration = moment.duration(moment(timestamp).diff(moment()))
const minutes = duration.asMinutes()
if (minutes < 60) {
console.log(`Session ID ${sessionId} found in session storage. Attempting to resume editor sesssion`)
console.log(`Session ID ${sessionId} found in session storage. Attempting to resume editor session`)
// There is already an unexpired session open for this browser tab.
// FIXME: Handle removing session for different feed source.
dispatch(startEditorLockMaintenance(sessionId, feedId, itemToLock))
Expand Down

0 comments on commit 368e843

Please sign in to comment.