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

Proposal: Add doctest support to testing CI job #798

Open
kadykov opened this issue Mar 27, 2024 · 0 comments · May be fixed by #799
Open

Proposal: Add doctest support to testing CI job #798

kadykov opened this issue Mar 27, 2024 · 0 comments · May be fixed by #799

Comments

@kadykov
Copy link
Contributor

kadykov commented Mar 27, 2024

Overview

Currently, the testing suite of Intake relies on pytest for unit testing. While this is effective for testing functions and methods, it doesn't cover the examples provided in the docstrings. Adding support for doctest alongside pytest would allow us to automatically test these examples, ensuring they are accurate and up-to-date.

Proposal

I propose adding doctest support to the testing suite of Intake, specifically utilizing pytest --doctest-modules --verbose intake/readers to test the examples provided in docstrings.

Benefits

  1. Comprehensive Testing: Including doctest in our testing suite ensures that not only our functions are tested but also the examples provided in the docstrings, leading to more comprehensive testing coverage.
  2. Accuracy of Documentation: Testing docstring examples ensures that they accurately reflect the behavior of the functions/methods they describe. This helps maintain consistency between code and documentation.
  3. Ease of Maintenance: Automated testing of docstring examples can catch discrepancies early on, making maintenance easier and reducing the likelihood of outdated examples.
  4. Improved User Experience: Users rely on docstring examples for understanding how to use the functions/methods provided by Intake. Ensuring these examples are correct enhances the overall user experience.

Your contributions and feedback on this proposal are highly appreciated.

@kadykov kadykov linked a pull request Mar 27, 2024 that will close this issue
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 a pull request may close this issue.

1 participant