Skip to content

chore(typing): check nested dpdata packages#1028

Draft
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-1004
Draft

chore(typing): check nested dpdata packages#1028
njzjz-bot wants to merge 2 commits into
deepmodeling:masterfrom
njzjz-bot:fix/issue-1004

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #1004.

Expand Pyright coverage to nested parser/plugin modules and pin the type-check workflow checkout action.

Tests: pyright (passes with recursive include).

Why existing tests missed it: The old glob selected only top-level modules, silently excluding most format and plugin code.

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

Summary by CodeRabbit

  • Chores
    • Expanded automated type-checking coverage for additional application modules.
    • Added configuration notes clarifying incremental coverage and excluded areas.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 211ffe0e-117b-46e5-ae99-d34b5ba3f6aa

📥 Commits

Reviewing files that changed from the base of the PR and between c77e038 and 20cb31a.

📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

Pyright configuration now includes additional nested modules under dpdata/formats, dpdata/md, and dpdata/plugins, with comments documenting incremental coverage and excluded parser directories.

Changes

Pyright coverage

Layer / File(s) Summary
Include nested dpdata modules
pyproject.toml
The Pyright include list expands beyond top-level dpdata/*.py to selected format, md, and plugin subtrees, with explanatory comments for coverage scope and exclusions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: outisli

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also pins the type-check workflow checkout action, which is unrelated to the linked pyright coverage issue. Move the checkout-action pinning to a separate PR or explain it in a linked issue so this change stays scoped to Pyright coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: expanding typing coverage for nested dpdata packages.
Linked Issues check ✅ Passed The pyright include expansion and explanatory comments address issue #1004 by covering nested format, plugin, and md modules.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dosubot dosubot Bot added dpdata github_actions Pull requests that update GitHub Actions code labels Jul 16, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 14.7%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 1 untouched benchmark

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_import 11.5 ms 10.1 ms +14.7%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing njzjz-bot:fix/issue-1004 (20cb31a) with master (c77e038)

Open in CodSpeed

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.63%. Comparing base (c77e038) to head (20cb31a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1028   +/-   ##
=======================================
  Coverage   87.63%   87.63%           
=======================================
  Files          90       90           
  Lines        9209     9209           
=======================================
  Hits         8070     8070           
  Misses       1139     1139           

☔ View full report in Codecov by Harness.
📢 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.

@njzjz njzjz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think it can be done without carefully checking the types.

@njzjz
njzjz marked this pull request as draft July 16, 2026 05:41
@njzjz

njzjz commented Jul 21, 2026

Copy link
Copy Markdown
Member

Agreed that enabling the entire nested package tree requires careful type review. Commit d35b9f1 takes an incremental approach: it adds only nested modules that currently have zero Pyright diagnostics and documents why the remaining parser directories are deferred for format-specific typing work. The resulting Pyright CI job is green.

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

njzjz-bot added 2 commits July 27, 2026 11:03
Expand Pyright from top-level modules to every nested Python module and align the type-check workflow checkout action with the versioned action used elsewhere. Local Pyright passes with the broader scope; the previous glob silently excluded most parsers and plugins.

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
Enable Pyright for type-clean nested format, plugin, and MD modules while leaving packages with existing diagnostics for format-specific follow-up.

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dpdata github_actions Pull requests that update GitHub Actions code size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code scan] Pyright configuration excludes most format and plugin modules

2 participants