DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

Chant create: optimize suggested chants feature #1579

Closed dchiller closed 1 month ago

dchiller commented 2 months ago

This PR eliminates all calls to the json-cid endpoint for the "suggested chants" feature on the Chant Create view. All data required for the suggested chants is now supplied directly in the response to the json-nextchants endpoint.

Given that we no longer need to make these extra calls, this PR also returns the number of suggested chants presented to at most 5 rather than at most 3.

Modifies tests and relevant mock data to conform to this change in endpoint behaviour.

In the process, adds a few development-related items:

Closes #1424

dchiller commented 2 months ago

Tests are currently failing because we install the "production" version on the test runner but use the development docker-compose file (which now requires a development dependency for the runserver_plus command). I'll solve.

dchiller commented 2 months ago

Ok, I think it makes the most sense to replicate the production environment on the test runner... so in that case we'll need to use a different command for the django container on the test runner.