openlibhums / openlibhums/janeway

Refactor galley filtering by type

Open
#3,579 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Infrastructure janeway 2.0 refactoring Size XL
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 type field from the Galley object
  • Add a new property called type that can return a value based on Galley.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.