python / python/planet

Automated RSS/Atom Feed Validation Workflow

未关闭
#614 2 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@matrixise 已经在做这个了。

开始于 2026年1月7日。

主要语言
Python
星标
144
派生
197
PR 合并指标
30 天内没有已合并 PR

描述

Hi @hugovk! 👋

Summary

I've been working on improving the issue templates and adding automated RSS/Atom feed validation for Planet Python feed requests. This addresses #579 by implementing automated feed validation in CI.

What I've Implemented

I've created a complete GitHub Actions workflow in my fork (https://github.com/matrixise/planet) that includes:

1. Modernized Issue Templates
  • Migrated from old markdown format to GitHub's YAML issue forms
  • Two templates: "Add or Edit RSS Feed" and "Bug Report"
  • Structured form fields with validation requirements
2. Automated Feed Validation Workflow

The workflow automatically validates feeds when issues are submitted, addressing the concerns raised in #579:

  • ✅ Validates URL format
  • ✅ Checks feed accessibility (HTTP 200)
  • ✅ Validates RSS/Atom structure using feedparser
  • ✅ Detects duplicate feeds in config.ini
  • ✅ Analyzes Python content (keyword detection)
  • 📝 Posts detailed validation results as comments
  • 🏷️ Adds labels based on validation status

This provides immediate CI validation for new feed submissions, catching issues before manual review.

3. Validation Results

The workflow posts a comprehensive comment showing:

  • All validation checks with emoji indicators (✅/⚠️/❌)
  • Python content analysis with keyword detection score
  • Duplicate detection against existing feeds
  • Sample article titles from the feed
  • Clear next steps for contributors and maintainers
  • Link to W3C Feed Validator for detailed validation
Example Output

See my test issue for a live example: https://github.com/matrixise/planet/issues/2

Benefits

  1. Addresses #579: Automatic feed validation in CI for new submissions
  2. Reduced maintainer workload: Automatic validation catches common issues
  3. Faster feedback: Contributors get immediate validation results
  4. Better quality: Ensures feeds are accessible, valid, and Python-relevant before review
  5. Duplicate prevention: Automatically detects if a feed already exists
  6. Transparency: Clear, detailed feedback for all submissions

Implementation Details

New Files:

  • .github/workflows/validate-feed-request.yml - Main validation workflow
  • .github/scripts/validate_feed.py - Feed validation logic (~450 lines)
  • .github/scripts/format_comment.py - Comment formatting (~250 lines)
  • .github/scripts/get_labels.py - Label extraction helper

Dependencies:

  • feedparser - RSS/Atom parsing
  • requests - HTTP accessibility checks

Labels Used:

  • feed-request - Triggers the workflow
  • validation-passed - All checks passed
  • validation-warning - Passed with warnings
  • validation-failed - Critical failure
  • duplicate-feed - Feed already exists

How This Addresses #579

While #579 requested periodic validation of existing feeds (cron job), this implementation provides:

  1. Immediate validation for new feed submissions via issues
  2. CI-based validation that runs automatically on GitHub Actions
  3. Foundation for future work: The validation scripts can easily be extended to run as a periodic cron job to check all existing feeds

The current implementation focuses on the submission workflow (validating new feeds), which is the most critical use case. Adding periodic validation of all existing feeds would be a natural next step.

Current Status

⚠️ Note: This is still in early testing phase. I haven't completed all test scenarios yet, but the initial results look very promising! The workflow successfully validates feeds and provides helpful feedback. I'm opening this issue to get early feedback from maintainers before investing more time in comprehensive testing and refinement.

Initial Testing

The workflow has been tested on my fork with the following scenario:

  • ✅ Valid feed with good Python content (Real Python)

The code includes logic to handle:

  • HTTP errors (404, timeouts, connection errors)
  • Malformed XML/RSS feeds (via feedparser's bozo detection)
  • Duplicate detection in config.ini
  • Python content analysis (keyword detection in titles and summaries)

However, I haven't systematically tested all error scenarios yet. The implementation looks solid, but comprehensive testing across different feed types and failure modes is still needed.

Python Content Detection Details

The workflow analyzes up to 10 recent articles and searches for Python-related keywords in titles and article summaries:

  • Keywords: python, django, flask, fastapi, pytest, pip, pandas, numpy, asyncio, pypi, virtualenv, conda, jupyter, matplotlib, scikit, tensorflow, pytorch
  • Score = percentage of articles containing at least one keyword
  • Thresholds: <30% = warning, 30-60% = suggestion to filter, >60% = good

Next Steps

I'd like to contribute this to the main python/planet repository. The workflow is:

  • Non-blocking (informational, doesn't prevent issue creation)
  • Complements manual review (doesn't replace maintainer judgment)
  • Fully automated (no maintenance required once set up)

Would you be interested in this addition? I'm happy to:

  1. Complete more comprehensive testing
  2. Open a PR with the implementation
  3. Make any adjustments based on feedback
  4. Help with documentation
  5. Extend it to add periodic validation of existing feeds (to fully address #579)

Let me know if you'd like me to proceed with a PR or if you'd like to see more testing first!

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。