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 few testing helper utilities to pueblo.testing #12

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 7, 2023

About

Classical yak shaving.

Details

A few generalized testing helpers to avoid code duplication within the educational repository cratedb-examples, originally conceived at 1. We need those utilities at many more spots, so we needed to find a good place to store them.

/cc @andnig

Footnotes

  1. https://github.com/crate/cratedb-examples/blob/main/topic/machine-learning/llm-langchain/test.py

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #12 (0402531) into main (f846dd7) will increase coverage by 2.39%.
The diff coverage is 95.91%.

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   71.98%   74.37%   +2.39%     
==========================================
  Files          14       17       +3     
  Lines         514      562      +48     
==========================================
+ Hits          370      418      +48     
  Misses        144      144              
Flag Coverage Δ
main 74.37% <95.91%> (+2.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pueblo/testing/nlp.py 100.00% <100.00%> (ø)
pueblo/testing/notebook.py 73.33% <100.00%> (+13.33%) ⬆️
pueblo/testing/folder.py 93.33% <93.33%> (ø)
pueblo/testing/snippet.py 96.15% <96.15%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@amotl amotl requested review from seut and matriv November 7, 2023 10:21
@amotl amotl marked this pull request as ready for review November 7, 2023 10:22
@amotl amotl force-pushed the testing-more branch 3 times, most recently from 30d25fa to c4f1082 Compare November 7, 2023 12:37
@amotl amotl requested a review from matriv November 7, 2023 12:56
Comment on lines +25 to +26
if item.name in ["conftest.py"] or item.name.startswith("test"):
continue
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently untested, so this is a candidate for improving the test cases.

Comment on lines +42 to +43
if not tests:
raise ValueError(f"No tests collected from notebook: {filepath}")
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently untested, so this is a candidate for improving the test cases.

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