Skip to content

Commit

Permalink
using unused variables in RadiusCardKeyword class to make overlord "p…
Browse files Browse the repository at this point in the history
…re-commit.ci" happy
  • Loading branch information
alexmlongLANL committed Feb 22, 2025
1 parent aeecdb8 commit 3b589a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pleiades/sammy/parameters/radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,12 +728,14 @@ class RadiusCardKeyword(BaseModel):
def is_header_line(cls, line: str) -> bool:
"""Check if line is a valid header line."""
where_am_i = "RadiusCardKeyword.is_header_line()"
logger.info(f"{where_am_i}: Checking if header line - {line}")
return "RADII" in line.upper() and "KEY-WORD" in line.upper()

@staticmethod
def _parse_values(value_str: str) -> List[str]:
"""Parse space/comma separated values."""
where_am_i = "RadiusCardKeyword._parse_values()"
logger.info(f"{where_am_i}: Parsing values from string: {value_str}")
return [v for v in re.split(r"[,\s]+", value_str.strip()) if v]

@classmethod
Expand All @@ -751,10 +753,12 @@ def from_lines(cls, lines: List[str]) -> "RadiusCardKeyword":
"""
where_am_i = "RadiusCardKeyword.from_lines()"
if not lines:
logger.error(f"{where_am_i}: No lines provided")
raise ValueError("No lines provided")

# Validate header
if not cls.is_header_line(lines[0]):
logger.error(f"{where_am_i}: Invalid header line: {lines[0]}")
raise ValueError(f"Invalid header line: {lines[0]}")

# Parse parameters for RadiusParameters
Expand Down Expand Up @@ -842,6 +846,7 @@ def to_lines(self) -> List[str]:
List[str]: Lines in keyword format
"""
where_am_i = "RadiusCardKeyword.to_lines()"
logger.info(f"{where_am_i}: Converting radius parameters to lines")
lines = []

# Add radius values
Expand Down

0 comments on commit 3b589a6

Please sign in to comment.