Use better types to describe "dandiset" and "versions"
- Dominant language
- Python
- Stars
- 26
- Forks
- 21
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 14
Description
In the definition of the Dandiset store type, both `dandiset` and `versions` are typed as `Version`:
https://github.com/dandi/dandi-archive/blob/741b5ac387b2f033d0ff2a928df7241bc43e1764/web/src/stores/dandiset.ts#L20-L21
but the `dandiset` value always carries a `metadata` field, while the `versions` values never do, resulting in the `metadata` field being marked as optional:
https://github.com/dandi/dandi-archive/blob/741b5ac387b2f033d0ff2a928df7241bc43e1764/web/src/types/index.ts#L48
This seems to be bad typing and should be fixed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with web/src/stores/dandiset.ts around lines 20–21 and web/src/types/index.ts around line 48. Separate the types used for the dandiset value and the versions values so the dandiset metadata field is required while version entries do not include it; verify the web type checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100