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

Adds git fixture to pytest example #490

Merged
merged 1 commit into from
Dec 29, 2024
Merged

Conversation

skrawcz
Copy link
Contributor

@skrawcz skrawcz commented Dec 29, 2024

So that one can keep track of versions with data generated.

Changes

Adds to pytest example

How I tested this

Runs locally.

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

Important

Add git_info fixture to capture git details and integrate it into test result logging in pytest examples.

  • Fixtures:
    • Add git_info fixture in conftest.py to capture git commit, branch, and latest tag.
  • Tests:
    • Update test_print_results in test_some_actions.py to include git information in the results CSV.
    • Add usage of git_info fixture in test_print_results to log git commit and branch.
  • Documentation:
    • Update README.md to include examples and explanations of using pytest fixtures, including the new git_info fixture.

This description was created by Ellipsis for 62d85c3. It will automatically update as commits are pushed.

So that one can keep track of versions with data generated.
@skrawcz skrawcz merged commit 7cc3599 into main Dec 29, 2024
11 checks passed
@skrawcz skrawcz deleted the add_git_to_pytest_example branch December 29, 2024 20:56
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 62d85c3 in 43 seconds

More details
  • Looked at 201 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. examples/pytest/test_some_actions.py:3
  • Draft comment:
    Duplicate import statement for 'some_actions'. Remove this line to clean up the code.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The import statement for 'some_actions' is duplicated, which is unnecessary and can be removed to clean up the code.
2. examples/pytest/test_some_actions.py:164
  • Draft comment:
    Consider adding module_results_df["git_latest_tag"] = git_info["latest_tag"] to include the latest tag information in the results.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The 'git_info' fixture is used to capture git information, but the 'git_latest_tag' is not being utilized in the 'test_print_results' function. It should be added to the DataFrame for consistency and completeness.

Workflow ID: wflow_PyVC7yaCwLtTMDII


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Dec 29, 2024

A preview of is uploaded and can be seen here:

https://burr.dagworks.io/pull/490

Changes may take a few minutes to propagate. Since this is a preview of production, content with draft: true will not be rendered. The source is here: https://github.com/DAGWorks-Inc/burr/tree/gh-pages/pull/490/

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