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

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

emileten
Copy link

@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
Collaborator

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

@emileten
Copy link
Author

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

@emileten
Copy link
Author

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

@@ -8,11 +8,8 @@
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
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
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
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?

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
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
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
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.

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.

4 participants