Skip to content

Add post_func_skip_list to control execution of post functions - #644

Open
ZLI-afk wants to merge 3 commits into
deepmodeling:masterfrom
ZLI-afk:devel
Open

Add post_func_skip_list to control execution of post functions#644
ZLI-afk wants to merge 3 commits into
deepmodeling:masterfrom
ZLI-afk:devel

Conversation

@ZLI-afk

@ZLI-afk ZLI-afk commented Apr 19, 2024

Copy link
Copy Markdown

In respond to required function associated with recent discussion topic #641 and #642

Comment thread dpdata/system.py Outdated
@codecov

codecov Bot commented Apr 19, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 83.65%. Comparing base (a5ddff2) to head (f8d7389).

❗ Current head f8d7389 differs from pull request most recent head 01b43cb. Consider uploading reports for the commit 01b43cb to get more accurate results

Files Patch % Lines
dpdata/system.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #644      +/-   ##
==========================================
- Coverage   83.67%   83.65%   -0.02%     
==========================================
  Files          80       80              
  Lines        7006     7011       +5     
==========================================
+ Hits         5862     5865       +3     
- Misses       1144     1146       +2     

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

@ZLI-afk
ZLI-afk requested a review from njzjz April 19, 2024 13:10

@njzjz-bot njzjz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes because constructing an empty System and loading it later raises AttributeError before any post function can run. The branch must initialize this state before both constructor early returns, then be rebased and covered by chained-loading tests.

Process note: the Codex usage allowance is about to reset, so I am spending the remaining token budget now on this review.

Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh

Comment thread dpdata/system.py
return
if file_name is None:
return
self.post_func_skip_list = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Initialize the skip list before either early return

System() returns at file_name is None without defining post_func_skip_list. A later System().from_fmt(...) reaches the post-function branch and raises AttributeError, which I reproduced on this head. Move this initialization above both the data and file_name early-return blocks, and add a chained empty-constructor loading regression test. A complete GitHub suggestion cannot be attached to only these added lines because the fix must move them above unchanged context.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants