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

Open
MattIPv4 opened this issue Dec 10, 2024 · 0 comments
Open

Abstract/de-duplicate species data #87

MattIPv4 opened this issue Dec 10, 2024 · 0 comments
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
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

No branches or pull requests

1 participant