Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Added reading functionality for other versions of nda files#110

Open
jerry328-sudo wants to merge 15 commits intoSolid-Energy-Systems:masterfrom
jerry328-sudo:master
Open

Added reading functionality for other versions of nda files#110
jerry328-sudo wants to merge 15 commits intoSolid-Energy-Systems:masterfrom
jerry328-sudo:master

Conversation

@jerry328-sudo
Copy link

@jerry328-sudo jerry328-sudo commented Jul 10, 2025

Added reading functionality for nda files of versions v8, v22, v23, v26, v28, and added a Chinese README file

Deleted release, CI, and coverage badges from both README.md and README_en.md to simplify the documentation headers.
Implemented _read_nda_8, _read_nda_22, and _read_nda_26 helper functions to handle NDA file versions 8, 22, and 26. Updated read_nda to dispatch to the correct function based on nda_version, improving compatibility with more NDA file formats.
…a 函数以处理这些版本。同时,更新测试文件以使用版本 28 的 NDA 文件。
…ion,并在相关读取函数中调用智能解码函数,提升备注解析的灵活性和准确性。同时,更新测试文件以反映这些更改。
… NDA 版本 23 的支持说明,修改 read_nda 函数以处理 NDA 版本 23 的数据解析,并新增相关辅助函数和测试文件路径。确保数据解析的准确性和灵活性。
Copilot AI review requested due to automatic review settings July 10, 2025 10:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for reading .nda files of versions v8, v22, v23, v26, and v28, and includes a new Chinese README alongside updates to parsing utilities and documentation.

  • Implemented version‐specific parsing functions (_read_nda_8, _read_nda_22, _read_nda_23, _read_nda_26, reuse v29 logic for v28)
  • Added _decode_remarks to handle multi‐encoding remark fields
  • Provided Chinese translations in README and docstrings

Reviewed Changes

Copilot reviewed 10 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/v_8_22_26/test_nda.py Placeholder test script for v23 without assertions
tests/v_8_22_26/nda/errList.md Error sample list in Chinese with table formatting
README_en.md English README updated for v8–v28 support
README.md Chinese README added and aligned with English version
NewareNDA/utils.py Docstrings translated to Chinese
NewareNDA/dicts.py Comment translations
NewareNDA/main.py CLI argument descriptions translated
NewareNDA/NewareNDAx.py Chinese docstring updates in NDAX parser
NewareNDA/NewareNDA.py Main parser updated for new versions + _decode_remarks
Architecture.md New Chinese architecture documentation
Comments suppressed due to low confidence (4)

NewareNDA/main.py:28

  • [nitpick] The --no_software_cycle_number flag name and its store_false action invert logic compared to the help text. Rename the flag or clarify the help description so users understand it disables rather than enables cycle number regeneration.
    parser.add_argument('-s', '--no_software_cycle_number', action='store_false',

tests/v_8_22_26/test_nda.py:12

  • This script only prints output for a single v23 file and lacks assertions or loops over the new versions (v8, v22, v23, v26, v28). Add proper test assertions and iterate all supported versions to ensure coverage.
# 测试不同版本的nda文件

tests/v_8_22_26/nda/errList.md:1

  • [nitpick] The table splits entries across multiple rows with blank cells for repeated error types. Consolidate examples in the same row (e.g., separate with line breaks) to improve readability and maintain proper markdown structure.
| 错误类型        | 代表性文件                     | 错误信息示例                                                      |

NewareNDA/NewareNDA.py:209

  • Changing read() to return a tuple breaks existing usage and the CLI (__main__.py) which expects a single DataFrame. Consider restoring the original signature or updating callers to unpack the returned version explicitly.
    return df, nda_version

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@d-cogswell
Copy link
Contributor

Hi @jerry328-sudo thank you for your contribution. This code is now being developed at a new location: https://github.com/d-cogswell/NewareNDA

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants