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

Abstract/de-duplicate species data #87

Closed
MattIPv4 opened this issue Dec 10, 2024 · 0 comments · Fixed by #100
Closed

Abstract/de-duplicate species data #87

MattIPv4 opened this issue Dec 10, 2024 · 0 comments · Fixed by #100
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MattIPv4
Copy link
Member

MattIPv4 commented Dec 10, 2024

Currently, we store species/scientific/iucn/native for each ambassador, though this data is the same for all ambassadors of the same species. When lifespan was added (#83), this was abstracted/de-duplicated for species, but only this property.

Create a new species.ts file with a constant that has keys matching lifespans.ts, with each property having name (species from ambassadors.ts), scientific, iucn, native + lifespan properties defined.

Use a key-value relationship similar to what is done for enclosure (and soon class in #86), with a getSpecies getter for the data and isSpecies as a type-guard for the key.

This will require PRs into the website and extension as this will be a breaking change for how we access this data (now needing to use species via getSpecies, which will then return all the nested abstracted/de-duplicated data).

@MattIPv4 MattIPv4 added enhancement New feature or request help wanted Extra attention is needed labels Dec 10, 2024
flakey5 added a commit to flakey5/alveusgg-data that referenced this issue Dec 24, 2024
flakey5 added a commit to flakey5/alveusgg-data that referenced this issue Dec 24, 2024
flakey5 added a commit to flakey5/alveus-extension that referenced this issue Dec 24, 2024
flakey5 added a commit to flakey5/alveusgg that referenced this issue Dec 25, 2024
flakey5 added a commit to flakey5/alveus-extension that referenced this issue Dec 25, 2024
flakey5 added a commit to flakey5/alveusgg that referenced this issue Dec 26, 2024
flakey5 added a commit to flakey5/alveusgg that referenced this issue Dec 31, 2024
MattIPv4 added a commit to alveusgg/alveusgg that referenced this issue Dec 31, 2024
* Use de-duplicated species data methods

Re alveusgg/data#87

Signed-off-by: flakey5 <[email protected]>

* add v2 prop to ambassadors endpoint

Signed-off-by: flakey5 <[email protected]>

* update

Signed-off-by: flakey5 <[email protected]>

* bump data version

Signed-off-by: flakey5 <[email protected]>

* type fix

Signed-off-by: flakey5 <[email protected]>

* Apply suggestions from code review

Co-authored-by: Matt Cowley <[email protected]>

* format

Signed-off-by: flakey5 <[email protected]>

---------

Signed-off-by: flakey5 <[email protected]>
Co-authored-by: Matt Cowley <[email protected]>
MattIPv4 added a commit to alveusgg/extension that referenced this issue Dec 31, 2024
* Use de-duplicated species data methods

Re alveusgg/data#87

Signed-off-by: flakey5 <[email protected]>

* update

Signed-off-by: flakey5 <[email protected]>

* bump data version

Signed-off-by: flakey5 <[email protected]>

---------

Signed-off-by: flakey5 <[email protected]>
Co-authored-by: Matt Cowley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant