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

✨ New Documentation (No large files!) ✨ #911

Merged
merged 35 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2f32b7f
fresh start
AdrianaCeric Feb 15, 2023
013daff
Merge branch 'dev' into new-documentation
philip-cline Feb 16, 2023
f78b741
docs: update fares content
AdrianaCeric Mar 23, 2023
69dcf52
Merge branch 'new-documentation' of https://github.com/ibi-group/data…
AdrianaCeric Mar 23, 2023
4cc3e9a
docs: update calendar content, link to gtfs.org
AdrianaCeric Mar 29, 2023
f4bae6f
docs: editing patterns update
AdrianaCeric Apr 28, 2023
117eb11
docs: pattern geometry update
AdrianaCeric May 4, 2023
4585122
docs: combine schedule and calendar docs
AdrianaCeric May 4, 2023
fd033a6
docs: routes page update
AdrianaCeric May 4, 2023
b43ffd0
docs: update stops page and add route terminology
AdrianaCeric May 4, 2023
a888b69
docs: intro page update
AdrianaCeric May 5, 2023
f90427a
docs: update styling
AdrianaCeric Sep 15, 2023
9c749b4
docs: update data manager pages
AdrianaCeric Sep 15, 2023
31f5eb8
docs: managing users page
AdrianaCeric Sep 18, 2023
b00136b
docs: otp deployment
AdrianaCeric Sep 18, 2023
866be8b
docs: setting up aws servers
AdrianaCeric Sep 18, 2023
dcf009e
docs: deployment page
AdrianaCeric Sep 18, 2023
71ab041
Merge branch 'dev' into new-documentation
AdrianaCeric Sep 18, 2023
f68e9e9
docs: homepage update
AdrianaCeric Sep 18, 2023
92491db
Merge branch 'new-documentation' of https://github.com/ibi-group/data…
AdrianaCeric Sep 18, 2023
9149d82
docs: add externally-hosted images
AdrianaCeric Sep 18, 2023
f249965
fix: address pr feedback
AdrianaCeric Nov 29, 2023
da4178b
docs: transformation types text
AdrianaCeric Nov 30, 2023
d01f176
docs: add drop shadow to screenshots
AdrianaCeric Nov 30, 2023
75fa3f2
docs: edit settings disclaimer
AdrianaCeric Dec 8, 2023
0ddc52c
docs: add new transformations to list
AdrianaCeric Dec 8, 2023
3b0eca6
docs: appease mkdocs
AdrianaCeric Dec 8, 2023
1339dd4
docs: style auth0 image
AdrianaCeric Dec 8, 2023
f57131d
refactor(linting): try updating import manually
philip-cline Dec 8, 2023
7269998
refactor(docs): add missing files to nav
philip-cline Dec 11, 2023
8c35bd2
refactor(docs): use s3 link
philip-cline Dec 11, 2023
d01f2d4
docs: add styling to feed-transformation-summary + remove local image
AdrianaCeric Dec 11, 2023
eddec9a
docs: Change to TRANSIT-data-tools + change select to click
AdrianaCeric Dec 13, 2023
cadfe72
docs: fix grammar
AdrianaCeric Dec 13, 2023
6be9132
docs: remove all non-docs changes
AdrianaCeric Dec 14, 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
2 changes: 1 addition & 1 deletion docs/dev/api_interaction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# API Interaction Transcript
# API Interaction
The following is a set of instructions on API calls needed to upload and validate
a feed, wait for the tasks' completion, and then browse its contents. All of the
endpoints needed to load and process a GTFS file are REST-based. The endpoints
Expand Down
19 changes: 11 additions & 8 deletions docs/dev/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Auth0 is used for authentication in the application. If you don't need authentic
- Application level
- Allowed Callback URLs
- Allowed Origins (CORS)
- keep all other default settings
- Keep all other default settings

#### Creating your first user
Create your first Auth0 user through Auth0 web console (Users > Create User). In
Expand Down Expand Up @@ -141,32 +141,32 @@ AUTH0_DOMAIN: your-auth0-domain.auth.com
AUTH0_CLIENT_ID: your-auth0-client-id
```

Update the following properties in `datatools-server` `env.yml` to reflect the secure Auth0 application settings.
Update the following properties in `datatools-server` and `env.yml` to reflect the secure Auth0 application settings.

**Note:** for older Auth0 accounts/tenants, it is possible to use the Auth0 secret token, which uses the HS256 algorithm, but newer Auth0 tenants will need to specify the absolute path of their `.pem` file in the `AUTH0_PUBLIC_KEY` property. This public key only needs to be downloaded one time for your Auth0 tenant at `https://[your_domain].auth0.com/pem`.
**Note:** For older Auth0 accounts or tenants, utilizing the Auth0 secret token with the HS256 algorithm is possible. However, newer Auth0 tenants will need to specify the absolute path of their `.pem` file in the `AUTH0_PUBLIC_KEY` property. This public key only needs to be downloaded one time for your Auth0 tenant at `https://[your_domain].auth0.com/pem`.
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

