Skip to content

Json list db#1760

Open
dangunter wants to merge 20 commits intoIDAES:mainfrom
dangunter:json-list-db
Open

Json list db#1760
dangunter wants to merge 20 commits intoIDAES:mainfrom
dangunter:json-list-db

Conversation

@dangunter
Copy link
Copy Markdown
Member

@dangunter dangunter commented Apr 4, 2026

Fixes

Related to #1755

Summary/Motivation:

List of JSON documents, with accompanying index with some metadata and offset of each document in the file.

This is motivated by the need to keep a history of report objects, or the results of a parameter sweep, or both, from the idaes.core.util.structfs.FlowsheetRunner. These may be rather large, so the implementation keeps the offsets of each JSON document in a separate file, allowing O(1) access to a given document without parsing or reading any other document's data.

Changes proposed in this PR:

  • new jsonlist module in idaes.core.util
  • JsonList class

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@dangunter dangunter self-assigned this Apr 6, 2026
@dangunter dangunter requested a review from CopyDemon April 6, 2026 16:23
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 92.90323% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.86%. Comparing base (6258f28) to head (02cf51f).

Files with missing lines Patch % Lines
idaes/core/util/jsonlist.py 92.90% 7 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1760      +/-   ##
==========================================
+ Coverage   73.81%   73.86%   +0.04%     
==========================================
  Files         419      420       +1     
  Lines       66225    66380     +155     
  Branches    11122    11149      +27     
==========================================
+ Hits        48886    49030     +144     
- Misses      14798    14805       +7     
- Partials     2541     2545       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dangunter dangunter added the enhancement New feature or request label Apr 8, 2026
@dangunter
Copy link
Copy Markdown
Member Author

@CopyDemon if you get a chance could you look at this and approve? It's an added utility not used inside core, at the moment, so should "do no harm" as long as it builds (which you can see it does).

Copy link
Copy Markdown
Contributor

@CopyDemon CopyDemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to merge—it doesn’t affect the core and all tests are passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants