Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Remove-me-section

smiles_loader.cpp was oversized; parsing and stereochemistry helpers were extracted into dedicated source files while keeping loader behavior intact. Follow-up applied clang-format to the new sources per review feedback.

  • Refactor: Kept public loader entry points in smiles_loader.cpp, moved parsing-heavy routines to smiles_loader_parsers.cpp, and stereochemistry helpers to smiles_loader_stereo.cpp.
  • Build: Existing CMake globbing continues to pick up the new source files without further changes.
  • Formatting: Applied clang-format to the newly split SMILES loader files.
SmilesLoader loader(scanner);
loader.loadMolecule(mol); // unchanged usage; implementation now split across smaller units

Generic request

  • PR name follows the pattern #1234 – issue name
  • branch name does not contain '#'
  • base branch (master or release/xx) is correct
  • PR is linked with the issue
  • task status changed to "Code review"
  • code follows product standards
  • regression tests updated

For release/xx branch

  • backmerge to master (or newer release/xx) branch is created

Optional

  • unit-tests written
  • documentation updated

Backmerge request

  • PR name follows the pattern Backmerge: #1234 – issue name
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • code contains only backmerge changes

Bump request

  • PR name follows the pattern Bump version to ...
  • add brackets [ ] for 'skip ci' and put it into the body
  • milestone is linked to PR
  • all tickets are closed inside the relevant milestone
Original prompt

This section details on the original issue you should resolve

<issue_title>smiles_loader.cpp has 3,057 lines of code, which is greater than 2,000 authorized. Split it into smaller files</issue_title>
<issue_description>Problem:
core/indigo-core/molecule/src/smiles_loader.cpp has 3,057 lines of code, which is greater than 2,000 authorized. Split it into smaller files.

Why is this an issue?
A source file that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor it into smaller pieces of code which focus on well defined tasks. Those smaller files will not only be easier to understand but also probably easier to test.

Problem locations:
core/indigo-core/molecule/src/smiles_loader.cpp</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] Split smiles_loader.cpp into smaller files Split SMILES loader into smaller translation units Dec 24, 2025
Copilot AI requested a review from AlexeyGirin December 24, 2025 07:19
@AlexeyGirin AlexeyGirin changed the title Split SMILES loader into smaller translation units #3418 smiles_loader.cpp has 3,057 lines of code, which is greater than 2,000 authorized. Split it into smaller files Dec 24, 2025
@AlexeyGirin AlexeyGirin marked this pull request as ready for review December 24, 2025 07:21
@AlexeyGirin
Copy link
Collaborator

@copilot you did changes in right direction but we need them to be clang formatted.
Please correct

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 24, 2025

@copilot you did changes in right direction but we need them to be clang formatted.
Please correct

Applied clang-format to the new SMILES loader files (commit 2026370).

@AlexeyGirin AlexeyGirin merged commit c9463f1 into master Jan 5, 2026
65 of 66 checks passed
@AlexeyGirin AlexeyGirin deleted the copilot/split-smiles-loader-file branch January 5, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

smiles_loader.cpp has 3,057 lines of code, which is greater than 2,000 authorized. Split it into smaller files

3 participants