```yaml
AUTH0_SECRET: your-auth0-client-secret # used for pre-September 2017 Auth0 accounts
AUTH0_PUBLIC_KEY: /location/of/auth0-account.pem # used for post-September 2017 Auth0 accounts
AUTH0_TOKEN: your-auth0-api-token
```

**Note**: to generate the `api_token`, go to Documentation > Management API. After adding scopes, your token will appear in the input field.
**Note**: To generate the `api_token`, go to Documentation > Management API. After adding scopes, your token will appear in the input field.

![Auth0 token generator](../img/auth0-token-generator.png)
<img src="https://datatools-builds.s3.amazonaws.com/docs/auth0/auth0-token-generator.png" style="box-shadow: 3px 3px 3px gray; border-radius: 10px;">

To allow for the creation, deletion and editing of users you must generate a token for the following scopes:

- **users**:
- read, update, create and delete
- **users_app_metadata**:
- read, update, create and delete`
- read, update, create and delete

#### Auth0 Post-Login Action Configuration: making `app_metadata` and `user_metadata` visible via token

If using OIDC-conformant clients/APIs (which appears to be mandatory for new Auth0 tenants), you must set up a custom Auth0 action to add `app_metadata` and `user_metadata` to the user's id token (Note: this is not the default for older, "legacy" Auth0 accounts).

To set up the action, go to Actions > Flows > Login, then under Add action > Custom, click Create Action. Fill in the action name and pick a recommended runtime, and click Create. Modify the function `onExecutePostLogin` as follows, then click Save Draft:
To set up the action, go to Actions > Flows > Login, then under Add action > Custom, click on `Create Action`. Fill in the action name and pick a recommended runtime, and click on `Create`. Modify the function `onExecutePostLogin` as follows, then click Save Draft:

```js
exports.onExecutePostLogin = async (event, api) => {
Expand All @@ -177,6 +177,8 @@ exports.onExecutePostLogin = async (event, api) => {
}
};
```
If you want the rule to apply only to specific clients, you can retain the conditional block that checks the `context.clientID` value. Otherwise, you can remove this conditional block if it's not needed.
This rule will ensure that app_metadata and user_metadata are included in the user's token, as required for OIDC-conformant clients/APIs in new Auth0 tenants.
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

You can test the action with mock token data using the Test tab. Once ready, click Deploy, then click Back to Flow.
In the diagram, drag the action between the Start and Complete steps, then click Apply.
Expand Down Expand Up @@ -307,6 +309,7 @@ extensions:
```

