-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev
- Loading branch information
Showing
4 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# This is the only location where the version will be written and changed. | ||
# Based on https://packaging.python.org/single_source_version/ | ||
__version__ = "1.2.0" | ||
__version__ = "1.2.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
from tests import testfao56 | ||
from tests import testalternative | ||
from tests import test_all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""This file tests all methods for a minimal functioning.""" | ||
import unittest | ||
|
||
import numpy as np | ||
import pandas as pd | ||
|
||
import pyet as et | ||
|
||
tmean = pd.Series(data=20 * np.sin(np.linspace(0, 1, 365) * 2 * np.pi), | ||
index=pd.date_range("2001-01-01", "2001-12-31", freq="D")) | ||
tmax = tmean + 2 | ||
tmin = tmean - 2 | ||
rh = pd.Series(data=60 * np.sin(np.linspace(0, 1, 365) * np.pi), | ||
index=pd.date_range("2001-01-01", "2001-12-31", freq="D")) | ||
rs = pd.Series(data=10 * np.sin(np.linspace(0, 1, 365) * np.pi), | ||
index=pd.date_range("2001-01-01", "2001-12-31", freq="D")) | ||
wind = pd.Series(data=5 * np.sin(np.linspace(0, 1, 365) * np.pi), | ||
index=pd.date_range("2001-01-01", "2001-12-31", freq="D")) | ||
lat = 0.9 | ||
elevation = 20 | ||
|
||
|
||
class Testall(unittest.TestCase): | ||
def test_calculate_all(self): | ||
et_df = et.calculate_all(tmean, wind, rs, elevation, lat, tmax, tmin, | ||
rh) | ||
self.assertIsInstance(et_df, pd.DataFrame) |