deepmodeling / deepmodeling/DeePTB

[Code scan] Fix dptb test argument mismatch that raises before testing starts

Open Beginner friendly
#358 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
122
Forks
36
PR merge metrics
No merged PRs in 30d

Description

This issue is part of a Codex global repository scan.

Problem:
The `test` CLI parser defines `INPUT`, `init_model`, and `output`, then dispatches `dict_args` into `_test()`. `_test()` requires `use_correction` with no default, and the parser never supplies it.

Code references:
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/entrypoints/main.py#L260-L287
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/entrypoints/main.py#L600-L601
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/entrypoints/test.py#L22-L29

Impact:
`dptb test ...` raises `TypeError: _test() missing 1 required positional argument: 'use_correction'` before testing starts.

Suggested fix:
Either add a parser option for `use_correction`, or give `_test()` a default such as `use_correction: Optional[str] = None`.

Contributor guide

Open the contributing guide

Research direction

Start in dptb/entrypoints/main.py at the test CLI parser and dispatch, then compare those arguments with the _test() signature in dptb/entrypoints/test.py. Run the dptb test command or its existing test coverage to confirm it no longer raises the missing use_correction TypeError before testing begins.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.