-
Notifications
You must be signed in to change notification settings - Fork 3
Setup mkdocs #167
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
Merged
Merged
Setup mkdocs #167
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68640b7
Setup mkdocs for GTFS Module
ankoure aead267
Add docs for modules with docstrings
ankoure c2ae52b
updated colors and metadata
ankoure 2f6a538
Merge branch 'main' into setup-mkdocs
ankoure 1b74245
reference readme instead of copying
ankoure File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13" | ||
| - uses: astral-sh/setup-uv@v5 | ||
| - run: uv sync --group docs | ||
| - run: uv run mkdocs build | ||
| - if: github.ref == 'refs/heads/main' | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: site | ||
|
|
||
| deploy: | ||
| if: github.ref == 'refs/heads/main' | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Enqueue Utils | ||
|
|
||
| This page documents enqueue functions in the GTFS module. | ||
|
|
||
| ::: ingestor.chalicelib.gtfs.enqueue | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # GTFS Overview | ||
|
|
||
| This page documents the main `gtfs` module. | ||
|
|
||
| ::: ingestor.chalicelib.gtfs | ||
| rendering: | ||
| show_root_heading: true | ||
| show_root_full_path: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # GTFS Ingest | ||
|
|
||
| This page documents ingest functions in the GTFS module. | ||
|
|
||
| ::: ingestor.chalicelib.gtfs.ingest | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # GTFS Utils | ||
|
|
||
| This page documents utility functions in the GTFS module. | ||
|
|
||
| ::: ingestor.chalicelib.gtfs.utils | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Service Ridership Dashboard GTFS | ||
|
|
||
| This page documents gtfs functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.gtfs | ||
| rendering: | ||
| show_root_heading: true | ||
| show_root_full_path: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Ingest | ||
|
|
||
| This page documents ingest functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.ingest | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Queries | ||
|
|
||
| This page documents query functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.queries | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Ridership | ||
|
|
||
| This page documents ridership functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.ridership | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard S3 | ||
|
|
||
| This page documents S3 functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.s3 | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Service Levels | ||
|
|
||
| This page documents service level functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.service_levels | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Service Summary | ||
|
|
||
| This page documents service summary functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.service_summaries | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Summary | ||
|
|
||
| This page documents summary in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.summary | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Service Ridership Dashboard Time Series | ||
|
|
||
| This page documents time series functions in the Service Ridership Dashboard module. | ||
|
|
||
| ::: ingestor.chalicelib.service_ridership_dashboard.time_series | ||
| rendering: | ||
| show_root_heading: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # data-ingestion | ||
|
|
||
|  | ||
|  | ||
|  | ||
|
|
||
| This is an app that can host all our data crunching jobs, especially those that use s3. | ||
|
|
||
| It uses Chalice, which makes it easy to add new functions that can be triggered on an interval or via rest API endpoint. | ||
|
|
||
| So far we have: | ||
|
|
||
| - Store MBTA Alerts data daily. | ||
| - Store number of trips with new trains on Orange and Red line daily. | ||
| - Store Bluebikes station status data every 5 min. | ||
| - Store ridership data | ||
| - Process and store speed restrictions | ||
|
|
||
| To add a new lambda function, put the methods you need in a new file in chalicelib/. | ||
| Then add your trigger in app.py. | ||
| Then, add a policy.json file for any permissions you might need in .chalice/, updating .chalice/config.json accordingly. | ||
| Lastly, if you need secret environment variables, update resources.json and make sure they are passed | ||
| with --parameter-override in the cloudformation deploy step of deploy.sh. | ||
| (Non-secret envvars can be added to config.json directly.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| site_name: Data Ingestion | ||
| site_description: Automated data crunching jobs by TransitMatters | ||
| site_url: https://transitmatters.github.io/data-ingestion | ||
| repo_url: https://github.com/transitmatters/data-ingestion | ||
| repo_name: transitmatters/data-ingestion | ||
|
|
||
| theme: | ||
| name: material | ||
| palette: | ||
| - media: "(prefers-color-scheme: light)" | ||
| scheme: default | ||
| primary: red | ||
| accent: indigo | ||
| toggle: | ||
| icon: material/brightness-7 | ||
| name: Switch to dark mode | ||
| - media: "(prefers-color-scheme: dark)" | ||
| scheme: slate | ||
| primary: deep purple | ||
| accent: amber | ||
| toggle: | ||
| icon: material/brightness-4 | ||
| name: Switch to light mode | ||
| features: | ||
| - content.code.copy | ||
| - navigation.sections | ||
| - navigation.expand | ||
| - toc.follow | ||
|
|
||
| markdown_extensions: | ||
| - admonition | ||
| - pymdownx.details | ||
| - pymdownx.superfences: | ||
| custom_fences: | ||
| - name: mermaid | ||
| class: mermaid | ||
| format: !!python/name:pymdownx.superfences.fence_code_format | ||
| - pymdownx.highlight: | ||
| anchor_linenums: true | ||
| - pymdownx.inlinehilite | ||
| - toc: | ||
| permalink: true | ||
|
|
||
| plugins: | ||
| - search | ||
| - mkdocstrings: | ||
| handlers: | ||
| python: | ||
| paths: [src] | ||
| options: | ||
| show_source: true | ||
| show_root_heading: true | ||
| members_order: source | ||
| docstring_style: google | ||
|
|
||
| nav: | ||
| - Home: index.md | ||
| - API Reference: | ||
| - GTFS: | ||
| - Overview: api/gtfs/gtfs.md | ||
| - Utils: api/gtfs/utils.md | ||
| - Ingest: api/gtfs/ingest.md | ||
| - Enqueue: api/gtfs/enqueue.md | ||
| - Service Ridership Dashboard: | ||
| - GTFS: api/service_ridership_dashboard/gtfs.md | ||
| - Ingest: api/service_ridership_dashboard/ingest.md | ||
| - Queries: api/service_ridership_dashboard/queries.md | ||
| - Ridership: api/service_ridership_dashboard/ridership.md | ||
| - S3: api/service_ridership_dashboard/s3.md | ||
| - Service Levels: api/service_ridership_dashboard/service_levels.md | ||
| - Service Summaries: api/service_ridership_dashboard/service_summaries.md | ||
| - Summary: api/service_ridership_dashboard/summary.md | ||
| - Time Series: api/service_ridership_dashboard/time_series.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not just use the README? Or does it require being copied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question! Apparently we can reference the README instead of copying. I hadn't thought of that so thanks!