You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Maintain speed.python.org and speed.pypy.org from a single branch #100
The two site branches share codespeed/ but have diverged (since February 2024), with various fixes being cherry-picked to both sides. I'd like to reconcile the branches, so that we have one main branch where each site is a settings package, so that both deploy from the same code and we have less logic to maintain. I will send some preparatory commits align the repo files on each branch first, then I'll start work on merging the PyPy branch into a new main cut from speed.python.org, both should hopefully be visually unchanged. Please don't push any commits to the two branches for the next few days, I hope to have main created soon.
Thankfully, it didn't take that long. The merged branch is up at https://github.com/python/codespeed/tree/main. It primarily takes codespeed/ from PyPy. Each site is now just its settings package on top of the shared app, reducing the maintenance burden.
@mattip could you pleas try it for speed.pypy.org? It should look pretty much the same as today (I did some testing of both sites, and I'm happy with the few little improvements). A few little things changed, namely:
Some new settings keep PyPy's defaults: TIMELINE_GRID_REVISIONS and COMP_ENVIRONMENTS_DEFAULT.
The "All/None" links are back on the comparison page's environment list (and they now actually redraw the chart when clicked).
Benchmark grouping by source is data dependant so that with two sources you get the Legacy/PyPerformance headers but a site with one source gets a regular list.
Fixed a little bug with report tables cached before the source migration, since they have no bench_source per row, so changes_table.html silently rendered an empty table for them. get_changes_table now rebuilds such caches once.
requirements.txt no longer pins django<4, so the deploy will upgrade Django.
If you're happy, we can merge python/psf-salt#673 to deploy both sites from main, and then retire the two branches. :-) Before that, once I get access to the server, I'll dump the databases and save a copy, just in case anything goes awry.
I wasn’t clear, sorry. I don’t understand the plan. We cannot deploy both sites from the same commit with the same local_settings.py, they have to be differentiated somehow. What do you propose to do that?
/makeimage/ has a regression relative to speed.python.org: 198718a moved return response out of makeimage() and into about(), after an unconditional return. For a valid request, the PNG is generated, but the view returns None, so Django raises ValueError and responds with HTTP 500.
I reproduced this locally on main (80367db); the same request returns a PNG on the Python branch. The return response needs to go back at the end of makeimage().
I wasn’t clear, sorry. I don’t understand the plan. We cannot deploy both sites from the same commit with the same local_settings.py, they have to be differentiated somehow. What do you propose to do that?
IIRC, local_settings.py is not checked in and belongs to the machine. The content is specific to your configuration.
/makeimage/ has a regression relative to speed.python.org: 198718a moved return response out of makeimage() and into about(), after an unconditional return. For a valid request, the PNG is generated, but the view returns None, so Django raises ValueError and responds with HTTP 500.
Thanks and good catch, I've pushed a fix. This was originally a regression on the PyPy branch which I then pulled in (an example of why deduplicating would be useful).
We cannot deploy both sites from the same commit with the same local_settings.py, they have to be differentiated somehow. What do you propose to do that?
Sorry, I answered the wrong question. The differentiation is the settings package, not the commit/branch. main has both speed_python/ and speed_pypy/, each with its own committed settings.py, urls.py, templates etc., so your speed_pypy/settings.py is in the tree as before. Each one ends with from .local_settings import *, so your machine-specific values live in speed_pypy/local_settings.py, as they do today. Which site runs is picked by the entry point, psf-salt runs the PyPy instance from its own checkout with speed_pypy.wsgi:application and writes its local_settings.py into speed_pypy/ (locally it is --settings=speed_pypy.settings). Same repository and branch, but two settings packages and two local settings files.
I will in the future be updating speed.pypy.org's home page to show graphs from both legacy and pyperformance benchmarks, but that will live in the speed_pypy directory
I will in the future be updating speed.pypy.org's home page to show graphs from both legacy and pyperformance benchmarks, but that will live in the speed_pypy directory
Sounds good. We should keep PyPy/CPython specific views to their directory (I did that for the geo-mean trend graph, for example).
Activity
StanFromIreland commentedon Nov 3, 2026
Thankfully, it didn't take that long. The merged branch is up at https://github.com/python/codespeed/tree/main. It primarily takes
codespeed/from PyPy. Each site is now just its settings package on top of the shared app, reducing the maintenance burden.@mattip could you pleas try it for
speed.pypy.org? It should look pretty much the same as today (I did some testing of both sites, and I'm happy with the few little improvements). A few little things changed, namely:TIMELINE_GRID_REVISIONSandCOMP_ENVIRONMENTS_DEFAULT.changes_table.htmlsilently rendered an empty table for them.get_changes_tablenow rebuilds such caches once.requirements.txtno longer pinsdjango<4, so the deploy will upgrade Django.If you're happy, we can merge python/psf-salt#673 to deploy both sites from main, and then retire the two branches. :-) Before that, once I get access to the server, I'll dump the databases and save a copy, just in case anything goes awry.
mattip commentedon Nov 4, 2026
How does each site get its own speed_python/local_settings.py?
mattip commentedon Nov 4, 2026
As for access to the server, I added a dumpdb button to the admin page. Is that preserved?
StanFromIreland commentedon Nov 4, 2026
You should be able to add a local_settings.py, I didn't have any issue? And yes, the dump button is preserved (and added to speed.python.org).
mattip commentedon Nov 4, 2026
I wasn’t clear, sorry. I don’t understand the plan. We cannot deploy both sites from the same commit with the same local_settings.py, they have to be differentiated somehow. What do you propose to do that?
diegorusso commentedon Nov 4, 2026
/makeimage/has a regression relative tospeed.python.org:198718amovedreturn responseout ofmakeimage()and intoabout(), after an unconditional return. For a valid request, the PNG is generated, but the view returnsNone, so Django raisesValueErrorand responds with HTTP 500.I reproduced this locally on
main(80367db); the same request returns a PNG on the Python branch. Thereturn responseneeds to go back at the end ofmakeimage().The rest seems OK, good stuff!
diegorusso commentedon Nov 4, 2026
IIRC, local_settings.py is not checked in and belongs to the machine. The content is specific to your configuration.
StanFromIreland commentedon Nov 4, 2026
Thanks and good catch, I've pushed a fix. This was originally a regression on the PyPy branch which I then pulled in (an example of why deduplicating would be useful).
Sorry, I answered the wrong question. The differentiation is the settings package, not the commit/branch.
mainhas bothspeed_python/andspeed_pypy/, each with its own committedsettings.py,urls.py, templates etc., so yourspeed_pypy/settings.pyis in the tree as before. Each one ends with from.local_settings import *, so your machine-specific values live inspeed_pypy/local_settings.py, as they do today. Which site runs is picked by the entry point,psf-saltruns the PyPy instance from its own checkout withspeed_pypy.wsgi:applicationand writes itslocal_settings.pyintospeed_pypy/(locally it is--settings=speed_pypy.settings). Same repository and branch, but two settings packages and two local settings files.mattip commentedon Nov 4, 2026
LGTM. Thanks @StanFromIreland this will simplify maintenance going forward.
mattip commentedon Nov 4, 2026
I will in the future be updating speed.pypy.org's home page to show graphs from both legacy and pyperformance benchmarks, but that will live in the speed_pypy directory
StanFromIreland commentedon Nov 4, 2026
Sounds good. We should keep PyPy/CPython specific views to their directory (I did that for the geo-mean trend graph, for example).