Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a simple test for create-sibling-webdav's recursive mode #434

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

adswa
Copy link
Member

@adswa adswa commented Jul 17, 2023

This fixes #32 with a simple extension to the check_common_workflow function for a recursive invocation of create-sibling-webdav, a check for the appropriate number of results, and a check for the existence of the target directories of the recursively published subdataset.

I debated whether I should create a dedicated test to not inflate the check_common_workflow function, and I narrowly decided against it: By adding it to check_common_workflow the recursive mode gets tested for every mode automatically, and the increase in time is 1.5-2 seconds over the entire test suite. In comparison, a dedicated test function adds 3-4 seconds for just setting up the dataset hierarchy (see timings below). But I'm happy to do it in a dedicated test if others prefer that.

# timing of the test suite without this test:
pytest -s -vv datalad_next/commands/tests/test_create_sibling_webdav.py  14.28s user 7.69s system 59% cpu 36.830 total
# timing of the test suite with the test as in this PR
(fdm-werkstatt) adina@muninn in ~/repos/datalad-next on git:main
pytest -s -vv datalad_next/commands/tests/test_create_sibling_webdav.py  15.72s user 8.99s system 63% cpu 38.869 total
# timing of the testsuite with a dedicated test function for recursive mode (just dataset setup)
pytest -s -vv datalad_next/commands/tests/test_create_sibling_webdav.py  15.55s user 11.98s system 67% cpu 40.996 total

This PR also adds a info about which packages are missing when some webdav tests are skipped.

It took me a while to figure out why the tests were being skipped,
so I thought I'd add it to spare my future self the search
@adswa adswa requested a review from mih as a code owner July 17, 2023 18:38
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Patch coverage: 90.00% and project coverage change: +1.34 🎉

Comparison is base (0cb44b0) 90.70% compared to head (084bd3a) 92.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #434      +/-   ##
==========================================
+ Coverage   90.70%   92.05%   +1.34%     
==========================================
  Files         122      122              
  Lines        9100     9109       +9     
==========================================
+ Hits         8254     8385     +131     
+ Misses        846      724     -122     
Impacted Files Coverage Δ
datalad_next/tests/utils.py 76.72% <0.00%> (ø)
..._next/commands/tests/test_create_sibling_webdav.py 100.00% <100.00%> (ø)

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

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

Thx much and in particular for the great description!

@mih mih merged commit bce3b06 into datalad:main Sep 14, 2023
4 of 5 checks passed
@adswa adswa deleted the tst-webdav-recursion branch September 14, 2023 06:42
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.

create_sibling_webdav() needs tests for recursive mode
2 participants