Skip to content

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Dec 18, 2025

Summary

Phase 3: RSS 1.0 validation and enhancement + Bindings support

Core Library

  • Add Syndication Module namespace support (syn:updatePeriod, syn:updateFrequency, syn:updateBase)
  • Add content:encoded namespace support to RSS 1.0 parser
  • Create comprehensive RSS 1.0 integration tests (12+ test cases)
  • Add is_syn_tag() helper for namespace detection

Python Bindings

  • Add PySyndicationMeta wrapper class with PyO3 bindings
  • Add syndication, dc_creator, dc_publisher, dc_rights getters to FeedMeta
  • Performance optimized: Returns &str instead of String for enum values

Node.js Bindings

  • Add SyndicationMeta struct with napi-rs bindings
  • Add syndication and Dublin Core fields to FeedMeta
  • Simplified Entry conversion using idiomatic .collect() pattern

New Files

Core

  • crates/feedparser-rs-core/src/namespace/syndication.rs
  • crates/feedparser-rs-core/tests/test_rss10.rs

Python Bindings

  • crates/feedparser-rs-py/src/types/syndication.rs
  • crates/feedparser-rs-py/tests/test_syndication.py

Node.js Bindings

  • crates/feedparser-rs-node/__test__/syndication.spec.mjs

Review Results

Review Status Grade
Performance ✅ APPROVED Optimized after fixes
Security ✅ APPROVED Low risk (98/100)
Testing ✅ APPROVED B+ → A- after edge cases
Code Review ✅ APPROVED A-

Test Plan

  • Core: 510+ tests passing
  • Python: 9 syndication tests passing
  • Node.js: 8 syndication tests passing
  • Clippy clean (no warnings)
  • Edge cases: invalid input, case-insensitivity, partial data
  • Bozo pattern compliance verified

- Add Syndication Module namespace support (syn:updatePeriod, syn:updateFrequency, syn:updateBase)
- Add content:encoded namespace support to RSS 1.0 parser
- Create comprehensive RSS 1.0 integration tests (12+ test cases)
- Add is_syn_tag() helper for namespace detection
- All 510 tests passing, clippy clean

Phase 3: RSS 1.0 validation and enhancement
@github-actions github-actions bot added type: tooling Development tools, CI/CD, or infrastructure component: core feedparser-rs-core Rust library component: python Python bindings (PyO3) component: node Node.js bindings (napi-rs) component: tests Test suite or test infrastructure area: parser Feed parsing logic area: rss RSS 0.9x, 1.0, 2.0 support area: atom Atom 1.0 support lang: rust Rust code lang: javascript JavaScript/TypeScript code size: XXL Huge PR (1000+ lines changed) size: XL Extra large PR (<1000 lines changed) and removed size: XXL Huge PR (1000+ lines changed) labels Dec 18, 2025
… Node.js bindings

Add complete support for syndication module (RSS 1.0) and Dublin Core metadata
fields in both Python (PyO3) and Node.js (napi-rs) bindings.

Changes:
- Export SyndicationMeta and UpdatePeriod from core library
- Python bindings:
  - New PySyndicationMeta wrapper class with update_period, update_frequency, update_base getters
  - Added syndication, dc_creator, dc_publisher, dc_rights getters to PyFeedMeta
  - Added comprehensive test suite for syndication and Dublin Core fields
- Node.js bindings:
  - New SyndicationMeta struct with automatic camelCase conversion (updatePeriod, etc.)
  - Added syndication, dcCreator, dcPublisher, dcRights fields to FeedMeta
  - Added test suite for syndication and Dublin Core fields
- All tests passing
- Clippy clean with no warnings

This completes Phase 3 syndication bindings implementation.
@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 99.40828% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/feedparser-rs-core/src/namespace/syndication.rs 99.08% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   91.08%   91.55%   +0.46%     
==========================================
  Files          32       33       +1     
  Lines        6447     6616     +169     
