forked from LyoHUB/LyoPRONTO
-
Notifications
You must be signed in to change notification settings - Fork 0
Sync with upstream LyoHUB/LyoPRONTO #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bernalde
wants to merge
3
commits into
main
Choose a base branch
from
pr/sync-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
To make LyoPRONTO an installable package, we need a pyproject.toml. Since there have been a few improvements, I will publish a release and call it 1.1.
1) Add a test suite with comprehensive coverage * Run documentation notebooks as part of test suite, using papermill 2) Fix some problems uncovered by that test suite * Using fraction vs % in drying completion * Have calc_knownRp end when ramps end, per old API * Have calc_knownRp provide interpolated values at all time points, if dt!=None, per old API * Eliminate some infinite loops in design space calculation * Rework time handling for freezing 3) Use pyproject.toml for everything possible 4) Build docs for PRs, but don't deploy because I couldn't get Actions runner correct permissions 5) Format the test suite with ruff 6) Introduce a RampInterpolation class, which is currently only used in freezing, testing, and calc_knownRp but could apply everywhere 7) Emit proper warnings, not just print to stdout 8) Add a dev section to docs ---- All commits: * Add testing-related files from SECQUOIA fork * Missed a file * Have tests use pyproject.toml, not requirements.txt * add pandas as dev dep * fix tests: replace math.exp with np.exp * fix: calc_knownRp uses percent rather than 0-1 * clean whitespace * fix: Handle edge case in design space * Move helper func to separate module under tests * Fix tests for unknownRp * Note that edge case needs treatment * cleanup * Include pytest settings in pyproject.toml * Fully move all tests to percent dried, not fraction * Further test cleanup * Ignore some local things * Standardize calc_unknownRp tests * Fix a bug in design space, uncovered by tests * DRY the tests out a bit * Eliminate one cause of infinite loops in design space * fix: give an initial guess in acceptable range * Make a start on handling cases where optimization fails for Pch * Get all tests passing, skip those that address problems which don't exist yet * dry out Tsh a little bit * Get all opt_Pch tests passing * Get some Tsh tests passing * Get joint optimization tests passing * Remove separate "coverage" tests * Complete line coverage of opt_Pch * Unify Pch_Tsh optimization, with complete coverage * default ramp rate of no ramp, if not supplied * Add Tmax parameter to assert_physically_reasonable_output * Tweak path handling * Include results from web API in repo, for test comparisons * Add coverage defaults to testing * Rename for clarity, delete duplicate tests * Consolidate calc_unknownRp into one file * Make unknownRp give useful warnings, test those warnings * lint * Add warnings for design space, consolidate tests,, get complete test coverage * Consolidate * Consolidate and clarify knownRp tests * clarify deps * Get a proper regression test passing on calc_knownRp by taking dt and max time into account more carefully * Work on increasing coverage * Remove redundant test * Make path to test data have one source of truth * Standardize a magic number * Test failures * Add one more testing utility function * Fix and clean up freezing, clean up tests, add tests to reach 100% coverage * Make example scripts with plots part of the test suite * Add tests which execute notebooks; rework CI to run papermill within pytest, rather than from papermill command line * Fix compat bound * fix: don't have notebooks run together with "PR tests" * Separate out notebook dependencies from docs building dependencies * Import papermill inside notebook tests * Try out writing PR version of docs again * try again pr docs * one more thing to try * move permissions? * Give up on PR versions of docs from Actions * Clean up unused config * Make one category of dev deps, not two * Remove unused testing script * Delete obsolete test * Modify equations being solved to account for varying shelf temperature during crystallization * Add reference test for freezing * Add new reference data for opt_Pch * Point to correct file * Test reference case for opt_Pch * Give opt_pch reference case its own inputs setup * Take some of Copilot's review suggestions * Linting * Ruff formatting. Lots of whitespace noise, all single quotes to double quotes * Get *a* reference test working for opt_Pch * unnecessary imports * Relax tolerance * Help diagnose CI failure * Bite the bullet and add a time interpolator for Tshelf and Pchamber * Make RampInterpolator conform to existing API for dt_setpt, with kwarg for changing to other interpretation * Add more consistency checks to optimization tests, use some np.testing utilities * Fix freezing reference to be closer to original interpretation * Get one last test passing * ruff format on tests * Remove unused sections from pyproject.toml * Make some dev docs, shuffle things into there from README, etc. * Add some extra helpers for RampInterpolator, use in calc_knownRp
This PR syncs SECQUOIA/LyoPRONTO main with the upstream LyoHUB/LyoPRONTO repository. Key changes from upstream: - lyopronto/functions.py: RampInterpolator class, improved lumped_cap_Tpr functions - lyopronto/calc_*.py: Better error handling, PCHIP interpolation - lyopronto/opt_*.py: Improved optimizer robustness - tests/: Comprehensive test suite from upstream - CI: Updated workflow configurations This establishes a clean foundation for adding Pyomo integration.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Summary
This PR syncs SECQUOIA/LyoPRONTO main with the upstream LyoHUB/LyoPRONTO repository.
Key Changes from Upstream
Physics Improvements
lyopronto/functions.py: AddedRampInterpolatorclass for shelf temperature rampinglumped_cap_Tpr_abstract,lumped_cap_Tpr_ice,lumped_cap_Tpr_solfunctionscrystallization_time_FUNwithTsh_funcparameter for dynamic shelf temperaturefill_output()now uses PCHIP interpolation for smoother resultsOptimizer Robustness
lyopronto/opt_Pch.py: Improved error handling and boundslyopronto/opt_Tsh.py: Warning imports, ramp_rate handlinglyopronto/opt_Pch_Tsh.py: Code formatting improvementsTest Suite
CI/CD
Why This PR?
This establishes a clean foundation synced with upstream before adding Pyomo integration in subsequent PRs.
Part of Pyomo Integration Series
This is PR 0 of 8 in the Pyomo integration series: