pytest-dev / pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
11.67k stars 2.59k forks source link

Dynamically generate plugins table with sortable columns #11232

Open The-Compiler opened 12 months ago

The-Compiler commented 12 months ago

With almost 1300 plugins in the plugin list, it's pretty much impossible to browse through it... you can search for things if you know what you're looking for, but it's impossible to really find anything new. There are just too many plugins there which happen to be on PyPI but aren't really meant for public usage; or e.g. various joke plugins (I'm guilty of that one!).

Someone at Europython 2023 proposed to me that we sort it by popularity instead. I feel like it's a good idea! I recognize the downside that it makes it even harder for unpopular plugins to gain popularity, but then again, that seems better than making it harder for plugins that start with a z...

To get the data, we could use the PyPI Stats API - or perhaps, if 1300 plugins is too big of a hit against that, query the data ourselves. I suppose the latter would be preferrable.

If people don't object to this, and someone at Europython 2023 wants to pair up at the Sprints to give this a try (newcomers very much welcome!), let me know.

RonnyPfannschmidt commented 12 months ago

I'm all for it, but I'd like to merge my cache pr for the script first

nicoddemus commented 12 months ago

Yeah, sounds like a good idea. πŸ‘

RonnyPfannschmidt commented 12 months ago

i refreshed #10927 - lets merge it once green so people can base on it

nicoddemus commented 12 months ago

Done! πŸ‘

The-Compiler commented 10 months ago

Another more sophisticated idea: What if we had a plugins.json somewhere, and used JS to generate the table dynamically? Then people could change the sorting columns as they please. We could also always use the plugins.json from main even if someone is looking at the docs in a stable branch.

We could even still keep the statically generated page as a fallback, and then with JS remove the content and update it by the dynamic one.