Add category override mapping and use it in library update method (#1411)

Fixes #1034

- Adds a `CATEGORY_OVERRIDES` mapping
- Uses the override in `update_libraries` management command

### Manual testing
- Ran `./manage.py import_versions`
- Ran `./manage.py update_libraries`
- Static String had the correct category
<img width="440" alt="Screenshot 2024-11-04 at 5 24 05 PM"
src="https://github.com/user-attachments/assets/4b0cf4cb-15e2-4337-9284-7659afd40643">

### Post-deploy tasks
- Ensure `update_libraries` is run
- Verify **Container** category is orphaned
- Delete **Container** category

Co-authored-by: Greg Kaleka <gkaleka@energy-solution.com>
This commit is contained in:
Greg Kaleka
2024-11-05 13:49:00 -05:00
committed by GitHub
parent 8fc8c02185
commit 44829f1556
5 changed files with 25 additions and 8 deletions

View File

@@ -21,15 +21,15 @@ Not all tags are official GitHub **Releases**, however, and this impacts where w
To retrieve releases and tags, run:
```bash
./manage.py import_releases
./manage.py import_versions
```
This will:
Note the command enqueues a celery task rather than running synchronously. The task will:
- Delete existing Versions and LibraryVersions
- Delete existing Versions and LibraryVersions if you pass `--delete-versions` to the command
- Retrieve tags and releases from the Boost GitHub repo
- Create new Versions for each tag and release that is not a beta or rc release
- Create a new LibraryVersion for each Library **but not for historical versions**
- Create a new LibraryVersion for each Library (including for historical versions unless you pass `--new`)
## Library data