Giter Site home page Giter Site logo

niccokunzmann / x-wr-timezone Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 3.0 100 KB

Handling of non-standard X-WR-TIMEZONE icalendar property in Python and Command Line

Home Page: https://pypi.org/project/x-wr-timezone/

License: GNU Lesser General Public License v3.0

Python 97.50% Shell 2.50%
icalendar icalendar-rfc icalendar-parsing icalendar-events

x-wr-timezone's Introduction

X-WR-TIMEZONE

CI build and test status

Python Package Version on Pypi

Downloads from Pypi

Support on Open Collective

Some calendar providers introduce the non-standard X-WR-TIMEZONE parameter to ICS calendar files. Strict interpretations according to RFC 5545 ignore the X-WR-TIMEZONE parameter. This causes the times of the events to differ from those which make use of X-WR-TIMEZONE.

This module aims to bridge the gap by converting calendars using X-WR-TIMEZONE to a strict RFC 5545 calendars. So, let's put our heads together and solve this problem for everyone!

Some features of the module are:

  • Easy install with Python's pip.
  • Command line conversion of calendars.
  • Piping of calendar files with wget or curl.

Some of the requirements are:

  • Calendars without X-WR-TIMEZONE are kept unchanged.
  • Passing calendars twice to this module does not change them.

Install

Install using pip:

python3 -m pip install x-wr-timezone

Support

Command Line Usage

You can standardize the calendars using your command line interface. The examples assume that in.ics is a calendar which may use X-WR-TIMEZONE, whereas out.ics does not require X-WR-TIMEZONE for proper display.

cat in.is | x-wr-timezone > out.ics
x-wr-timezone in.ics out.ics
curl https://example.org/in.ics | x-wr-timezone > out.ics
wget -O- https://example.org/in.ics | x-wr-timezone > out.ics

You can get usage help on the command line:

x-wr-timezone --help

Python

After you have installed the library, you can import it.

import x_wr_timezone

The function to_standard() converts an icalendar object.

x_wr_timezone.to_standard(an_icalendar)

Here is a full example which does about as much as this module is supposed to do:

import icalendar # installed with x_wr_timezone
import x_wr_timezone

with open("in.ics", 'rb') as file:
    calendar = icalendar.from_ical(file.read())
new_calendar = x_wr_timezone.to_standard(calendar)
# you could use the new_calendar variable now
with open('out.ics', 'wb') as file:
    file.write(new_calendar.to_ical())

to_standard(calendar, timezone=None) has these parameters:

  • calendar is the icalendar.Calendar object.
  • timezone is an optional time zone. By default, the time zone in calendar['X-WR-TIMEZONE'] is used to check if the calendar needs changing. When timezone is not None however, calendar['X-WR-TIMEZONE'] will not be tested and it is assumed that the calendar should be changed as if calendar['X-WR-TIMEZONE'] had the value of timezone. This does not add or change the value of calendar['X-WR-TIMEZONE']. You would need to do that yourself. timezone can be a string like "UTC" or "Europe/Berlin" or a pytz.timezone or something that datetime accepts as a time zone..
  • Return value: The calendar argument is not modified at all. The calendar returned has the attributes and subcomponents of the calendar only changed and copied where needed to return the proper value. As such, the returned calendar might be identical to the one passed to the function as the calendar argument. Keep that in mind if you modify the return value.

Development

  1. Clone the repository or its fork and cd x-wr-timezone.
  2. Optional: Install virtualenv and Python3 and create a virtual environment:

    pip install virtualenv
    virtualenv -p python3 ENV
    source ENV/bin/activate # you need to do this for each shell
  3. Install the packages and this module so it can be edited:

    pip install -r test-requirements.txt -e .
  4. Run the tests:

    pytest

To test all functions:

pytest --x-wr-timezone all

Testing with tox

You can use tox to test the package in different Python versions.

tox

This tests all the different functionalities:

tox -- --x-wr-timezone all

New Releases

To release new versions,

  1. edit the Changelog Section
  2. edit setup.py, the __version__ variable
  3. create a commit and push it
  4. Wait for CI tests to finish the build.
  5. run

    python3 setup.py tag_and_deploy
  6. notify the issues about their release