==========================================
+ Hits         5872     6057     +185     
+ Misses        575      559      -16     
Flag Coverage Δ
rust-core 91.55% <99.40%> (+0.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crates/feedparser-rs-core/src/lib.rs 20.95% <ø> (ø)
crates/feedparser-rs-core/src/namespace/mod.rs 100.00% <100.00%> (ø)
crates/feedparser-rs-core/src/parser/common.rs 77.33% <100.00%> (+0.30%) ⬆️
crates/feedparser-rs-core/src/parser/rss10.rs 94.27% <100.00%> (+3.70%) ⬆️
crates/feedparser-rs-core/src/types/feed.rs 96.36% <ø> (ø)
...es/feedparser-rs-core/src/namespace/syndication.rs 99.08% <99.08%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Python: Return &str instead of String for update_period() to avoid allocation
- Python: Optimize __repr__ to access fields directly without allocations
- Node.js: Simplify Entry conversion using collect() for all Vec fields
- Add tests for invalid input handling (bozo pattern)
- Add tests for case-insensitive updatePeriod parsing
- Add tests for partial syndication metadata

All tests passing, clippy clean.
@bug-ops bug-ops force-pushed the feat/phase3-rss10-validation branch from 3666fde to f604fb8 Compare December 18, 2025 12:12
@github-actions github-actions bot added the lang: python Python code label Dec 18, 2025
@bug-ops bug-ops self-assigned this Dec 18, 2025
@github-actions github-actions bot added size: XXL Huge PR (1000+ lines changed) and removed size: XL Extra large PR (<1000 lines changed) labels Dec 18, 2025
@bug-ops bug-ops requested a review from Copilot December 18, 2025 12:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive support for the RSS 1.0 Syndication Module namespace, including update schedule metadata (updatePeriod, updateFrequency, updateBase), enhances RSS 2.0 xml:lang support, adds Creative Commons license field support across all formats, and provides extensive test coverage with 12+ integration tests for RSS 1.0 parsing.

Key Changes

  • Syndication Module Implementation: New namespace/syndication.rs module with UpdatePeriod enum, SyndicationMeta struct, and parsing handlers for RSS 1.0 update schedule metadata
  • Parser Enhancements: Added syndication and content namespace support to RSS 1.0 parser, xml:lang attribute propagation in RSS 2.0, and license field extraction in RSS 2.0/Atom
  • Cross-Language Bindings: Exposed syndication metadata and license fields in both Python (PyO3) and Node.js (napi-rs) bindings with proper type conversions
  • Comprehensive Testing: Added 12 integration tests for RSS 1.0 (basic parsing, Dublin Core, content:encoded, syndication, edge cases) plus binding-specific tests

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/feedparser-rs-core/src/namespace/syndication.rs New syndication module with UpdatePeriod enum, parsing logic, and comprehensive unit tests
crates/feedparser-rs-core/src/parser/rss10.rs Integrated syndication and content namespace handlers into RSS 1.0 parser
crates/feedparser-rs-core/src/parser/rss.rs Added xml:lang attribute extraction and license field support for RSS 2.0
crates/feedparser-rs-core/src/parser/atom.rs Added license link relation extraction for Atom feeds
crates/feedparser-rs-core/src/parser/common.rs Added is_syn_tag() and extract_xml_lang() helper functions
crates/feedparser-rs-core/src/types/feed.rs Added license and syndication fields to FeedMeta
crates/feedparser-rs-core/src/types/entry.rs Added license field to Entry
crates/feedparser-rs-core/tests/test_rss10.rs Comprehensive RSS 1.0 integration tests (520 lines, 12 test cases)
crates/feedparser-rs-py/src/types/syndication.rs Python bindings for SyndicationMeta with proper getter methods
crates/feedparser-rs-py/src/types/feed_meta.rs Exposed syndication, license, and Dublin Core fields to Python
crates/feedparser-rs-py/tests/test_syndication.py Python binding tests for syndication namespace (9 test cases)
crates/feedparser-rs-node/src/lib.rs Node.js bindings with SyndicationMeta interface and type conversions (with Vec pre-allocation removed)
crates/feedparser-rs-node/index.d.ts TypeScript definitions for syndication metadata and license fields
crates/feedparser-rs-node/__test__/syndication.spec.mjs Node.js binding tests for syndication namespace (9 test cases)

@bug-ops bug-ops changed the title feat(rss10): add syndication namespace and comprehensive test coverage feat(rss10): add syndication namespace with Python and Node.js bindings Dec 18, 2025
@bug-ops bug-ops merged commit ea0cd24 into main Dec 18, 2025
31 checks passed
@bug-ops bug-ops deleted the feat/phase3-rss10-validation branch December 18, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: atom Atom 1.0 support area: parser Feed parsing logic area: rss RSS 0.9x, 1.0, 2.0 support component: core feedparser-rs-core Rust library component: node Node.js bindings (napi-rs) component: python Python bindings (PyO3) component: tests Test suite or test infrastructure lang: javascript JavaScript/TypeScript code lang: python Python code lang: rust Rust code size: XXL Huge PR (1000+ lines changed) type: tooling Development tools, CI/CD, or infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants