Skip to content

Commit e20342e

Browse files
committed
Make SimulationStudy.validate private (_validate)
Rename SimulationStudy.validate to _validate to mark it as an internal API, and update all internal calls and the test to use the new name. Also update the justfile comment to reflect the supported Python versions (3.11 to 3.14). No functional behavior changes intended.
1 parent 310ab10 commit e20342e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sync:
1313
test:
1414
uv run pytest
1515

16-
# Runs pytest across all supported Python versions (3.10 to 3.13)
16+
# Runs pytest across all supported Python versions (3.11 to 3.14)
1717
test_matrix:
1818
@for ver in 3.11 3.12 3.13 3.14; do \
1919
echo "\n🚀 ======================================"; \

src/digiqual/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def add_data(self, df: pd.DataFrame) -> None:
9696
self.plots = {}
9797

9898
#### Validating self.data ####
99-
def validate(self) -> None:
99+
def _validate(self) -> None:
100100
"""
101101
Cleans and validates the raw data stored in `self.data`.
102102
@@ -106,7 +106,7 @@ def validate(self) -> None:
106106
Examples
107107
--------
108108
```python
109-
study.validate()
109+
study._validate()
110110
# Output: Running validation...
111111
# Output: Validation passed. 50 valid rows ready.
112112
```
@@ -146,7 +146,7 @@ def diagnose(self) -> pd.DataFrame:
146146
print("No data found. Please run add_data() first.")
147147
return pd.DataFrame()
148148

149-
self.validate()
149+
self._validate()
150150

151151
if self.clean_data.empty:
152152
print("Cannot run diagnostics because validation failed.")
@@ -180,7 +180,7 @@ def refine(self, n_points: int = 10) -> pd.DataFrame:
180180

181181
if self.clean_data.empty:
182182
print("No clean data available. Running validation...")
183-
self.validate()
183+
self._validate()
184184

185185
if self.clean_data.empty:
186186
return pd.DataFrame()
@@ -296,7 +296,7 @@ def pod(
296296
"""
297297
# 0. Safety Checks
298298
if self.clean_data.empty:
299-
self.validate()
299+
self._validate()
300300
if self.clean_data.empty:
301301
raise ValueError("Cannot run PoD analysis: No valid data available.")
302302

tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_validate_explicit(study, clean_df):
4141
dirty_row = pd.DataFrame({'Length': [1], 'Angle': [0], 'Signal': [-5]})
4242
mixed_df = pd.concat([clean_df, dirty_row], ignore_index=True)
4343
study.add_data(mixed_df)
44-
study.validate()
44+
study._validate()
4545
assert len(study.clean_data) == 20
4646
assert len(study.removed_data) == 1
4747

0 commit comments

Comments
 (0)