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

Linking the "Institutions" and "Vessel" lists #81

Open
eriffon opened this issue Mar 12, 2024 · 4 comments
Open

Linking the "Institutions" and "Vessel" lists #81

eriffon opened this issue Mar 12, 2024 · 4 comments

Comments

@eriffon
Copy link
Contributor

eriffon commented Mar 12, 2024

I'd like to briefly discuss what would be the most suitable way of linking the "Institutions" and "Vessel" lists in the "Default metadata" section of the "General" tab in the "Setup" section. For me, it would make sense to link these two lists, so that if I choose a specific institution, then all vessels associated with that institution are displayed in the "Vessel" drop-down box.

I think it makes sense to replace the institution and vessel lists in hyo2/ssm2/lib/base/setup_sql.py with a Python dictionary. But I do have one questions pertaining to the existing default institution and vessel lists. Are all currently listed vessel associated with both NOAA and UNH?

@giumas
Copy link
Collaborator

giumas commented Mar 15, 2024

As you may have noticed, both the institution and the vessel fields are an editable combo box in the settings' general tab.
It may make sense to reduce the listed vessels based on the selected institution (to avoid scrolling a long list!).
Said that, I would keep the combo box editable to avoid to only be allowed to select from the listed vessels.

And yes, the currently listed vessels are all NOAA ones.

@eriffon
Copy link
Contributor Author

eriffon commented Mar 18, 2024

I definitely agree with keeping the combo boxes editable.

I'll get working on this feature and issue a pull request when it's done. So just to make sure, all current vessels should be associated only with "NOAA Office of Coast Survey" and none with "UNH CCOM/JHC"? Or should all current vessels be associated with both institutions? In other works should this feature be a "1-to-many" or a "many-to-many" relationship?

In the long term, I wonder if it might be more convenient to have a mechanism that lets users customize their own institutions/vessels list. This would ease the demand on SoundSpeedManager developers to have the hard code the lists.

@giumas
Copy link
Collaborator

giumas commented Mar 18, 2024

All the current vessels should be associated to "NOAA Office of Coast Survey".
I am looking forward for the PR.

About the long term plan, it really depends on the number of 'institutions' that will actually use this feature.

@eriffon
Copy link
Contributor Author

eriffon commented Mar 18, 2024

Thanks for your answer.

About the long term plan, let's just leave it as a thought for now.

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

No branches or pull requests

2 participants