Testing

This project's development is driven by tests. Tests assure a consistent interface and less knowledge lost over time. If you like to change the code, tests help that nothing breaks in the future. They are required in that sense. Example code and ics files can be transferred into tests and speed up fixing bugs.

You can view the tests in the test folder. If you have a calendar ICS file for which this library does not generate the desired output, you can add it to the test/calendars folder and write tests for what you expect. If you like, open an issue first, e.g. to discuss the changes and how to go about it.

Changelog

  • v0.0.7
    • Rename master branch to main
    • Use proper SPDX license ID
    • Test Python 3.12
  • v0.0.6
    • Obsolete Python 3.7
    • Support Python 3.11
    • Fix localization issue for pytz when datetime has no timezone
    • Run tests on GitHub Actions
    • Require icalendar 5.0.11 for tests
    • Fix pytz localization issue when dateime is not in UTC and has no time zone.
  • v0.0.5
    • Revisit README and CLI and fix spelling mistakes.
    • Modified behavior to treat events without time zone found in a calendar using the X-WR-TIMEZONE property, see Pull Request 7
  • v0.0.4
    • Test automatic deployment with Gitlab CI.
  • v0.0.3
    • Use tzname() function of datetime to test for UTC. This helps support zoneinfo time zones.
    • Split up visitor class and rename it to walker.
  • v0.0.2
    • Implement the timezone argument.
    • Do not modify the value of the calendar argument and only copy it where needed.
  • v0.0.1
    • Initial release supports DTSTART, DTEND, EXDATE, RDATE, RECURRENCE-ID attributes of events.
    • Command line interface as x-wr-timezone.

This module was reated beause of these issues:

This module uses the icalendar library for parsing calendars. This library is used by python-recurring-ical-events to get events at specific dates.

License

This software is licensed under LGPLv3, see the LICENSE file.

x-wr-timezone's People

Contributors

franc6 avatar niccokunzmann avatar nicohood avatar shortfinga avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

x-wr-timezone's Issues

Test other UTC time zones

To be compatible with zoneinfo and pytz and the datetime UTC, we should test that these UTC time zones work with this module


We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar

Test failures with icalendar 5.0.9

============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.0, pluggy-1.2.0
rootdir: /build/source
collected 278 items

test/test_command_line.py .                                              [  0%]
test/test_convert_examples.py FFF......FFFFFF...FFFFFFssssssssssssssssss [ 15%]
ssssssssssssssssssssssssssssssFFF.........FFFFFF...FFFssssssssssssssssss [ 41%]
ssssssssssssssssssssssssssssss................................ssssssssss [ 67%]
ssssssssssssssssssssssssssssssssssssssssssssssssssssss...ssssss...       [ 91%]
test/test_copy.py ......................                                 [ 98%]
test/test_examples.py ..                                                 [ 99%]
test/test_readme.py .                                                    [100%]

=================================== FAILURES ===================================
_______________ test_input_to_output[to_standard-calendar_pair0] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <rdate hackerpublicradio.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
_______________ test_input_to_output[to_standard-calendar_pair1] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <rdate hackerpublicradio.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
_______________ test_input_to_output[to_standard-calendar_pair2] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <rdate hackerpublicradio.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
_______________ test_input_to_output[to_standard-calendar_pair9] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <moved event RECURRENCE ID.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Partyborn Zeitgeist
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair10] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <moved event RECURRENCE ID.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Partyborn Zeitgeist
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair11] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <moved event RECURRENCE ID.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Partyborn Zeitgeist
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair12] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <x wr timezone not present.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: test
E       assert VCALENDAR({'V...fff66447c0>})) == VCALENDAR({'V...fff6645720>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair13] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <x wr timezone not present.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: test
E       assert VCALENDAR({'V...fff65c6440>})) == VCALENDAR({'V...fff65c4df0>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair14] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <x wr timezone not present.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: test
E       assert VCALENDAR({'V...fff6644a30>})) == VCALENDAR({'V...fff6a05330>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair18] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <single event no tz.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: MyCalendar
E       assert VCALENDAR({'V...timezone'')})) == VCALENDAR({'V...timezone'')}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair19] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <single event no tz.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: MyCalendar
E       assert VCALENDAR({'V...timezone'')})) == VCALENDAR({'V...timezone'')}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair20] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <single event no tz.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: MyCalendar
E       assert VCALENDAR({'V...timezone'')})) == VCALENDAR({'V...timezone'')}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair21] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <exdate hackerpublicradio modified.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair22] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <exdate hackerpublicradio modified.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
______________ test_input_to_output[to_standard-calendar_pair23] _______________

