Merged
Conversation
…g it for dependency installation and testing
…s in DFAnalyzerInstance
Collaborator
Author
|
@hariharan-devarajan pinned Python to 3.11.5 for now - Dask breaks on higher versions and I don't have time to debug it at the moment. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the CI setup to cover Python 3.11, strengthens isolation with virtual environments, and improves resource management in the dfanalyzer module.
- Updated CI matrix for Python 3.9, 3.10, and 3.11.5, added venv creation/activation, and reordered C++ test steps
- Bumped
requires-pythoninpyproject.tomlto>3.8, <3.12and added Python 3.11 classifier - Introduced a
shutdownmethod and added a docstring indfanalyzer/__init__.py - Standardized quotes in tests, re-enabled shutdown in
_test_e2e, and removed two commented assertions
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/ci.yml | Added Python 3.11 to the matrix, venv creation/activation steps, and moved C++ tests later |
| pyproject.toml | Changed requires-python specifier and added Programming Language :: Python :: 3.11 |
| dfanalyzer/init.py | Added a docstring to analyze_trace and implemented a new shutdown method |
| tests/test_main.py | Switched to double quotes, removed two commented-out assertions, and added dfa.shutdown() |
Comments suppressed due to low confidence (4)
tests/test_main.py:119
- Consider adding assertions after
shutdown()to verify the Dask client and cluster are closed, ensuring the new cleanup code is actually tested.
dfa.shutdown()
pyproject.toml:11
- Using
>3.8excludes Python 3.8.x entirely; if you intend to keep 3.8 support, switch back to>=3.8, <3.12.
requires-python = ">3.8, <3.12"
.github/workflows/ci.yml:42
- [nitpick] Since
actions/setup-pythonalready provides an isolated tool cache, you can skip manualvenvsetup or combine the venv activation and install steps into a single run block to reduce repetition.
- name: Create and activate virtual environment
tests/test_main.py:98
- Remove or restore these commented-out assertions to avoid dead code; if the run directory settings are still important, re-enable them as active checks.
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates to the CI workflow, Python environment setup, and codebase improvements, including support for Python 3.11, enhanced virtual environment management, and new functionality for shutting down resources in the
dfanalyzermodule. Below is a categorized summary of the most important changes:CI Workflow and Python Environment Updates:
requires-pythonfield inpyproject.tomlto support Python versions>3.8, <3.12. [1] [2]dfanalyzertool. [1] [2] [3]Codebase Enhancements:
shutdownmethod in thedfanalyzermodule to cleanly close the Dask client and cluster, improving resource management.analyze_tracemethod in thedfanalyzermodule to clarify its purpose.Testing Improvements:
_test_e2eintests/test_main.pyto include a call to the newshutdownmethod, ensuring proper cleanup of resources after tests._test_e2eto use double quotes for consistency.