### Integration with [TransitFeeds](http://transitfeeds.com/)
**Note**: TransitFeeds is not regularly updated and is being replaced by the [MobilityData Database](https://database.mobilitydata.org/)

Ensure that the `extensions:transitfeeds:enabled` flag is set to `true` in
`config.yml`, and provide your API key:
Expand All @@ -317,4 +320,4 @@ extensions:
enabled: true
api: http://api.transitfeeds.com/v1/getFeeds
key: your-api-key
```
```
2 changes: 1 addition & 1 deletion docs/dev/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Adding translations for a new language
To add support for a new language, you need to perform the following steps:

1. Create a new language file in folder `i18`, e.g. by copying the `english.yml`.
1. Create a new language file in folder `i18n`, e.g. by copying the `english.yml` file.
2. In the newly created `<new language>.yml`, adapt the first two lines: `_id` should conform to the ISO 639 language code, `_name` to the localized language name.
3. In `lib/common/util/config.js`, add the import of the new language file at the mark `// Add additional language files here.` Mind to add an `// $FlowFixMe` hint before the new line to make the linter happy
4. Translate all messages in the `<new language>.yml` file. Note, that names surrounded by percent characters (`%`) denote parameters and must not be translated.
Expand Down
Binary file removed docs/img/add-fare-zone.png
Binary file not shown.
Binary file removed docs/img/auth0-token-generator.png
Binary file not shown.
Binary file removed docs/img/configure-feed-transformations.png
Binary file not shown.
Binary file removed docs/img/create-project.png
Binary file not shown.
Binary file removed docs/img/create-user.png
Binary file not shown.
Binary file removed docs/img/edit-calendars.png
Binary file not shown.
Binary file removed docs/img/edit-fare-rules.png
Binary file not shown.
Binary file removed docs/img/edit-fares.png
Binary file not shown.
Binary file removed docs/img/edit-frequencies.png
Binary file not shown.
Binary file removed docs/img/edit-patterns.png
Binary file not shown.
Binary file removed docs/img/edit-routes.png
Binary file not shown.
Binary file removed docs/img/edit-stops.png
Binary file not shown.
Binary file removed docs/img/edit-timetables.png
Binary file not shown.
Binary file removed docs/img/feed-profile.png
Binary file not shown.
Binary file removed docs/img/feed-version-navigator.png
Binary file not shown.
Binary file removed docs/img/otp-deployment-diagram.png
Binary file not shown.
Binary file removed docs/img/password-reset-logged-in.png
Binary file not shown.
Binary file removed docs/img/password-reset-logged-out.png
Binary file not shown.
Binary file removed docs/img/pattern-add-stop.png
Binary file not shown.
Binary file removed docs/img/pattern-insert-stop.png
Binary file not shown.
Binary file removed docs/img/pattern-shape-panel.png
Binary file not shown.
Binary file removed docs/img/pattern-stop-order.png
Binary file not shown.
Binary file removed docs/img/pattern-stop-toolbar.png
Binary file not shown.
Binary file removed docs/img/project-profile.png
Binary file not shown.
Binary file removed docs/img/quick-access-toolbar.png
Binary file not shown.
Binary file removed docs/img/schedule-exception.png
Diff not rendered.
Binary file removed docs/img/schedule-toolbar.png
Diff not rendered.
Binary file removed docs/img/select-trips.png
Diff not rendered.
Binary file removed docs/img/timetable-selector.png
Diff not rendered.
Binary file removed docs/img/user-admin.png
Diff not rendered.
Binary file removed docs/img/user-profile.png
Diff not rendered.
Binary file removed docs/img/view-all-stops.png
Diff not rendered.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

The IBI Transit Data Tools suite provides web-based tools for creating, managing, evaluating, and publishing transit data, specifically data stored in the General Transit Feed Specification (GTFS) format.
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

![screenshot](img/feed-profile.png)
![feed-profile](https://datatools-builds.s3.amazonaws.com/docs/intro/feed-profile.png)

To get started, click a topic from the table of contents on the left pane.
To get started, click on a topic from the table of contents on the left pane.
34 changes: 29 additions & 5 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
img[alt=screenshot] { width: 100%; }
body {
font-family: Arial, Helvetica, sans-serif;
}

/*Ignore first heading in page in TOC list*/
li.toctree-l3:first-child {
display: none;
h1, h2, h3 {
color: #015f97;
font-family: Arial, Helvetica, sans-serif;
}

.img-center {
width: 300px;
margin-left: auto;
margin-right: auto;
width: 300px;
}

/* Make all images responsive */
img {
display: block;
margin: auto;
}

img[alt=screenshot] {
width: 100%;
}

/* Center all iframes */
iframe {
display: block;
margin: 12px auto;
}

/* Ignore the first heading in the page in TOC list */
li.toctree-l3:first-child {
display: none;
}

6 changes: 3 additions & 3 deletions docs/user/deploying-feeds.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ To deploy or update GTFS feeds to OTP:
1. Open a project.
2. Click on the `Deployments` tab.
3. (Optional) To create a new deployment, click `+ New Deployment`, enter a name, then press or click Enter.
4. Click the name of the deployment to execute. A summary of feeds and existing deployments (if available) are shown for your review.
4. Click on the name of the deployment to execute. A summary of feeds and existing deployments (if available) are shown for your review.
5. Remove the feeds you don't need from the deployment. For the remaining feeds, select the correct feed version.
6. In the `OTP Configuration` pane:
* Select the latest OTP version (the first one in the list).
* Check `Build graph only` to only generate and output a graph file on EC2 to the S3 server (no OTP server will be running after the graph is generated).
* The R5 option is not used.
7. If you select `Custom` under `Build configuration` or `Router configuration`, enter the desired configuration settings.
8. Click the `Deploy` dropdown at the top of the main pane, then pick the server on which to perform the deployment. Existing deployments on that server will be discarded.
8. Click on the `Deploy` dropdown at the top of the main pane, then pick the server on which to perform the deployment. Existing deployments on that server will be discarded.

## Updating the Custom Places Index

Expand All @@ -32,7 +32,7 @@ The pane also has an option to upload Custom POI CSV files. These files contain

## Watching deployments take place

After click Deploy, you can watch the deployment progress from the right-hand panel:
After you click on `Deploy`, you can watch the deployment progress from the right-hand panel:
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

1. The data bundle is uploaded to S3.
2. One EC2 server is commissioned.
Expand Down
43 changes: 0 additions & 43 deletions docs/user/editor/calendars.md

This file was deleted.

51 changes: 33 additions & 18 deletions docs/user/editor/fares.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
# Fares

## Editing fares
### Fare attributes
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

To begin editing fares, click the fare ticket button on the lefthand navigation bar.
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

![screenshot](../../img/edit-fares.png)
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.

Choose a fare from the list to begin editing. To create a new fare, click `+ New fare`. **Note:** as with all newly created items (except patterns), the new fare will not be saved until the save icon (💾) is clicked.

## Fare attributes
## Editing/Creating Fares

Fare attributes describe the basic information about a fare. Full details on fare attributes can be found at the [GTFS specification reference](https://developers.google.com/transit/gtfs/reference/fare_attributes-file).
To begin editing fares, click the fare ticket button on the lefthand navigation bar (outlined in red).

## Fare rules
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, select `+ Create first fare` (highlighted in yellow).

To edit fare rules, you must first create and save a fare with attributes. After choosing a fare, click the `Fare rules` tab and define one or more rules for this fare using the following types:
![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 inputted, like `fare_id`, `price` and `currency_type`.
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

**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.**

### Edit fare rules

To define fare rules, you must first create fare zones, which is explained in the next section.
AdrianaCeric marked this conversation as resolved.
Show resolved Hide resolved

To edit fare rules, you must first create and save a fare with attributes. After choosing a fare, click the `Rules` tab and define one or more rules for this fare using the following types:

1. **Route** - applies to any itinerary that includes the route
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

**Note:** fare rules can be tricky, see the [GTFS specification reference](https://developers.google.com/transit/gtfs/reference/fare_rules-file) for more information on how fare rules apply.
<div class="img-center">
![screenshot](../../img/edit-fare-rules.png)
</div>
<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">

### Creating fare zones

## 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.

To create a fare zone for use in fare rules, you must first select a stop that you would like to include in the zone. 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.
<div class="img-center">
![screenshot](../../img/add-fare-zone.png)
</div>
<img src="https://datatools-builds.s3.amazonaws.com/docs/fares/add-fare-zone.png" style="box-shadow: 3px 3px 3px gray; border-radius: 10px;">

Once created and assigned to one or more stop, fare zones can be used when defining fare rules for **From/to zone** or **Contains zone**.
### 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>
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Introduction
# Getting Started

## Getting started

The GTFS Editor (or Editor) allows users to edit GTFS feeds imported from the Data Manager (see [Loading Feed Versions into Editor](../../user/managing-projects-feeds/#loading-feed-versions-into-editor)) or create GTFS feeds completely from scratch.
The GTFS Editor (or Editor) allows users to edit GTFS feeds imported from the Data Manager (see [Managing Project & Feeds](../managing-projects-feeds.md)) or create GTFS feeds completely from scratch.

## Saving in the Editor

Expand All @@ -12,6 +10,8 @@ When editing routes, stop, calendars, and any other entities in the Editor, you

The primary tables in GTFS (feed info, routes, stops, calendars, and fares) all correspond to items in the lefthand navigation bar, which allow you to create, edit, or delete records for each of these tables.

![nav-bar](https://datatools-builds.s3.amazonaws.com/docs/intro/nav-bar.png)

Some tables are nested underneath these primary tables. Here's how to find them and what they're called in the Editor:

- **[Routes](routes)**
Expand All @@ -24,10 +24,9 @@ Some tables are nested underneath these primary tables. Here's how to find them

## Quick access toolbar

In the bottom, righthand corner of the Editor, you'll find the quick access toolbar that has a few convenient features you might need while editing.
<div class="img-center">
![quick access toolbar](../../img/quick-access-toolbar.png)
</div>
In the bottom, righthand corner of the Editor, you'll find the quick access toolbar that has a few convenient features:

<img src="https://datatools-builds.s3.amazonaws.com/docs/intro/quick-access-toolbar.png" style="box-shadow: 3px 3px 3px gray; border-radius: 10px; width: 500px;">

From left to right, these functions are:

Expand Down
Loading
Loading