fix output paths

This commit is contained in:
Abel Luck 2026-03-30 15:10:47 +02:00
parent 8af28c2f68
commit 36cf98a91c
6 changed files with 12 additions and 8 deletions

2
.gitignore vendored
View file

@ -13,3 +13,5 @@ logs
archive
*egg-info
*.db
*.db-shm
*.db-wal

View file

@ -192,7 +192,7 @@ def build_feed_settings(
{
"REPUBLISHER_OUT_DIR": str(out_dir),
"FEEDS": {
str(out_dir / f"{feed_slug}.rss"): {
str(feed_dir / "feed.rss"): {
"format": "rss",
"postprocessing": [],
"feed_name": feed_slug,

View file

@ -160,7 +160,7 @@ def generate_pangea_feed(
),
results=ResultsConfig(
output_to_file_p=True,
output_file_name="rss.xml",
output_file_name="pangea.rss",
output_directory=resolved_out_dir,
),
logging=LoggingConfig(

View file

@ -146,7 +146,7 @@ def test_build_feed_settings_derives_output_paths_from_feed_slug(
assert feed_settings["VIDEO_STORE"] == str(out_dir / "info-marti" / "video")
assert feed_settings["FILES_STORE"] == str(out_dir / "info-marti" / "files")
assert feed_settings["FEEDS"] == {
str(out_dir / "info-marti.rss"): {
str(out_dir / "info-marti" / "feed.rss"): {
"format": "rss",
"postprocessing": [],
"feed_name": "info-marti",

View file

@ -29,7 +29,7 @@ DOWNLOAD_TIMEOUT = 5
exit_code = entrypoint_module.entrypoint(["--config", str(config_path)])
output_path = tmp_path / "out" / "local-file.rss"
output_path = tmp_path / "out" / "local-file" / "feed.rss"
assert exit_code == 0
assert output_path.exists()
output = output_path.read_text(encoding="utf-8")

View file

@ -129,7 +129,7 @@ def test_job_runtime_run_now_writes_log_and_stats_and_marks_success(
assert execution.bytes_count > 0
assert artifacts.log_path.exists()
assert artifacts.stats_path.exists()
output_path = tmp_path / "out" / "manual-source.rss"
output_path = tmp_path / "out" / "manual-source" / "feed.rss"
assert output_path.exists()
output_text = output_path.read_text(encoding="utf-8")
assert "<title>Local Demo Feed</title>" in output_text
@ -246,7 +246,9 @@ def test_job_runtime_start_reconciles_stale_running_execution(tmp_path: Path) ->
runtime.shutdown()
def test_generate_pangea_feed_writes_rss_file(monkeypatch, tmp_path: Path) -> None:
def test_generate_pangea_feed_writes_pangea_rss_file(
monkeypatch, tmp_path: Path
) -> None:
class StubPangeaFeed:
def __init__(self, config, feeds):
self.config = config
@ -259,7 +261,7 @@ def test_generate_pangea_feed_writes_rss_file(monkeypatch, tmp_path: Path) -> No
return None
def disgorge(self, slug: str):
output_path = self.config.results.output_directory / slug / "rss.xml"
output_path = self.config.results.output_directory / slug / "pangea.rss"
output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(
"<rss><channel><title>Pangea Fixture</title></channel></rss>\n",
@ -289,7 +291,7 @@ def test_generate_pangea_feed_writes_rss_file(monkeypatch, tmp_path: Path) -> No
log_path=tmp_path / "out" / "logs" / "pangea.log",
)
assert output_path == (tmp_path / "out" / "pangea-source" / "rss.xml")
assert output_path == (tmp_path / "out" / "pangea-source" / "pangea.rss")
assert output_path.exists()
assert "Pangea Fixture" in output_path.read_text(encoding="utf-8")