Remove the config of flake8-rst-docstrings
This commit is contained in:
parent
21d6066086
commit
13eedbf699
12 changed files with 17 additions and 23 deletions
|
|
@ -203,8 +203,6 @@ select = [
|
|||
"T100",
|
||||
# flake8-docstrings => PEP257 compliance
|
||||
"D1", "D2", "D3", "D4",
|
||||
# flake8-rst-docstrings => valid rst in docstrings
|
||||
"RST2", "RST3", "RST4",
|
||||
# flake8-string-format => unify usage of str.format()
|
||||
"P1", "P2", "P3",
|
||||
# flake8-quotes => use double quotes everywhere (complying with black)
|
||||
|
|
@ -236,10 +234,6 @@ extend-ignore = [
|
|||
"E203", "W503",
|
||||
# Let's not do `@pytest.mark.no_cover()` instead of `@pytest.mark.no_cover`.
|
||||
"PT023",
|
||||
# Google's Python Style Guide is not reStructuredText
|
||||
# until after being processed by Sphinx Napoleon.
|
||||
# Source: https://github.com/peterjc/flake8-rst-docstrings/issues/17
|
||||
"RST201", "RST203", "RST210", "RST213", "RST301",
|
||||
]
|
||||
|
||||
per-file-ignores = [
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def tactical_heuristic( # noqa:C901
|
|||
TIME_STEP: length of one time step in minutes; defaults to `60`
|
||||
|
||||
TRAIN_HORIZON: length of the training horizon; defaults to `8`
|
||||
""" # noqa:D412,D417,RST215
|
||||
""" # noqa:D412,D417
|
||||
# Input validation.
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class Forecast(meta.Base):
|
|||
|
||||
Returns:
|
||||
forecasts: the `data` as `Forecast` objects
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
forecasts = []
|
||||
|
||||
for timestamp_idx in data.index:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ predictive routing strategy employed by the UDP.
|
|||
|
||||
A future `planning` sub-package will contain the `*Model`s used to plan the
|
||||
`Courier`'s shifts a week ahead.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
from velofy.forecasts.models.base import ForecastingModelABC
|
||||
from velofy.forecasts.models.tactical.horizontal import HorizontalETSModel
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ Urban Delivery Platform".
|
|||
For the paper check:
|
||||
https://code.webartifex.de/alexander/velofy-forecasting/src/branch/main/paper.pdf
|
||||
https://www.sciencedirect.com/science/article/pii/S1366554520307936
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ corresponding to the same time of day as the one to be predicted (i.e., the
|
|||
one starting at `predict_at`). Then, they make a prediction for only one day
|
||||
into the future. Thus, the training time series have a `frequency` of `7`, the
|
||||
number of days in a week.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
import datetime as dt
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
... that cannot be classified into either "horizontal", "vertical",
|
||||
or "real-time".
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
import datetime as dt
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ the one starting at `predict_at`). Thus, the training time series have a
|
|||
day. For example, for 60-minute time steps, the `frequency` becomes `7 * 12`
|
||||
(= operating hours from 11 am to 11 pm), which is `84`. Real-time `*Model`s
|
||||
train the forecasting `methods` on a seasonally decomposed time series internally.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
import datetime as dt
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Thus, the training time series have a `frequency` of the number of weekdays,
|
|||
steps, the `frequency` becomes `7 * 12` (= operating hours from 11 am to 11 pm),
|
||||
which is `84`. Vertical `*Model`s train the forecasting `methods` on a seasonally
|
||||
decomposed time series internally.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
import datetime as dt
|
||||
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ class OrderHistory:
|
|||
most promising forecasting `*Model`
|
||||
|
||||
# noqa:DAR401 RuntimeError
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
add = self.avg_daily_demand(
|
||||
pixel_id=pixel_id,
|
||||
predict_day=predict_day,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class TestGenericForecastingModelProperties:
|
|||
So, these test cases are more like integration tests conceptually.
|
||||
|
||||
Also, note that some `methods.*.predict()` functions use R behind the scenes.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
|
||||
def test_create_model(self, model_cls, order_history):
|
||||
"""Test instantiation of a new and concrete `*Model` object."""
|
||||
|
|
@ -52,7 +52,7 @@ class TestGenericForecastingModelProperties:
|
|||
|
||||
Important: this test case has a side effect that is visible
|
||||
across the different parametrized versions of this case!
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
assert model.name not in self.unique_model_names
|
||||
|
|
@ -70,7 +70,7 @@ class TestGenericForecastingModelProperties:
|
|||
"""`*Model.predict()` returns a `pd.DataFrame` ...
|
||||
|
||||
... with known columns.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
result = model.predict(
|
||||
|
|
@ -100,7 +100,7 @@ class TestGenericForecastingModelProperties:
|
|||
"""`*Model.predict()` returns a row for ...
|
||||
|
||||
... the time step starting at `predict_at`.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
result = model.predict(
|
||||
|
|
@ -122,7 +122,7 @@ class TestGenericForecastingModelProperties:
|
|||
"""`*Model.predict()` returns a `pd.DataFrame` ...
|
||||
|
||||
... where the "actual" and "prediction" columns must not be empty.
|
||||
""" # noqa:RST215
|
||||
"""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
result = model.predict(
|
||||
|
|
@ -144,7 +144,7 @@ class TestGenericForecastingModelProperties:
|
|||
pixel,
|
||||
predict_at,
|
||||
):
|
||||
"""`*Model.make_forecast()` returns a `Forecast` object.""" # noqa:RST215
|
||||
"""`*Model.make_forecast()` returns a `Forecast` object."""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
result = model.make_forecast(
|
||||
|
|
@ -168,7 +168,7 @@ class TestGenericForecastingModelProperties:
|
|||
pixel,
|
||||
predict_at,
|
||||
):
|
||||
"""`*Model.make_forecast()` caches the `Forecast` object.""" # noqa:RST215
|
||||
"""`*Model.make_forecast()` caches the `Forecast` object."""
|
||||
model = model_cls(order_history=order_history)
|
||||
|
||||
assert db_session.query(db.Forecast).count() == 0
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class TestChooseTacticalModel:
|
|||
self,
|
||||
order_history,
|
||||
good_pixel_id,
|
||||
predict_at, # noqa:RST215
|
||||
predict_at,
|
||||
):
|
||||
"""For `train_horizon` values not included in the rule-based system ...
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue