Skip to content

Conversation

@tobixen
Copy link
Member

@tobixen tobixen commented Nov 18, 2024

Creating a server checker that can output a list of "server quirks".

Some changes have been done to the test framework and even some to the actual code. Should fix the CHANGELOG properly before merging this into the project.

Eventually, the "quirk list" should be organized a bit better, some of the quirks should be renamed, and I was also intending to move the server checker to a separate project https://github.com/tobixen/caldav-server-tester - that would probably be the better idea.

When this is done, I may start working on #402.

@tobixen tobixen force-pushed the server_checker branch 2 times, most recently from 5dc2040 to 65bb875 Compare November 21, 2024 22:26
@niccokunzmann
Copy link
Contributor

@tobixen, that seems to be related a bit to #463

A separate project could be an idea for that. Especially if it has a different focus. I am not to sure about this because I am new to caldav.

Also: For the Open Web Calendar in niccokunzmann/open-web-calendar#660

  • I am adding CalDAV support with this lib.
  • I used the responses library to record API interactions AND create test cases with them. For claiming compatibility with edge-cases and quirks something like this could be useful for this lib, too.

Proposed Interface:

client = DAVClient(...)
client.record_api()
# normal interactions
client.save_recorded_api("filename.yml")

Use an API recording:

client = DAVClient(...)
client.load_recorded_api("filename.yml")
# all interactions here after will be done against the recorded API
client.stop_recorded_api()

This is really nice for testing, too and I am using this also in python-wise-banking-api.

We can also open another issue if you like to discuss this or have a call.

@tobixen
Copy link
Member Author

tobixen commented Mar 6, 2025

@tobixen, that seems to be related a bit to #463

Didn't think of it, but you may be right.

A separate project could be an idea for that. Especially if it has a different focus. I am not to sure about this because I am new to caldav.

Indeed, I already have on my list to move the code over to https://github.com/tobixen/caldav-server-tester

  • I used the responses library to record API interactions AND create test cases with them. For claiming compatibility with edge-cases and quirks something like this could be useful for this lib, too.

Probably. The work I've done here sort of works, but my intention was to create nice and readable code, and I feel I've failed miserably on that point.

With some luck I will be able to allocate some time during the weekend or later today for looking into those things.

@tobixen
Copy link
Member Author

tobixen commented Mar 6, 2025

My "quirk list" is also a mess, I'm considering to look through it and try to organize it a bit better.

@niccokunzmann
Copy link
Contributor

create nice and readable code

I like the comment documentation about all the different cases considered. I think that is nice to understand all the work that goes into compatibility, with all the references. So, I find that I can read it and understand it and make changes. For me, it is fine in that sense.

later today for looking into those things

No rush! It is probably exciting that there are PRs. My code works with the release. I am fine!

@niccokunzmann
Copy link
Contributor

niccokunzmann commented Mar 6, 2025

@tobixen, if you do not mind, I would add this kind of testing to a possible funded proposal by NLNet

@tobixen
Copy link
Member Author

tobixen commented Mar 6, 2025

Not sure exactly what it involves, but I'm ok with it :-)

@tobixen
Copy link
Member Author

tobixen commented Mar 6, 2025

I'm inviting you to the (empty) caldav server tester project, in case you want to contribute something there.

Probably the "quirk list" (currently in the tests directory) should be moved to the caldav server tester project, and the latter should be made a dependency from the caldav project. Perhaps only a test dependency in the beginning, but my intention is to allow users to specify quirks (or ask the library to test for quirks) and utilize the quirks list when the library is doing interactions with the server.

@tobixen tobixen mentioned this pull request May 5, 2025
32 tasks
@tobixen
Copy link
Member Author

tobixen commented May 15, 2025

I'm moving the script to the empty repository now.

My long-term plan is to allow the caldav library to probe the server to check for known compatibility-problems. To avoid circular dependencies, I think the best would be to have the actual code doing the probing in the caldav library itself, and just offer a thin CLI as a separate package. So my long-term plan is to move logic from the script and back into the caldav library.

The short-term plan is to wrap up the current script and make sure it can be installed from pypi and AUR, and run towards any server.

@tobixen tobixen marked this pull request as ready for review May 15, 2025 15:22
@tobixen tobixen merged commit 8c1f1ad into master May 15, 2025
8 checks passed
@tobixen tobixen deleted the server_checker branch May 15, 2025 15:40
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.

3 participants