Skip to content

feat(#590): add "Testing Version" column to todo lists#675

Open
m1rm wants to merge 1 commit into
archlinux:masterfrom
m1rm:feat/590-testing-version-column-in-todo-lists
Open

feat(#590): add "Testing Version" column to todo lists#675
m1rm wants to merge 1 commit into
archlinux:masterfrom
m1rm:feat/590-testing-version-column-in-todo-lists

Conversation

@m1rm
Copy link
Copy Markdown
Contributor

@m1rm m1rm commented May 9, 2026

This PR adds the column "Testing Version" to /todos/:a_list containing the version of the package in the Testing Repo, if present.

Additionally, fixtures and tests are added.

Closes #590

…ude new fixtures for todolist

dev(archlinux#590): add missing fixtures for todo lists

cleanup

ci/cd: fix ruff
@m1rm m1rm force-pushed the feat/590-testing-version-column-in-todo-lists branch from c632ea0 to 970c545 Compare May 9, 2026 16:25
Copy link
Copy Markdown
Member

@christian-heusel christian-heusel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for working on this! 🤗 🚀 I have two small questions and will defer to the project maintainers for the overall verdict! 😄

Comment thread todolists/utils.py
# now build a lookup dict to attach to the correct package
lookup = {(p.pkgname, p.arch): p for p in testing_pkgs}

annotated = []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused, why is it there? 🤔

I see that it's also part of the logic in attach_staging(), but maybe you have some context of it now that you worked on attach_testing().

Comment thread todolists/utils.py
Comment on lines +60 to +75
def attach_testing(packages, list_id):
'''Look for any testing version of the packages provided and attach them
to the 'testing' attribute on each package if found.'''
pkgnames = TodolistPackage.objects.filter(
todolist_id=list_id).values('pkgname')
testing_pkgs = Package.objects.normal().filter(repo__testing=True,
pkgname__in=pkgnames)
# now build a lookup dict to attach to the correct package
lookup = {(p.pkgname, p.arch): p for p in testing_pkgs}

annotated = []
for package in packages:
in_testing = lookup.get((package.pkgname, package.arch), None)
package.testing = in_testing

return annotated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be an option to refactor attach_staging() to use a parameter to keep the overall code more DRY?

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.

Add a "Testing Version" column to todo lists

2 participants