Skip to content

remove outdated CMR, WMS, WMTS endpoints from app#105

Open
emileten wants to merge 6 commits intodevelopfrom
chore/remove-outdated-endpoints
Open

remove outdated CMR, WMS, WMTS endpoints from app#105
emileten wants to merge 6 commits intodevelopfrom
chore/remove-outdated-endpoints

Conversation

@emileten
Copy link
Copy Markdown

@emileten emileten commented Mar 19, 2024

addresses https://github.com/NASA-IMPACT/active-maap-sprint/issues/807

This PR removes outdated endpoints from the app :

  • CMR
  • WMS
  • WMTS

However, the task of removing all the internal, non-user facing logic related to these endpoints (e.g. api/endpoints/cmr.py, api/endpoints/wms.py, etc...) is left for the future.

I don't have a way to run and test this locally so I am minimizing the changes.

@bsatoriu bsatoriu changed the base branch from master to develop March 19, 2024 23:42
@bsatoriu
Copy link
Copy Markdown
Collaborator

Changed the base from master to develop in accordance with our git workflow.

@emileten
Copy link
Copy Markdown
Author

Just updated with the changes from develop and quickly checked things work locally.

@emileten
Copy link
Copy Markdown
Author

@bsatoriu it's ready for a review whenever you have time !

from api.cas.cas_auth import validate
from api.utils.environments import Environments, get_environment
from api.utils.url_util import proxied_url
from api.endpoints.cmr import ns as cmr_collections_namespace
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The cmr endpoints are still in use by the file api/endpoints/cmr.py

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

see my message below that answers this and the other comment

from api.endpoints.algorithm import ns as algorithm_namespace
from api.endpoints.job import ns as job_namespace
from api.endpoints.wmts import ns as wmts_namespace
from api.endpoints.wms import ns as wms_namespace
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we're removing these endpoints, we should also delete the files api/endpoints/wms.py and api/endpoints/wmts.py. Are these not being referenced in any registered algorithms?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

They would not be in algorithms, WMS and WMTS are visualization only endpoints not data access. If we want we can document that for visualization now users can utilize our Titiler services https://docs.maap-project.org/en/latest/technical_tutorials/visualizing.html

CC: @smk0033 we need a new ticket to update the docs with information about Titiler and how to get a url to data to the MAAP STAC

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

See my common comment below

@emileten
Copy link
Copy Markdown
Author

@bsatoriu answering here because I think the two comments are related.

Note : there may be a misunderstanding due to my lack of flask knowledge, if so, bear with me 😅

My intent was to remove access to selected API endpoints from the user, but without bothering removing the internal logic related to these endpoints. That is why, for example, for the CMR endpoint :

  1. I removed the cmr namespace from maapapp.py
  2. But I did not remove api/endpoints/cmr.py which contains all the CMR logic that (1) was pointing to.

The reason for doing (2) was initially that I wasn't able to run this app locally and therefore wanted to minimize changes; even though I am not able to run this (thanks!), the ticket I am trying to solve is about removing these endpoints, not more, so I kept this decision.

Let me know if you'd prefer to see the internal logic removed as well !

@bsatoriu
Copy link
Copy Markdown
Collaborator

bsatoriu commented Apr 2, 2024

@bsatoriu answering here because I think the two comments are related.

Note : there may be a misunderstanding due to my lack of flask knowledge, if so, bear with me 😅

My intent was to remove access to selected API endpoints from the user, but without bothering removing the internal logic related to these endpoints. That is why, for example, for the CMR endpoint :

  1. I removed the cmr namespace from maapapp.py
  2. But I did not remove api/endpoints/cmr.py which contains all the CMR logic that (1) was pointing to.

The reason for doing (2) was initially that I wasn't able to run this app locally and therefore wanted to minimize changes; even though I am not able to run this (thanks!), the ticket I am trying to solve is about removing these endpoints, not more, so I kept this decision.

Let me know if you'd prefer to see the internal logic removed as well !

@emileten sorry for the delay in responding. The CMR namespace and associated endpoints are still being used for granule searching and downloading, so I propose leaving the CMR namespace code and endpoints as-is. This is important functionality that is being used today by MAAP users.

For the WMS and WMTS endpoints, my proposal is to remove the associated endpoints in addition to the namespaces. Otherwise, we will have unreferenced, or 'orphaned' code in the API.

@sujen1412 sujen1412 requested a review from bsatoriu September 23, 2025 18:38
@sujen1412
Copy link
Copy Markdown
Collaborator

@bsatoriu - can you update this PR status ?
Merge or close?

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.

5 participants