Allow marking projects as "archived" #17005
Open
+417
−166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this?
Following the discussion here, this PR shows what the implementation could look like for adding "status markers" to projects.
Specifically, this PR allows changing a project's status to "Archived".
Details
The implementation is straightforward, since a
Project.lifecycle_status
field already exists (to mark a project as quarantined). This change adds a new "archived" value for that field, and adds the UI so that users can change the project status (only for "archived" and "no status": users should not be able to quarantine a project nor modify a quarantined project).Even though the issue mentioned above proposes more statuses ("deprecated", "finished", etc), those can be ambiguous and overlapping, and would require further discussion to define clearly. "Archived", however, is already widely used on GitHub repos and its meaning should be easy for users to understand:
On PyPI, this could also mean disallowing uploads after a project has been marked as archived, but this PR only implements the UI changes and adds the new field. Adding restrictions based on the status should be done in a future PR.
Screenshots
Project settings
Project landing page
cc @woodruffw @miketheman