Skip to content

Commit

Permalink
Merge pull request #1466 from cityofaustin/v2.22.0-release-candidate
Browse files Browse the repository at this point in the history
v2.22.0 Trinity River
  • Loading branch information
mddilley authored Oct 24, 2024
2 parents 4cb1d36 + 38d2baf commit c6f37f1
Show file tree
Hide file tree
Showing 29 changed files with 1,853 additions and 78 deletions.
110 changes: 104 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,118 @@
# Moped
### A comprehensive project tracking platform for Austin's mobility projects
🛵 🗺 👷 🚌 🚧 🚴 📊

### Resources
### A comprehensive project tracking platform for Austin's mobility projects

🛵 🗺 👷 🚌 🚧 🚴 📊

## Resources

- [About](https://austinmobility.io/products/5086)
- [Documentation](https://atd-dts.gitbook.io/moped-documentation)
- [Backlog](https://github.com/cityofaustin/atd-data-tech/issues?q=is%3Aopen+label%3A%22Product%3A+Moped%22+-label%3A%22Workgroup%3A+TPW%22)

### Environments
## Environments

- Production: [https://mobility.austin.gov/moped/](https://mobility.austin.gov/moped/)
- Staging: [https://moped.austinmobility.io/moped/](https://moped.austinmobility.io/moped/)
- Test: [https://moped-test.austinmobility.io/moped/](https://moped-test.austinmobility.io/moped/)

For resources and updates, see the [Mobility Project Database project index](https://github.com/cityofaustin/atd-data-tech/issues/307).
For resources and updates, see the [Mobility Project Database project index](https://github.com/cityofaustin/atd-data-tech/issues/307).

![Post-it notes of users' desired Moped functionality and outcomes](https://user-images.githubusercontent.com/1463708/62583080-58614e80-b874-11e9-850d-2a8bda07c0fc.jpeg)

---
## Quick start

Welcome to the 🛵 Moped codebase! Below is a step-by-step guide to help you get started by setting up the Moped environment.

### Prerequisites

Before you begin, make sure you have the following installed on your system:

- **Git**: To clone the repository.
- **Docker**: Moped uses Docker for container management.
- **Hasura CLI**: Required for managing the Hasura cluster.

### Setting Up Moped

1. **Install Hasura CLI**

- Install the Hasura CLI by running the following command:

```bash
curl -L <https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh> | bash

```

- Ensure it installs version `2.42.0` or later.

2. **Start the Hasura Cluster**

- Navigate to the `moped-database` directory:

```bash
cd moped-database
```

- Start the Hasura cluster using Docker:

```bash
./hasura-cluster start
```

- If you encounter errors related to migrations, you can try the following:

```bash
./hasura_cluster start_only
./run_migrations
./hasura-cluster start
```

3. **Run the Frontend React App**

- Navigate to the `moped-editor` directory:

```bash
cd moped-editor
```

- Install the necessary npm packages:

```bash
npm install
```

- Start the frontend development server:

```bash
npm start
```

- The application should open in your browser at `https://localhost:3000/moped`.

### Troubleshooting

- **Logging in**: The SSO Button is expected to be disabled in the local environment. Use the external user sign-in option instead and request test credentials from a team member.

## Learn more

- [Database](./moped-database/README.md) - the database that powers the Mobility Project Database suite
- [Editor](./moped-editor/README.md) - web application which enables City staff to browse and edit mobility project data
- [ArcGIS Moped Database Viewer](https://austin.maps.arcgis.com/apps/webappviewer/index.html?id=404d31d56b57491abe53ccfd718fcaee) - GIS map application that includes Moped Project Data as a layer (requires ArcGIS Online permissions)
- [API](./moped-api/README.md) - serverless Flask API, handling data operations and API requests
- [auth](./moped-auth/README.md) - manages authentication using AWS Cognito, including JWT token generation and validation for secure access control
- [etl](./moped-etl/README.md) - integration scripts for ArcGIS & Knack Data Tracker
- [toolbox](./moped-toolbox/README.md) - collection of utilities and scripts designed for ad-hoc maintenance tasks

## License

As a work of the City of Austin, this project is in the public domain within the United States.

Additionally, we waive copyright and related rights of the work worldwide through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).

Built by [Data & Technology Services](https://austinmobility.io/) at [Austin Transportation & Public Works](https://www.austintexas.gov/department/transportation-public-works)
8 changes: 7 additions & 1 deletion moped-database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ $ ./hasura-cluster stop

### Using production data

_Here are some docs in Gitbook that explain [How to load production data into a local instance](https://atd-dts.gitbook.io/moped-documentation/dev-guides/how-tos/how-to-load-production-data-into-a-local-instance)_

Configure your environment:

1. Copy the env_template file into env and fill in your credentials:
Expand Down Expand Up @@ -136,7 +138,7 @@ which contains the connection information for the local cluster. Notice the form

#### Views

To version control database views, SQL files are stored in `/views/` and the steps to modify a view and create a migration are available [here](/views/README.md).
To version control database views, SQL files are stored in `/views/` and the steps to modify a view and create a migration are available [here](./views/README.md).

### SQL Formatting

Expand All @@ -154,6 +156,10 @@ Format (ie, clean up all my indention and fix things you can fix automatically):

`sqlfluff format --config ../../.sqlfluff project_list_view.sql`

## How to connect the database with Postgres GUI tools (example: TablePlus, DBeaver, P etc)

_Here are some docs in Gitbook that explain [How to connect the database with Postgres GUI tools](https://atd-dts.gitbook.io/moped-documentation/dev-guides/how-tos/connecting-with-postgres-gui)_

## Read the docs

More documentation is available in the [MOPED Technical Docs](https://atd-dts.gitbook.io/moped-documentation/dev-guides/hasura)
Expand Down
2 changes: 1 addition & 1 deletion moped-database/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Architecture Independent Docker Stack Components for Moped Development Environment
services:
hasura:
image: hasura/graphql-engine:v2.43.0
image: hasura/graphql-engine:v2.44.0
depends_on:
- moped-pgsql
expose:
Expand Down
6 changes: 0 additions & 6 deletions moped-database/metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
- current_phase_name_simple
- ecapris_subproject_id
- feature_ids
- funding_source_name
- funding_sources
- geometry
- interim_project_component_id
Expand Down Expand Up @@ -108,7 +107,6 @@
- current_phase_name_simple
- ecapris_subproject_id
- feature_ids
- funding_source_name
- funding_sources
- geometry
- interim_project_component_id
Expand Down Expand Up @@ -189,7 +187,6 @@
- current_phase_name_simple
- ecapris_subproject_id
- feature_ids
- funding_source_name
- funding_sources
- geometry
- interim_project_component_id
Expand Down Expand Up @@ -5461,7 +5458,6 @@
columns:
- added_by
- children_project_ids
- completion_end_date
- components
- construction_start_date
- contract_numbers
Expand Down Expand Up @@ -5514,7 +5510,6 @@
columns:
- added_by
- children_project_ids
- completion_end_date
- components
- construction_start_date
- contract_numbers
Expand Down Expand Up @@ -5567,7 +5562,6 @@
columns:
- added_by
- children_project_ids
- completion_end_date
- components
- construction_start_date
- contract_numbers
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM public.moped_component_tags WHERE slug IN ('map_transit_enhancement_2025', 'map_transit_enhancement_2024', 'map_transit_enhancement_2023', 'map_transit_enhancement_2022');
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO public.moped_component_tags ("type", name, slug) VALUES
('MAP Transit Enhancement', '2022', 'map_transit_enhancement_2022'),
('MAP Transit Enhancement', '2023', 'map_transit_enhancement_2023'),
('MAP Transit Enhancement', '2024', 'map_transit_enhancement_2024'),
('MAP Transit Enhancement', '2025', 'map_transit_enhancement_2025');
Loading

0 comments on commit c6f37f1

Please sign in to comment.