openlibhums / openlibhums/janeway
Refactor galley filtering by type
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 238
- Forks
- 97
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
Currently we store a type field against the Galley object. This is used in various places including as part of the metrics system.
Describe the solution you'd like
- Drop the
typefield from theGalleyobject - Add a new property called
typethat can return a value based onGalley.file.mime_type - Update queries across Janeway to use
Galley.file.mime_type
Additional context
This will require checking all plugins that make use of Galley.type for queries
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Galley model and searching Janeway and its plugins for Galley.type queries and other uses. Trace how Galley.file.mime_type is available before updating the model and callers. Done means the stored field is removed, the new property derives its value from the file MIME type, and all affected queries use that source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100