Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 27, 2024
1 parent cce6faa commit 485b9e4
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ levels:
seconds: [1]
escalation: [10000]
schedule: "* * * * *"
options:
options:
12 changes: 3 additions & 9 deletions punchpipe/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
from punchpipe.control.health import update_machine_health_stats
from punchpipe.control.launcher import launcher_flow
from punchpipe.control.util import load_pipeline_configuration
from punchpipe.flows.fcorona import (
f_corona_process,
f_corona_scheduler,
)
from punchpipe.flows.fcorona import f_corona_process, f_corona_scheduler
from punchpipe.flows.level0 import level0_form_images, level0_ingest_raw_packets
from punchpipe.flows.level1 import level1_process_flow, level1_scheduler_flow
from punchpipe.flows.level2 import level2_process_flow, level2_scheduler_flow
Expand All @@ -25,10 +22,7 @@
level3_PTM_scheduler_flow,
)
from punchpipe.flows.levelq import levelq_process_flow, levelq_scheduler_flow
from punchpipe.flows.starfield import (
starfield_process_flow,
starfield_scheduler_flow,
)
from punchpipe.flows.starfield import starfield_process_flow, starfield_scheduler_flow
from punchpipe.monitor.app import create_app

THIS_DIR = os.path.dirname(__file__)
Expand Down Expand Up @@ -232,4 +226,4 @@ def run(configuration_path):
monitor_process = subprocess.Popen(["gunicorn",
"-b", "0.0.0.0:8050",
"--chdir", THIS_DIR,
"cli:server"])
"cli:server"])
2 changes: 1 addition & 1 deletion punchpipe/flows/fcorona.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import random
import typing as t
from datetime import datetime, timedelta
from dateutil.parser import parse as parse_datetime_str

from dateutil.parser import parse as parse_datetime_str
from prefect import flow, get_run_logger, task
from punchbowl.level3.f_corona_model import construct_polarized_f_corona_model

Expand Down
18 changes: 14 additions & 4 deletions punchpipe/flows/level0.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@
from sqlalchemy import and_

from punchpipe import __version__ as software_version
from punchpipe.level0.core import detect_new_tlm_files, update_tlm_database, parse_new_tlm_files, process_telemetry_file, form_from_jpeg_compressed, image_is_okay, get_fits_metadata, form_preliminary_wcs
from punchpipe.level0.meta import POSITIONS_TO_CODES, convert_pfw_position_to_polarizer
from punchpipe.level0.ccsds import unpack_compression_settings
from punchpipe.control.db import File, SciPacket, TLMFiles
from punchpipe.control.util import get_database_session, load_pipeline_configuration
from punchpipe.control.db import TLMFiles, SciPacket, File
from punchpipe.level0.ccsds import unpack_compression_settings
from punchpipe.level0.core import (
detect_new_tlm_files,
form_from_jpeg_compressed,
form_preliminary_wcs,
get_fits_metadata,
image_is_okay,
parse_new_tlm_files,
process_telemetry_file,
update_tlm_database,
)
from punchpipe.level0.meta import POSITIONS_TO_CODES, convert_pfw_position_to_polarizer


@flow
def level0_ingest_raw_packets(session=None):
Expand Down
2 changes: 1 addition & 1 deletion punchpipe/flows/level3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import json
import typing as t
from datetime import datetime, timedelta
from dateutil.parser import parse as parse_datetime_str

from dateutil.parser import parse as parse_datetime_str
from prefect import flow, get_run_logger, task
from punchbowl.level3.flow import level3_core_flow, level3_PIM_flow
from sqlalchemy import and_
Expand Down
2 changes: 1 addition & 1 deletion punchpipe/level0/ccsds.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ def unpack_acquisition_settings(acq_set_val: "bytes|int"):
# fig.colorbar(im1, ax=axs[1])
fig.tight_layout()
fig.savefig("mmr_image.png", dpi=300)
plt.show()
plt.show()
1 change: 0 additions & 1 deletion punchpipe/level0/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,3 @@ def form_from_jpeg_compressed(packets):
"""Form a JPEG-LS image from packets"""
img = pylibjpeg.decode(packets.tobytes())
return img

0 comments on commit 485b9e4

Please sign in to comment.