-
Notifications
You must be signed in to change notification settings - Fork 476
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 integration test for notebooks #389
Add integration test for notebooks #389
Conversation
renamed all mentions of urls to uris to enable s3 support
…-print-statements Feature/50/logger instead of print statements
…data-types-for-major-use-cases added common data types
…r-tasks fixed broken cluster tests
…ask-if-fails handled error in case learning task, deleting original task
…erving added basic ray serve examples
feat(datalayer): format
Fix minor bugs and typos minor refactors logger to logging formatting and refactors
Fix some bugs
docs(cdc): Added working example on cdc added integration tests refactors format
Fix some issues and tests Fix minor typo Refactor tests and cdc code Fix minor typos and doc string
Great PR summary, @thejumpman2323! FYI, in case it helps (I think this is still WiP?) the same type of workflow in
It's interesting how you do the same thing, but from within Question: would it be cleaner if it is its own CI element (like in @thejumpman2323 call logic: GHA -> pytest -> python -> jupyter -> python |
Hi, |
completed_process = subprocess.run(['python3', os.path.join(tmp_dir, py_file_path)], capture_output=True, text=True, timeout=10) | ||
assert completed_process.returncode == 0 | ||
|
||
def test_notebooks(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer this to be configured manually - some notebooks won't work without credentials, etc..
Could we do just the mnist
initially?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need a test account for openAI, and secrets management on GitHub.
bf5f0c5
to
0f516a0
Compare
Solves a task in #135
This pull request introduces an integration test that automates the conversion of Jupyter notebooks to Python files and runs them individually as tests. This integration test enhances our testing infrastructure by providing a streamlined process for verifying the functionality and correctness of Jupyter notebook conversions.
Changes Made
Added a new integration test module test_notebooks.py which performs the Jupyter notebook to Python file conversion and execution.
Implemented the necessary logic to convert Jupyter notebooks to Python files using the nbconvert library.
Configured the test module to execute the converted Python files as individual tests using the testing framework.
Test Execution Flow
The integration test module test_notebooks.py locates the target Jupyter notebook files.
Each notebook file is automatically converted to a corresponding Python file using the nbconvert library.
The converted Python files are executed individually as tests, ensuring their correctness and functionality.
Test results, including any failures or errors, are reported in the test execution summary.
Benefits
Automation: The integration test automates the process of converting Jupyter notebooks to Python files and executing them as tests.
Verification: This test ensures that Jupyter notebook conversions produce valid Python code that can be executed successfully.
Continuous Integration: The integration test can be incorporated into our CI/CD pipeline to catch potential issues early in the development process.
Improved Code Reliability: Running Jupyter notebooks as tests helps identify any code inconsistencies or errors during conversion, leading to more reliable code.
This integration test contributes to the overall quality and reliability of our codebase, enabling us to confidently convert Jupyter notebooks to Python files and validate their correctness through automated testing.