Update/codecarbon demo - #801
Open
budescode wants to merge 3 commits into
Open
Conversation
… 3.0.5, plotly 5.3.0 -> 7.0.0, Flask 2.0.1 -> 3.1.3 and gunicorn 20.1.0 -> 26.2.0. Drop dash-core-components, dash-html-components and dash-table, which were merged into dash in 2.0. The dashboard now lives behind the codecarbon[carbonboard] extra. Declare the three direct dependencies in pyproject.toml and regenerate requirements.txt from uv.lock. Raise the Python runtime to 3.11, the minimum supported by pandas 3
Dash 3 removed app.run_server; use app.run.
codecarbon 3.3.0 opens codecarbon/data/canada_provinces.geojson relative to the working directory, so selecting Canada raises FileNotFoundError unless the app is launched from site-packages. The bug is still present on upstream master. Redirect that one relative path to the installed package. The patch can be removed once codecarbon resolves the path itself.
Author
|
@robertclaus Please can you review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue for app: N/A
App pull request
About
Summary
Updates codecarbon-demo from its 2021 dependency set to current releases
and fixes the two things that broke along the way.
Dependencies
codecarbon[carbonboard]extra)and dash-table, which were merged into dash in 2.0
gunicorn 20.1.0 -> 26.2.0
is regenerated from uv.lock so the two stay in sync
Fixes
app.run_serverwas removed in Dash 3; the app now callsapp.runto the working directory, so selecting Canada raised FileNotFoundError.
app.py redirects that one path to the installed package. The bug is still
present on codecarbon master; the workaround can be removed once it is
fixed upstream.
Tested on Python 3.11.13: index, layout and callback registration all
return 200, and the regional choropleth callback renders for both Canada
and USA.
Merge tag:
#patchWorkflow
elements necessary for successful deployment are in place.
assets/folder.The pre-review review
I have addressed all of the following questions:
any dead and/or irrelevant code.)
readable and, where it isn't, it has been commented appropriately.)
lessen the volume of code that needs to be maintained.)
Post PR (at merge time)
#patch- An app has been updated or fixed