Skip to content

Commit

Permalink
clear warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tjlane committed Oct 28, 2024
1 parent 08b88d6 commit b552615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion meteor/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from enum import StrEnum, auto
from pathlib import Path
from typing import Any
from io import StringIO

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -328,6 +329,6 @@ def write_combined_metadata(
def read_combined_metadata(*, filename: Path) -> tuple[pd.DataFrame, TvDenoiseResult]:
with filename.open("r") as f:
combined_metadata = json.load(f)
it_tv_metadata = pd.read_json(combined_metadata["iterative_tv"])
it_tv_metadata = pd.read_json(StringIO(combined_metadata["iterative_tv"]))
final_tv_metadata = TvDenoiseResult.from_json(combined_metadata["final_tv_pass"])
return it_tv_metadata, final_tv_metadata
3 changes: 2 additions & 1 deletion test/unit/scripts/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def test_kweight_diffmap_according_to_mode(
mode: WeightMode, diffmap_set: DiffMapSet, fixed_kparameter: float
) -> None:
# ensure the two maps aren't exactly the same to prevent numerical issues
diffmap_set.derivative.amplitudes.iloc[0] += 1.0
print("***", diffmap_set.derivative.columns)

Check failure on line 149 in test/unit/scripts/test_common.py

View workflow job for this annotation

GitHub Actions / build (3.11)

Ruff (T201)

test/unit/scripts/test_common.py:149:5: T201 `print` found
diffmap_set.derivative.loc[0, diffmap_set.derivative._amplitude_column] += 1.0

diffmap, _ = kweight_diffmap_according_to_mode(
mapset=diffmap_set, kweight_mode=mode, kweight_parameter=fixed_kparameter
Expand Down

0 comments on commit b552615

Please sign in to comment.