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
I spent a while playing with this, but didn't get too for. I don't think the current approach is causing any problems, so I'm not going to dig into it much more. But @alexcjohnson may want to have a look when he has a chance.
Just to be clear: this code was added during #1679 in commit e169cbc and then scoped more tightly in #1720, right? @HammadTheOne can you explain what prompted you to add this? Do you understand why it was only needed in the monorepo context but not before that?
this code was added during #1679 in commit e169cbc and then scoped more tightly in #1720, right?
Yes, that's correct. In my understanding, prior to moving to the monorepo and serving dependencies from within dash, packages is a list of module loaders for whichever packages are in ComponentRegistry, namely dcc, html, table. Now that these packages are within the dash namespace, when Pytest is running a test app, it the assertion rewriter is the loader for dash (and I'm not entirely sure why that is in this context, but it has to do with the way it handles assertions).
As a workaround for this object being passed from pytest, I added this conditional to check if the package was an instance of AssertionRewritingHook and to set the correct path/location for the dash package, so that devtools/hot reloading would work as normal with a pytest configuration.
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are most important to our community. If this issue is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. (Please note that we will give priority to reports that include a short reproducible example.) If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson
Activity
jonmmease commentedon Aug 20, 2021
I spent a while playing with this, but didn't get too for. I don't think the current approach is causing any problems, so I'm not going to dig into it much more. But @alexcjohnson may want to have a look when he has a chance.
alexcjohnson commentedon Aug 23, 2021
Thanks for pointing this out @jonmmease
Just to be clear: this code was added during #1679 in commit e169cbc and then scoped more tightly in #1720, right? @HammadTheOne can you explain what prompted you to add this? Do you understand why it was only needed in the monorepo context but not before that?
HammadTheOne commentedon Aug 27, 2021
Yes, that's correct. In my understanding, prior to moving to the monorepo and serving dependencies from within
dash,packagesis a list of module loaders for whichever packages are inComponentRegistry, namelydcc,html,table. Now that these packages are within thedashnamespace, when Pytest is running a test app, it the assertion rewriter is the loader fordash(and I'm not entirely sure why that is in this context, but it has to do with the way it handles assertions).As a workaround for this object being passed from pytest, I added this conditional to check if the
packagewas an instance ofAssertionRewritingHookand to set the correct path/location for thedashpackage, so that devtools/hot reloading would work as normal with a pytest configuration.gvwilson commentedon Jul 23, 2024
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are most important to our community. If this issue is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. (Please note that we will give priority to reports that include a short reproducible example.) If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson