physionet-build icon indicating copy to clipboard operation
physionet-build copied to clipboard

Decide on a project slug before publication time

Open bemoody opened this issue 5 months ago • 1 comments

When a newly-created project is published, the editor is asked, at the very last possible moment, to choose a permanent public name (slug) for the project.

I dislike this and have wanted to fix it for a long time. For authors, the permanent URL shouldn't be a surprise. For editors, it'd be nice to have some coordination amongst the team on naming conventions, and to be able to check for typos. From the technical side, we may want to be able to prepare cloud resources (or even local resources, such as zip files) in advance of publication. Also we'd like to catch any technical errors in advance (issue #1401).

So here's what I'd do instead:

  • Add a slug field (null=True, unique=True) to the CoreProject.

  • When a project is accepted, if the CoreProject slug is null, prompt the editor to enter a slug.

  • When a project is archived, if the CoreProject has no published versions, then its slug should be reset to null.

  • After a project has been accepted and not published, if the CoreProject has no published versions, the editor may change the slug.

  • When the project is published, the new PublishedProject slug is copied directly from its CoreProject slug. (If the CoreProject slug is null, the project is not publishable.)

Eventually, we might also drop the slug field from the PublishedProject model.

bemoody avatar Mar 05 '24 18:03 bemoody