Skip to content

Commit

Permalink
add xfails for posting forecasts (#768)
Browse files Browse the repository at this point in the history
* add xfails for posting forecasts

* add xfails to all realapisession tests that rely on database consistency

* set 1.0.12 release date in whatsnew

Co-authored-by: lboeman <[email protected]>
  • Loading branch information
wholmgren and lboeman authored Jan 11, 2022
1 parent d428212 commit 881fbab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/whatsnew/1.0.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. py:currentmodule:: solarforecastarbiter
1.0.12 (January ??, 2022)
1.0.12 (January 11, 2022)
--------------------------

Fixed
Expand Down
10 changes: 10 additions & 0 deletions solarforecastarbiter/io/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,7 @@ def test_real_apisession_get_prob_forecast_constant_value(real_session):
assert isinstance(fx, datamodel.ProbabilisticForecastConstantValue)


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_observation_values(real_session):
start = pd.Timestamp('2019-04-15T00:00:00Z')
end = pd.Timestamp('2019-04-15T12:00:00Z')
Expand All @@ -1458,6 +1459,7 @@ def test_real_apisession_get_observation_values_tz(real_session):
pdt.assert_frame_equal(obs.loc[start:end], obs)


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_forecast_values(real_session):
start = pd.Timestamp('2019-04-15T00:00:00Z')
end = pd.Timestamp('2019-04-15T12:00:00Z')
Expand All @@ -1482,6 +1484,7 @@ def test_real_apisession_get_forecast_values_tz(real_session):
pdt.assert_series_equal(fx.loc[start:end], fx)


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_prob_forecast_values_tz(real_session):
# use different tzs to confirm that it works
start = pd.Timestamp('2019-04-14T20:00:00-0400')
Expand All @@ -1495,6 +1498,7 @@ def test_real_apisession_get_prob_forecast_values_tz(real_session):
pdt.assert_series_equal(fx.loc[start:end], fx)


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_post_observation_values(real_session):
# using a random hour reduces collisions between parallel CI
# processes
Expand All @@ -1514,6 +1518,7 @@ def test_real_apisession_post_observation_values(real_session):
pdt.assert_series_equal(obs['value'], test_df['value'])


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_post_forecast_values(real_session):
# using a random hour reduces collisions between parallel CI
# processes
Expand All @@ -1532,6 +1537,7 @@ def test_real_apisession_post_forecast_values(real_session):
pdt.assert_series_equal(fx, test_ser)


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_post_prob_forecast_constant_val_values(real_session):
# using a random hour reduces collisions between parallel CI
# processes
Expand Down Expand Up @@ -1579,6 +1585,7 @@ def test_real_apisession_create_aggregate(real_session, aggregate):
getattr(obs, attr))


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_aggregate_values(real_session):
start = pd.Timestamp('2019-04-15T00:00:00Z')
end = pd.Timestamp('2019-04-15T12:00:00Z')
Expand All @@ -1596,6 +1603,7 @@ def test_real_apisession_get_user_info(real_session):
assert user_info['organization'] == 'Organization 1'


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_observation_time_range(real_session):
out = real_session.get_observation_time_range(
'123e4567-e89b-12d3-a456-426655440000')
Expand All @@ -1604,6 +1612,7 @@ def test_real_apisession_get_observation_time_range(real_session):
pd.Timestamp('2019-04-17T06:55:00Z'))


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_forecast_time_range(real_session):
out = real_session.get_forecast_time_range(
'f8dd49fa-23e2-48a0-862b-ba0af6dec276')
Expand All @@ -1612,6 +1621,7 @@ def test_real_apisession_get_forecast_time_range(real_session):
pd.Timestamp('2019-04-17T06:59:00Z'))


@pytest.mark.xfail(reason="database consistency")
def test_real_apisession_get_cdf_forecast_time_range(real_session):
out = real_session.get_probabilistic_forecast_constant_value_time_range(
'633f9b2a-50bb-11e9-8647-d663bd873d93')
Expand Down

0 comments on commit 881fbab

Please sign in to comment.