Open jsiirola opened 2 years ago
Which model is this? Is it imported from idaes-pse or all in the example?
The example is src/Examples/Advanced/DataRecon/econ_parmest_testing.ipynb
, importing
from idaes.power_generation.unit_models.boiler_heat_exchanger import (
BoilerHeatExchanger,
TubeArrangement,
DeltaTMethod
)
Ok, so it's the notebook that needs to be updated. I assume you are working on this now, so I need to wait to update it.
When debugging notebooks and writing new examples, I encounter many deprecation warnings concerning missing scaling factors or not specifying an equation form for Perry's liquid density methods. The second one is from one of my PR's to add a second equation form and default to the first/original equation form is no flag is provided. @andrewlee94 would it be best to update our examples so these warnings do not appear, and if so would you support catching these warnings via tests as @jsiirola suggests above?
@bpaul4 Yes, we should be fixing these deprecation warnings and it would be good to have a check for them. This will be especially important over the next few months as we begin the transition to IDAES v2.0.
The scaling factors aren't deprecation warnings. Just warnings. By popular request, I'm planning to add an option to silence the scaling warnings.
As John noted those the scaling factor messages are warning, but the correct path here is to fix these rather than silence them - we need to show users how to use the scaling tools and this is the prefect opportunity.
PR https://github.com/IDAES/idaes-pse/pull/822 can turn deprecation warnings into exceptions, which can help track down the exact location of deprecation warnings being generated, and help us make sure we get them all.
I think we should have fixed all the deprecations that were being raised, so now it should just be a matter of adding a test to warn us when new deprecations appear.
fwiw, in this (examples) repository, we could implement this check by using the same function used in the pre-processing step to find all notebooks (ie idaes_examples.util.find_notebooks()
) and parse them. We would just need to make sure it ran after all the other tests -- there is a plugin called pytest-order we can use.
Summarizing the discussion from the dev call:
.ipynb
post-execution output cells and does a text search for DEPRECATED
(must ensure that this check is run after the notebooks are run).This is still relevant. I might be able to make some progress on this before the Feb release.
While putting together IDAES/examples-pse#102, I ran across a ton of deprecation warnings in the example, e.g.:
and
We should revisit the examples and update them to track the current recommended API.
We should also consider updating the examples tests to fail on (unexpected) warnings.