Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Oct 20, 2023
1 parent 9562d76 commit 1839227
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 3 additions & 2 deletions dags_tests/cams_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from nwp.assets.cams import fetch_cams_forecast_for_day
import datetime as dt
import unittest

import datetime as dt
from nwp.assets.cams import fetch_cams_forecast_for_day


class TestCams(unittest.TestCase):
def test_cams(self):
Expand Down
6 changes: 2 additions & 4 deletions nwp/assets/cams/cams.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import datetime as dt

import cdsapi
import dagster
import os

import datetime as dt

c = cdsapi.Client()

Expand Down Expand Up @@ -80,7 +79,6 @@ class CAMSConfig(dagster.Config):
@dagster.op
def fetch_cams_forecast_for_day(context: dagster.OpExecutionContext, config: CAMSConfig):
"""Fetch CAMS forecast for a given day."""

date: dt.datetime = dt.datetime.strptime(config.date, "%Y-%m-%d")

if date < dt.datetime(2015, 1, 1):
Expand Down
7 changes: 2 additions & 5 deletions nwp/jobs.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import datetime as dt
from nwp.assets.cams import (
fetch_cams_forecast_for_day,
CAMSConfig
)
import json
from collections.abc import Callable
from typing import Any

import dagster

from nwp.assets.cams import CAMSConfig, fetch_cams_forecast_for_day
from nwp.assets.dwd.common import IconConfig
from nwp.assets.ecmwf.mars import (
NWPConsumerConfig,
nwp_consumer_convert_op,
nwp_consumer_download_op
nwp_consumer_download_op,
)

jobs: list[dagster.JobDefinition] = []
Expand Down

0 comments on commit 1839227

Please sign in to comment.