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 DTParser and a stub testfile #37

Merged
merged 6 commits into from
Jun 9, 2022
Merged

add DTParser and a stub testfile #37

merged 6 commits into from
Jun 9, 2022

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented Jun 9, 2022

Add a basic testfile to accompany testmod. Since testfile does not invoke DTFinder, move the stopword list to a DTParser.

TODO for DTFinder / DTParser:

  • rationalize config handling in DTFinder : is it set in ctor or find? Add tests.
  • Given that test_runner / DebugDTRunner fails with vanilla DocTestFinder, add tests for swapping DTParser for a vanilla DocTestParser.
  • add standalone tests for DTParser itself
  • properly handle verbosity mapping in DTFinder
  • move config handling in DTParser to ctor from methods

... and then can actually work on testfile.

ev-br added 2 commits June 9, 2022 14:10
Usage:
testfile('/home/br/repos/scipy/scipy/doc/source/tutorial/stats.rst',
         module_relative=False, verbose=1, raise_on_error=True)

Note the `module_relative=False`, this comes from doctest.

Since testfile does not invoke DTFinder, stopwords are failure.
Thus add a DTParser to filter out stopwords.

TODO:
1. Deduplicate DTFinder and DTParser (the former can go?)
2. What's going on with the stats tutorial: the # of distributions
fails without stopwords and passes with them.
@ev-br ev-br added the feature-parity refguide-check features label Jun 9, 2022
@ev-br
Copy link
Member Author

ev-br commented Jun 9, 2022

Meanwhile, made all DT* classes keep a pointer to the config object, so that methods need not receive it.
Hopefully that's better for being drop-in replacements.

testfile is hacky and needs work. Might merge it quickly and iterate based in the run-on-scipy branch.

@ev-br
Copy link
Member Author

ev-br commented Jun 9, 2022

Still TODO, priority "some day":

  • do not store parts of config stuff, only store it itself (looking at you, DTChecker)
  • test swapping DT* things with DocTest* analogs
  • document the internals
  • finish up testfile

@ev-br ev-br changed the title WIP: add testfile / DTParser add DTParser and a stub testfile Jun 9, 2022
@ev-br ev-br merged commit 77d5003 into main Jun 9, 2022
@ev-br ev-br deleted the testfile branch June 9, 2022 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-parity refguide-check features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant