Skip to content

Commit 3de9940

Browse files
committed
py: docs: fix python version in docs
Configures python docs to automatically use the python package version. + clippy fixes Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
1 parent d4da2a6 commit 3de9940

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

crates/feldera-types/src/config.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ pub struct SyncConfig {
592592
/// The pipeline **never writes** to `read_bucket`.
593593
///
594594
/// Must point to a different location than `bucket`.
595+
#[serde(default)]
595596
pub read_bucket: Option<String>,
596597
}
597598

@@ -615,12 +616,13 @@ Standby mode requires `start_from_checkpoint` to be set.
615616
Consider setting `start_from_checkpoint` to `"latest"`."#.to_owned());
616617
}
617618

618-
if let Some(ref rb) = self.read_bucket {
619-
if rb == &self.bucket {
620-
return Err(
621-
"invalid sync config: `read_bucket` and `bucket` must point to different locations".to_owned()
622-
);
623-
}
619+
if let Some(ref rb) = self.read_bucket
620+
&& rb == &self.bucket
621+
{
622+
return Err(
623+
"invalid sync config: `read_bucket` and `bucket` must point to different locations"
624+
.to_owned(),
625+
);
624626
}
625627

626628
Ok(())

python/docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
import os
1010
import sys
11+
from importlib.metadata import version as _pkg_version
1112

1213
sys.path.insert(0, os.path.abspath(".."))
1314

1415
project = "Feldera Python SDK"
1516
copyright = "2024, Feldera"
1617
author = "Feldera"
17-
release = "0.0.1"
18+
release = _pkg_version("feldera")
1819

1920
# -- General configuration ---------------------------------------------------
2021
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

python/tests/platform/test_checkpoint_sync.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def storage_cfg(
4949
"standby": standby,
5050
"pull_interval": pull_interval,
5151
"push_interval": push_interval,
52-
"retention_min_count": retention_min_age,
53-
"retention_min_age": retention_min_count,
52+
"retention_min_count": retention_min_count,
53+
"retention_min_age": retention_min_age,
5454
}
5555
if read_bucket is not None:
5656
sync["read_bucket"] = read_bucket
@@ -323,7 +323,7 @@ def test_standby_activation_from_uuid(self):
323323
@single_host_only
324324
def test_standby_fallback(self, from_uuid: bool = False):
325325
# Step 1: Start main pipeline
326-
storage_config = storage_cfg(self.pipeline.name)
326+
storage_config = storage_cfg(self.pipeline.name, retention_min_age=1)
327327
ft = FaultToleranceModel.AtLeastOnce
328328
self.pipeline.set_runtime_config(
329329
RuntimeConfig(

0 commit comments

Comments
 (0)