NASA-IMPACT / nasa-apt

Code and issues relevant to the NASA APT project
Apache License 2.0
6 stars 0 forks source link

ATBD title naming convention #863

Closed bwbaker1 closed 1 month ago

bwbaker1 commented 5 months ago

Description

Currently there is no ATBD naming conventions but is needed. Scientists are naming completely different ATBDs the exact same or mostly the same. For example, Inherent Optical Properties and Inherent Optical Properties (IOPs) are different ATBDs. These examples are the same scientist/science team, but this could be an issue with other science teams also producing a similar ATBD.

One solution is to force all ATBD titles to be unique similar to how the ATBD alias currently are. However, that may bring up other issues further down the line.

Acceptance Criteria

wrynearson commented 3 months ago

Hi @bwbaker1, is the goal here to make sure that no two document titles are the same, or that ATBDs follow a standardized naming convention/format? Depending on the goal, we could approach this differently.

If we were to enforce unique titles, I think we could do so similarly to how we check for unique aliases.

https://github.com/NASA-IMPACT/nasa-apt/blob/bfc2832e0cb97a7f25d149f9faf828ea969a7cf5/app/crud/atbds.py#L104-L117

@thenav56 is that correct?

If so, we would also need to think about how to handle existing document titles.

thenav56 commented 3 months ago

Yes, we can add a unique title check to the API, similar to the alias check. We have separate APIs for ATBD and its versions, so adding this new check won't affect existing ATBDs until they are updated.

bwbaker1 commented 3 months ago

@wrynearson The goal is to make sure no two documents have the same title.

@thenav56 That is good to know because it is best if existing documents are not affected until they are updated.

Thanks for the quick responses!

wrynearson commented 2 months ago

@bwbaker1, this is ready to go on staging, but we'll wait to merge it until you decide the best way to notify users that their ATBD titles should be changed. I assume you'd ask the ones that need to be renamed to do so, but other solutions could work.

bwbaker1 commented 2 months ago

@wrynearson I will send an email and let the users know. This can be merged into staging. Also, is there an error message provided when a title is not unique? Perhaps something such as "The provided ATBD title is not available. Titles must be unique."

wrynearson commented 1 month ago

I've updated the names of documents to be unique on staging except for two, which share the "Untitled Document" title. Here are the issues:

We need to rename one of these documents before merging https://github.com/NASA-IMPACT/nasa-apt/pull/880

wrynearson commented 1 month ago

For https://nasa-apt.surge.sh/documents/123/v1.0, it looks like it's not in the database, but the frontend shows it in the dashboard...