Skip to content

Added ability to propose a Hornbostel-Sachs number#511

Draft
PouyaMohseni wants to merge 12 commits intodevelopfrom
add-hbs
Draft

Added ability to propose a Hornbostel-Sachs number#511
PouyaMohseni wants to merge 12 commits intodevelopfrom
add-hbs

Conversation

@PouyaMohseni
Copy link
Contributor

@PouyaMohseni PouyaMohseni commented Jan 30, 2026

This update modifies the current instrument model because HBS entries now require reviewer validation. The implementation allows:

  • Any user to propose an HBS number if no validated HBS exists.
  • Only one contribution per user is allowed; if more, reflected as edits.
  • Once reviewed, the main HBS is flagged, which is reflected in the instrument model and no HBS proposals is allowed after.
  • Previous proposals are shown in addClass.html to reduce the probability of duplicates.

resolves #496

Examples:
UI for proposing an HBS:
Screenshot 2026-01-29 at 6 22 54 PM

Basic validation function:
Screenshot 2026-01-29 at 6 25 02 PM

Show proposals of other users:
Screenshot 2026-02-05 at 12 46 34 PM

Contributor view when the proposal is under review:
Screenshot 2026-01-29 at 6 25 18 PM

@yinanazhou
Copy link
Member

This overlaps with the new instrument feature. I recommend you to hold this now.

- Added HornbostelSachs model with fields: instrument FK, hornbostel_sachs_class, contributor, is_main, review_status, on_wikidata
- Linked HornbostelSachs to Instrument model via FK
- Auto-update instrument main HBS and unset others on save
- Handle add-class modal and form
- Update NameValidator to validate HBS input
- Posts classification through instrument/<int:pk>/names/ endpoint
- show main Hornbostel-Sachs class on instrument detail page
- add buttons to propose or edit HBS if authenticated
- include addClass.html partial
- Enable list filtering by `review_status`
- Restrict editable fields for users in the 'reviewer' group
- proposals are linked to the input to make them easier to be edit
@PouyaMohseni PouyaMohseni marked this pull request as ready for review February 27, 2026 03:59
@yinanazhou
Copy link
Member

Please make sure all the checks pass before marking ready for review

@PouyaMohseni PouyaMohseni marked this pull request as draft March 8, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: a button to edit/add HBS number

2 participants