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

save/load dill test batches #9

Merged
merged 1 commit into from
Feb 10, 2024
Merged

save/load dill test batches #9

merged 1 commit into from
Feb 10, 2024

Conversation

PhilipDeegan
Copy link
Owner

@PhilipDeegan PhilipDeegan commented Feb 10, 2024

Summary by CodeRabbit

  • New Features
    • Added dump and load options to the command-line interface for test management.
    • Introduced serialization and deserialization functions for test batches.
  • Enhancements
    • Updated RunTimer class for improved process handling.
    • Enhanced test batch management with new TestBatchesList class and attributes.
  • Refactor
    • Refactored TestBatch class to use dataclass decorator.
  • Bug Fixes
    • Adjusted test execution parameters for concurrency handling.
  • Version Updates
    • Updated application version to "0.0.10".

Copy link

coderabbitai bot commented Feb 10, 2024

Warning

Rate Limit Exceeded

@PhilipDeegan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 29 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between aa33c4c and d3726bd.

Walkthrough

This update introduces a series of enhancements and bug fixes across the software package. Key changes include the adjustment of subprocess handling in the RunTimer class, the introduction of serialization and deserialization for test case management, and the refinement of test case structures to utilize Python's dataclass. Additionally, the version of the package has been incremented to reflect these updates, and a minor adjustment was made to concurrent test execution parameters.

Changes

Files Change Summary
phlop/procs/runtimer.py - Changed shell parameter to False
- Added close_fds=True in run method
ph/run/test_cases.py
ph/testing/test_cases.py
- Added serialization/deserialization logic
- Introduced dump and load CLI options
- Refactored TestBatch class
- Added TestBatchesList class
setup.py - Version updated from "0.0.9" to "0.0.10"
tests/all_concurrent.py - Modified pp.TestBatch function call to include an additional argument

Poem

In the field of code, as Chiefs and Niners clash,
A rabbit hops along, through the digital hash.
🏈 Amidst the spirited rivalry and the game's loud cheer,
We've tweaked and tuned, our goal's now near.
From subprocess tweaks to test batch flows,
Our software dances, in zeros and ones it glows.
🐰 Let's celebrate each push and pull,
In this grand game of code, our hearts are full.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between aa33c4c and a3925bc.
Files ignored due to path filters (1)
  • pyproject.toml is excluded by: !**/*.toml
Files selected for processing (5)
  • phlop/procs/runtimer.py (2 hunks)
  • phlop/run/test_cases.py (3 hunks)
  • phlop/testing/test_cases.py (4 hunks)
  • setup.py (1 hunks)
  • tests/all_concurrent.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • setup.py
Additional comments: 8
tests/all_concurrent.py (1)
  • 26-26: The addition of the argument 1 to the pp.TestBatch function call needs clarification. Ensure this aligns with the updated TestBatch class constructor and its intended use within the testing framework enhancements.
phlop/procs/runtimer.py (2)
  • 20-20: Changing the shell parameter from True to False improves security by avoiding shell injection vulnerabilities. Ensure all command strings are correctly formatted as lists when shell=False.
  • 54-54: Adding close_fds=True is a good practice to prevent file descriptor leaks in subprocesses. Ensure this change does not interfere with intended file descriptor inheritance in your subprocesses.
phlop/run/test_cases.py (2)
  • 32-33: Adding dump and load options to the CLI is aligned with the PR objectives. Ensure the help messages are clear and informative for users to understand the functionality of these options.

Also applies to: 47-52

  • 81-101: The serialize and dump_batches functions implement serialization using dill and codecs. Ensure that the choice of serialization format ("hex") is appropriate for your use case and that serialized data is stored and handled securely, especially if it contains sensitive information.
phlop/testing/test_cases.py (3)
  • 12-12: Adding typing.List import is necessary for type annotations. Ensure it's used consistently throughout the file.
  • 38-41: Refactoring TestBatch to use the dataclass decorator improves code readability and maintainability. Verify that all uses of TestBatch throughout the codebase have been updated to match the new structure.
  • 184-214: The introduction of TestBatchesList and the deserialize and extract_load functions align with the PR objectives for handling test batch serialization and deserialization. Ensure that the deserialization process securely handles the input data, especially if it comes from untrusted sources.

phlop/run/test_cases.py Outdated Show resolved Hide resolved
@PhilipDeegan PhilipDeegan merged commit 6f1fc43 into master Feb 10, 2024
4 checks passed
@PhilipDeegan PhilipDeegan deleted the combo branch February 10, 2024 16:04
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.

1 participant