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 12, 2024
1 parent fa7db81 commit 796cf9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
3 changes: 0 additions & 3 deletions deploy.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from prefect import serve

from punchpipe.controlsegment.launcher import launcher_flow
from punchpipe.deliver import create_noaa_delivery
from punchpipe.flows.level1 import level1_process_flow, level1_scheduler_flow
from punchpipe.flows.level2 import level2_process_flow, level2_scheduler_flow
from punchpipe.flows.level3 import level3_PTM_process_flow, level3_PTM_scheduler_flow
from punchpipe.flows.levelq import levelq_process_flow, levelq_scheduler_flow


if __name__ == "__main__":
launcher_deployment = launcher_flow.to_deployment(name="launcher-deployment",
description="Launch a pipeline segment.",
Expand Down Expand Up @@ -49,4 +47,3 @@
level3_PTM_scheduler_deployment, level3_PTM_process_deployment,
limit=1000
)

6 changes: 0 additions & 6 deletions punchpipe/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
import multiprocessing as mp

import click
from prefect import serve

from punchpipe.controlsegment.launcher import launcher_flow
from punchpipe.flows.level1 import level1_process_flow, level1_scheduler_flow
from punchpipe.flows.level2 import level2_process_flow, level2_scheduler_flow
from punchpipe.flows.level3 import level3_PTM_process_flow, level3_PTM_scheduler_flow
from punchpipe.flows.levelq import levelq_process_flow, levelq_scheduler_flow
from .monitor.app import create_app


Expand Down
1 change: 0 additions & 1 deletion punchpipe/controlsegment/db.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import math

from sqlalchemy import TEXT, Boolean, Column, DateTime, Float, Integer, String
from sqlalchemy.orm import declarative_base
Expand Down
21 changes: 10 additions & 11 deletions punchpipe/level0/flow.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os
import json
import base64
import os
import warnings
from datetime import datetime, timedelta
import importlib.metadata
from glob import glob
from datetime import datetime, timedelta

import numpy as np
import pylibjpeg
Expand All @@ -12,21 +13,19 @@
from astropy.wcs import WCS
from ndcube import NDCube
from prefect import flow, task
from prefect.blocks.system import Secret
from punchbowl.data import get_base_file_name
from punchbowl.data.io import write_ndcube_to_fits
from punchbowl.data.meta import NormalizedMetadata
from punchbowl.data.wcs import calculate_helio_wcs_from_celestial, calculate_pc_matrix
from sqlalchemy import and_
from glob import glob
from sunpy.coordinates import sun
from prefect.blocks.system import Secret

from punchbowl.data.meta import NormalizedMetadata
from punchbowl.data.io import write_ndcube_to_fits
from punchbowl.data.wcs import calculate_pc_matrix, calculate_helio_wcs_from_celestial

from punchpipe.controlsegment.db import EngXACTPacket, SciPacket, TLMFiles, File, get_closest_eng_packets, EngPWFPacket
from punchpipe.controlsegment.db import EngPWFPacket, EngXACTPacket, File, SciPacket, TLMFiles, get_closest_eng_packets
from punchpipe.controlsegment.util import get_database_session, load_pipeline_configuration
from punchpipe.error import CCSDSPacketConstructionWarning, CCSDSPacketDatabaseUpdateWarning
from punchpipe.level0.ccsds import PACKET_APID2NAME, process_telemetry_file, unpack_compression_settings
from punchpipe.level0.meta import convert_pfw_position_to_polarizer, POSITIONS_TO_CODES, eci_quaternion_to_ra_dec
from punchpipe.level0.meta import POSITIONS_TO_CODES, convert_pfw_position_to_polarizer, eci_quaternion_to_ra_dec

software_version = importlib.metadata.version("punchpipe")

Expand Down Expand Up @@ -190,7 +189,7 @@ def form_packet_entry(apid, packet, packet_num, source_tlm_file_id):
REDUNDANT_RESOLVER_POSITION_5=packet['REDUNDANT_RESOLVER_POSITION_5'],
)
case _:
warnings.warn(f"Unable to add packet to database.", CCSDSPacketDatabaseUpdateWarning)
warnings.warn("Unable to add packet to database.", CCSDSPacketDatabaseUpdateWarning)
@task
def update_tlm_database(packets, telemetry_file_path: str, session=None):
if session is None:
Expand Down

0 comments on commit 796cf9c

Please sign in to comment.