Skip to content

Remove redundant /abstract/ route synonyms throughout the API#619

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-fab3f7ac-ebc8-41a4-86f7-1525f169427d
Draft

Remove redundant /abstract/ route synonyms throughout the API#619
Copilot wants to merge 2 commits intomainfrom
copilot/fix-fab3f7ac-ebc8-41a4-86f7-1525f169427d

Conversation

Copy link
Contributor

Copilot AI commented Aug 15, 2025

This PR removes all redundant /abstract/ route synonyms from the data API, addressing issue #618. These routes were serving the same documentation landing pages as their main /$resource counterparts, creating unnecessary duplication and potential confusion.

Changes Made

Removed 16 /abstract/ route decorators across 13 route files:

  • Single abstract routes removed (11 files): alfresco.py, beetles.py, boundary.py, degree_days.py, ecoregions.py, elevation.py, fire.py, hydrology.py, landfastice.py, permafrost.py, seaice.py
  • Multiple abstract routes removed:
    • taspr.py: Removed 3 abstract routes (/temperature/abstract/, /precipitation/abstract/, /taspr/abstract/)
    • wet_days_per_year.py: Removed 2 abstract routes (/wet_days_per_year/abstract/, /mmm/wet_days_per_year/abstract/)

Before and After

Before:

@routes.route("/degree_days/")
@routes.route("/degree_days/abstract/")  # Redundant
@routes.route("/degree_days/heating/")
def degree_days_about():
    return render_template("/documentation/degree_days.html")

After:

@routes.route("/degree_days/")
@routes.route("/degree_days/heating/")
def degree_days_about():
    return render_template("/documentation/degree_days.html")

Impact

  • No functional changes: All main /$resource routes continue to work exactly as before
  • Simplified routing: Eliminates confusion between duplicate routes serving identical content
  • Cleaner codebase: Removes 16 lines of redundant route definitions
  • No breaking changes: Only removes synonyms, doesn't affect existing functionality

All route files have been validated for correct Python syntax and the main documentation routes remain fully functional.

Closes #618


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: brucecrevensten <525049+brucecrevensten@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove /abstract/ route synonyms throughout Remove redundant /abstract/ route synonyms throughout the API Aug 15, 2025
Copilot AI requested a review from brucecrevensten August 15, 2025 18:42
Copy link
Member

@charparr charparr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff is all red, as expected. This seems like a reasonable, low-risk test drive of using agentic copilot to clean up a bit of cruft in the API. I'm OK with merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove /abstract/ route synonyms throughout

3 participants