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

try moving links back up #312

Merged
merged 6 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# repo owners

* @edasmalchi @owades @csuyat-dot
* @edasmalchi @vevetron @csuyat-dot
2 changes: 1 addition & 1 deletion .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
working-directory: ./tests
run: python test_report_data.py
- name: Prepare website build
run: cp -r tests/outputs/2022 reports/outputs/. && cp tests/fixtures/* reports/outputs/.
run: cp -r tests/outputs/2024 reports/outputs/. && cp tests/fixtures/* reports/outputs/.
- name: Run website build
working-directory: ./website
run: npm install && npm run build && cat build/index.html | grep "Monthly GTFS Quality Reports"
Expand Down
34 changes: 18 additions & 16 deletions templates/report.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@
</div>
{% endif %}
</div>

<div class="responsive-prose max-w-none">
<div class="my-8 flex gap-4">
<button type="button"
class="btn"
onclick="document.getElementById('feed-info-modal').showModal()">
Show Source URLs
</button>

{% if speedmap_url %}
<a class="btn" href="{{ speedmap_url }}" target="_blank">
View Speedmap
<i class="fas fa-external-link-alt ml-1"></i>
</a>
{% endif %}
</div>
</div>

{% if has_rt_feed %}
<div class="flex-1 responsive-prose">
<h2>About the Realtime Completeness Charts</h2>
Expand Down Expand Up @@ -198,22 +216,6 @@

</div>
{% endif %}
<div class="responsive-prose max-w-none">
<div class="my-8 flex gap-4">
<button type="button"
class="btn"
onclick="document.getElementById('feed-info-modal').showModal()">
Show Source URLs
</button>

{% if speedmap_url %}
<a class="btn" href="{{ speedmap_url }}" target="_blank">
View Speedmap
<i class="fas fa-external-link-alt ml-1"></i>
</a>
{% endif %}
</div>
</div>

{% call macros.render_dialog('feed-info-modal', 'Source URLs') %}
<div class="prose-ul:m-0 prose-li:m-0 prose-li:p-0 prose-p:m-0">
Expand Down
22 changes: 9 additions & 13 deletions tests/fixtures/index_report.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
[
{
"year": 2022,
"first_month": 11,
"last_month": 11,
"year": 2024,
"first_month": 7,
"last_month": 7,
"months": [
{
"month": 11,
"month": 7,
"reports": [
{
"agency_name": "City of Delano",
"itp_id": 91,
"report_path": "2022\/11\/91\/index.html",
"feeds": [
{
"gtfs_dataset_name": "Delano Schedule",
"string_url": "https:\/\/data.trilliumtransit.com\/gtfs\/delano-ca-us\/delano-ca-us.zip"
}
]
"agency_name": "City and County of San Francisco",
"itp_id": 282,
"report_path": "2024\/07\/282\/index.html",
"feeds":[
{"gtfs_dataset_name":"Bay Area 511 Muni Alerts","string_url":"https:\/\/api.511.org\/transit\/servicealerts?agency=SF"},{"gtfs_dataset_name":"Bay Area 511 Muni TripUpdates","string_url":"https:\/\/api.511.org\/transit\/tripupdates?agency=SF"},{"gtfs_dataset_name":"Bay Area 511 Muni Schedule","string_url":"https:\/\/api.511.org\/transit\/datafeeds?operator_id=SF"},{"gtfs_dataset_name":"Bay Area 511 Muni VehiclePositions","string_url":"https:\/\/api.511.org\/transit\/vehiclepositions?agency=SF"}]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/rt_feed_ids.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[[91, true]]
[[282, true]]
2 changes: 1 addition & 1 deletion tests/fixtures/speedmap_urls.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[]
[[282, "https://rt--cal-itp-data-analyses.netlify.app/district_04-oakland/03__speedmaps__district_04-oakland__itp_id_282"]]
4 changes: 2 additions & 2 deletions tests/test_report_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from generate_reports_data import generate_data_by_file_path # noqa: E402
from validate_reports import validate_files # noqa: E402

test_file = "outputs/2022/11/91/1_file_info.json"
test_file = "outputs/2024/07/282/1_file_info.json"

# Instead of unit tests, this generates a test output directory, then validates
# the data.
Expand All @@ -21,6 +21,6 @@
"4_file_check.json",
"5_validation_codes.json",
]
output_dir = "outputs/2022/11/91"
output_dir = "outputs/2024/07/282"
schema_dir = "schemas"
validate_files(output_dir, schema_dir, files)
Loading
Loading