MCPcopy Create free account
hub / github.com/apache/solr / parse

Method parse

dev-tools/scripts/changes2logchange.py:459–479  ·  view source on GitHub ↗

Parse the CHANGES.txt file.

(self)

Source from the content-addressed store, hash-verified

457 self.versions: List[VersionSection] = []
458
459 def parse(self):
460 """Parse the CHANGES.txt file."""
461 with open(self.changes_file_path, 'r', encoding='utf-8') as f:
462 content = f.read()
463
464 # Split into version sections
465 version_matches = list(self.VERSION_HEADER_PATTERN.finditer(content))
466
467 for i, version_match in enumerate(version_matches):
468 version = version_match.group(1)
469 start_pos = version_match.end()
470
471 # Find the end of this version section (start of next version or EOF)
472 if i + 1 < len(version_matches):
473 end_pos = version_matches[i + 1].start()
474 else:
475 end_pos = len(content)
476
477 version_content = content[start_pos:end_pos]
478 version_section = self._parse_version_section(version, version_content)
479 self.versions.append(version_section)
480
481 def _parse_version_section(self, version: str, content: str) -> VersionSection:
482 """Parse all entries within a single version section."""

Callers 5

runMethod · 0.45
_version_sort_keyMethod · 0.45
runMethod · 0.45
_process_versionMethod · 0.45

Calls 5

readMethod · 0.65
endMethod · 0.65
startMethod · 0.65
appendMethod · 0.65

Tested by

no test coverage detected