Skip to content

Add ical_value property to vFrequency#1380

Closed
xxiaoxiong wants to merge 1 commit into
collective:mainfrom
xxiaoxiong:add-ical-value-vfrequency
Closed

Add ical_value property to vFrequency#1380
xxiaoxiong wants to merge 1 commit into
collective:mainfrom
xxiaoxiong:add-ical-value-vfrequency

Conversation

@xxiaoxiong
Copy link
Copy Markdown

This PR adds the ical_value property to vFrequency, contributing to Issue #876.

Changes

  • Added ical_value property to vFrequency (src/icalendar/prop/recur/frequency.py)
    • Returns: str - The frequency string value
    • Type hint: str
    • RFC reference: :rfc:5545#section-3.3.10
    • Includes comprehensive docstring with examples
    • Valid values: SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY

Tests

  • Created test_vFrequency.py with 7 comprehensive test cases:
    • test_ical_value_daily - Tests DAILY frequency
    • test_ical_value_all_frequencies - Tests all 7 valid frequencies
    • test_ical_value_from_ical - Tests with parsed ical strings
    • test_ical_value_case_insensitive - Tests case handling
    • test_ical_value_invalid_frequency - Tests validation
    • test_ical_value_weekly - Tests WEEKLY frequency
    • test_ical_value_yearly - Tests YEARLY frequency
  • All tests pass: 7 passed

Quality Checks

  • Add type hint
  • Add docstring with RFC reference
  • Add tests for all code paths
  • Pass ruff format check
  • Pass ruff lint check
  • All tests pass

Relates to #876

- Add ical_value property with type hints and docstring
- Returns the underlying string value
- Validates frequency is one of 7 valid values
- Add comprehensive tests for ical_value (7 test cases)
- All tests pass
- Code formatted with ruff

Relates to collective#876
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 icalendar | 🛠️ Build #32600693 | 📁 Comparing d7af6b9 against latest (7357cec)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@stevepiercy stevepiercy added the ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding. label May 20, 2026
@stevepiercy
Copy link
Copy Markdown
Member

@xxiaoxiong thank you for opening this PR. Because you haven't responded to the reviews and CI failures, I'm closing all of your PRs to let other contributors know that they are free to work on it. You're welcome to address our comments, resolve the matters, and reopen your pull request at any time, specifically to address the question of AI usage and add a change log, per Contribute. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants