Skip to content

Conversation

@pp-mo
Copy link
Owner

@pp-mo pp-mo commented Oct 16, 2025

Pursuing an idea that we might create a better test-runner than pytest, for ourselves

@pp-mo pp-mo force-pushed the pytestless_doctests branch from 8e46cb3 to fd9a1ca Compare October 20, 2025 09:03
@pp-mo pp-mo force-pushed the pytestless_doctests branch from f4a4ab4 to d1b7213 Compare October 21, 2025 09:33
@pp-mo pp-mo force-pushed the pytestless_doctests branch from ef86558 to 506dc26 Compare October 21, 2025 10:06
@pp-mo pp-mo changed the base branch from main to update_devdocs October 21, 2025 10:17
@pp-mo pp-mo force-pushed the pytestless_doctests branch 3 times, most recently from a7ece14 to 96ef52c Compare October 22, 2025 12:47
@pp-mo pp-mo force-pushed the pytestless_doctests branch from 3f4b3b4 to 6e27328 Compare October 22, 2025 12:50
) -> list[Path]:
"""Expand globs to a list of filepaths.

Also filter with exclude controls.
Copy link
Owner Author

@pp-mo pp-mo Oct 29, 2025

Choose a reason for hiding this comment

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

I think the "private" concept does not apply to documentation files : Explain this?

"""
actual_paths: list[Path] = []
segments = file_path.split("/")
i_wilds = [
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: document the intention.

In order to resolve a globbed path like dir/subdir/**/*AB_test.extension, we need to split the root path of the search from the wildcarded parts, to do Path("dir/subdir").glob("**/*AB_test.extension")
So here we are finding which path segments contain glob characters, and splitting at the first of those.
This probably is still a bit crude

  • e.g. can't handle escaped glob chars
  • e.g. maybe doesn't work (needs testing) if the globbed part or unglobbed parts are empty

@pp-mo
Copy link
Owner Author

pp-mo commented Nov 5, 2025

What is still missing?

Apart from the above, this is still only "trial code".
Intention is (for now) to not put this in a distributable package, but into a SciTools template

What's really driving that is a desire to use this for Iris too.

Probably, it would still be good to have a distinct repo, for central control + to host testing,
- but that would also follow the template
(or perhaps, ~equivalently, the template follows the primary repo)

What's I can already see is still missing with the function itself ..

  • now complicated enough that it needs some tests
  • possible problems with less usual glob forms -- see above
  • lack of global options config -- possibly should exist in pyproject.toml
    • this would seem especially useful for excludes

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.

2 participants