to_standard = <function to_standard at 0x7ffff6a78280>
calendar_pair = <exdate hackerpublicradio modified.in+.out>

    def test_input_to_output(to_standard, calendar_pair):
        """Test the calendars which are a pair of input and output."""
        output = to_standard(calendar_pair.input.as_icalendar())
>       assert output == calendar_pair.output.as_icalendar(), calendar_pair.message
E       AssertionError: Hacker Public Radio
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:17: AssertionError
___________ test_output_stays_the_same[to_standard-output_calendar0] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <exdate hackerpublicradio modified.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
___________ test_output_stays_the_same[to_standard-output_calendar1] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <exdate hackerpublicradio modified.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
___________ test_output_stays_the_same[to_standard-output_calendar2] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <exdate hackerpublicradio modified.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar12] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <rdate hackerpublicradio.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar13] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <rdate hackerpublicradio.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar14] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <rdate hackerpublicradio.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...ity News'')})) == VCALENDAR({'V...ity News'')}))
E         Omitting 4 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar15] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <moved event RECURRENCE ID.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar16] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <moved event RECURRENCE ID.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar17] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <moved event RECURRENCE ID.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'P...NSPARENT'')})) == VCALENDAR({'P...NSPARENT'')}))
E         Omitting 7 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar21] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <x wr timezone not present.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...fff649dea0>})) == VCALENDAR({'V...fff649d3f0>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar22] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <x wr timezone not present.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...fff65d4400>})) == VCALENDAR({'V...fff65d47c0>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
__________ test_output_stays_the_same[to_standard-output_calendar23] ___________

to_standard = <function to_standard at 0x7ffff6a78280>
output_calendar = <x wr timezone not present.out>

    def test_output_stays_the_same(to_standard, output_calendar):
        assert output_calendar.is_corrected_output()
        output = to_standard(output_calendar.as_icalendar())
>       assert output == output_calendar.as_icalendar(), "A calendar that was modified one should stay as it is."
E       AssertionError: A calendar that was modified one should stay as it is.
E       assert VCALENDAR({'V...fff65dbaf0>})) == VCALENDAR({'V...fff65d87c0>}))
E         Omitting 5 identical items, use -vv to show
E         Use -v to get more diff

test/test_convert_examples.py:23: AssertionError
=========================== short test summary info ============================
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair0] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair1] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair2] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair9] - AssertionError: Partyborn Zeitgeist
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair10] - AssertionError: Partyborn Zeitgeist
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair11] - AssertionError: Partyborn Zeitgeist
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair12] - AssertionError: test
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair13] - AssertionError: test
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair14] - AssertionError: test
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair18] - AssertionError: MyCalendar
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair19] - AssertionError: MyCalendar
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair20] - AssertionError: MyCalendar
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair21] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair22] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_input_to_output[to_standard-calendar_pair23] - AssertionError: Hacker Public Radio
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar0] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar1] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar2] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar12] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar13] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar14] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar15] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar16] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar17] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar21] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar22] - AssertionError: A calendar that was modified one should stay as it is.
FAILED test/test_convert_examples.py::test_output_stays_the_same[to_standard-output_calendar23] - AssertionError: A calendar that was modified one should stay as it is.
================== 27 failed, 85 passed, 166 skipped in 2.07s ==================

We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar

Test other UTC time zones

To be compatible with zoneinfo and pytz and the datetime UTC, we should test that these UTC time zones work with this module


We're using [Polar.sh](https://polar.sh/niccokunzmann) so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar

Insert VTIMEZONE information

To truely be complient with RFC 5545, the time zone components need to be added to the calendar file.

Ideas:


We're using [Polar.sh](https://polar.sh/niccokunzmann) so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work. Fund with Polar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.