Skip to content

Commit

Permalink
Merge pull request #1 from Deltares/test_gw
Browse files Browse the repository at this point in the history
Test gw
  • Loading branch information
srpeiter committed May 25, 2023
2 parents f1f3db2 + e6d03dd commit 73a835c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
cyclone_track_database/IBTrACS.NA.v04r00.nc
6 changes: 3 additions & 3 deletions cht_cyclones/cyclone_track_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def compute_distance(lon1, lat1, lon2, lat2):
def map_ready():
try:
from app import app
except:
except Exception:
# This should be removed. ddb in Delft Dashboard should be renamed to app!
from ddb import ddb as app

Expand Down Expand Up @@ -274,7 +274,7 @@ def map_ready():
def update_tracks():
try:
from app import app
except:
except Exception:
# This should be removed. ddb in Delft Dashboard should be renamed to app!
from ddb import ddb as app

Expand Down Expand Up @@ -308,7 +308,7 @@ def map_moved(coords):
def select_track(feature):
try:
from app import app
except:
except Exception:
# This should be removed. ddb in Delft Dashboard should be renamed to app!
from ddb import ddb as app

Expand Down
2 changes: 1 addition & 1 deletion cht_cyclones/cyclone_track_selector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ window:
title: Select Cyclone Track ...
width: 800
height: 500
module: cht.tropical_cyclone.cyclone_track_database
module: cht_cyclones.cyclone_track_database
variable_group: cyclone_track_selector
modal: True
cancel: True
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- build
- mypy
- pip
- netcdf4
- numpy
- scipy
- xarray
Expand All @@ -18,3 +19,4 @@ dependencies:
- pytest
- python=3.10
- twine
- xarray
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
select = ["E", "F", "NPY", "PD", "C4", "I"]
ignore = ["E501", "PD901","E741", "PD002", "NPY002"]
ignore = ["E501", "PD901","PD011","E741", "PD002", "NPY002"]
fixable = ["I"]
2 changes: 0 additions & 2 deletions tests/test_dummy.py

This file was deleted.

13 changes: 13 additions & 0 deletions tests/test_track.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import os
from pathlib import Path

from cht_cyclones.cyclone_track_database import CycloneTrackDatabase


def test_load_track_database():
database_file = Path(os.getcwd()).joinpath(
"cyclone_track_database", "IBTrACS.NA.v04r00.nc"
)
tc = CycloneTrackDatabase("ibtracs", file_name=database_file)

assert tc.nstorms == 2323

0 comments on commit 73a835c

Please sign in to comment.