Skip to content

feat: handle multiple VCALENDAR components in a single ICS file#310

Merged
niccokunzmann merged 3 commits intomergecal:mainfrom
SashankBhamidi:feat/multiple-vcalendars-in-one-file
Feb 24, 2026
Merged

feat: handle multiple VCALENDAR components in a single ICS file#310
niccokunzmann merged 3 commits intomergecal:mainfrom
SashankBhamidi:feat/multiple-vcalendars-in-one-file

Conversation

@SashankBhamidi
Copy link
Copy Markdown
Collaborator

Closes #22

.ics files can contain multiple concatenated VCALENDAR blocks. Previously this caused a ValueError when parsing. This adds calendars_from_ical() using Calendar.from_ical(data, multiple=True) as the single parsing entry point across the CLI and test helpers.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

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

Files with missing lines Patch % Lines
src/mergecal/cli.py 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/mergecal/__init__.py 100.00% <100.00%> (ø)
src/mergecal/calendar_merger.py 100.00% <100.00%> (ø)
src/mergecal/cli.py 50.00% <50.00%> (-2.00%) ⬇️
🚀 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.

Copy link
Copy Markdown
Member

@abe-101 abe-101 left a comment

Choose a reason for hiding this comment

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

Change looks good to me; Would like to get @niccokunzmann review for approval

Copy link
Copy Markdown
Collaborator

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

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

Hm. It seems we already have a fixture to access the calendars.
Also, keeping a uniform interface is quite nice.

Comment thread tests/test_multiple_vcalendars.py Outdated
Comment thread tests/test_multiple_vcalendars.py Outdated
Comment thread tests/conftest.py Outdated
Comment thread tests/conftest.py
@SashankBhamidi SashankBhamidi force-pushed the feat/multiple-vcalendars-in-one-file branch from 699f791 to 0d47176 Compare February 24, 2026 10:31
@SashankBhamidi
Copy link
Copy Markdown
Collaborator Author

@niccokunzmann I deferred module-scoped dict fixture, adds complexity without performance benefit for current test scope.

Copy link
Copy Markdown
Collaborator

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

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

Generally, it is good to use the existing fixtures. You could even remove two_vcalendars_cals to make the tests slimmer.

I think this should work somehow like this now.

Comment thread tests/test_multiple_vcalendars.py Outdated
Comment thread tests/conftest.py Outdated
@SashankBhamidi SashankBhamidi force-pushed the feat/multiple-vcalendars-in-one-file branch from 4536d39 to c628558 Compare February 24, 2026 11:04
niccokunzmann
niccokunzmann previously approved these changes Feb 24, 2026
Copy link
Copy Markdown
Collaborator

@niccokunzmann niccokunzmann left a comment

Choose a reason for hiding this comment

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

Cool. Nice that that works!

@SashankBhamidi
Copy link
Copy Markdown
Collaborator Author

Thanks for the reviews - Nicco and Abe!

@niccokunzmann niccokunzmann merged commit c83241d into mergecal:main Feb 24, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multiple calendars in one file [awareness|edge case]

3 participants