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

[Feature] Support piperider compare between git refs #888

Merged
merged 9 commits into from
Sep 18, 2023

Conversation

wcchang1115
Copy link
Contributor

@wcchang1115 wcchang1115 commented Sep 14, 2023

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?
feature

What this PR does / why we need it:

  • to support piperider compare <git-ref>...<git_ref>

Which issue(s) this PR fixes:
sc-31643

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #888 (1d58ce5) into main (c514a8d) will decrease coverage by 0.10%.
The diff coverage is 26.20%.

@@            Coverage Diff             @@
##             main     #888      +/-   ##
==========================================
- Coverage   48.15%   48.05%   -0.10%     
==========================================
  Files          75       75              
  Lines       10390    10461      +71     
==========================================
+ Hits         5003     5027      +24     
- Misses       5387     5434      +47     
Files Changed Coverage Δ
piperider_cli/recipe_executor.py 0.00% <0.00%> (ø)
piperider_cli/recipes/default_recipe_generator.py 31.86% <0.00%> (-2.66%) ⬇️
piperider_cli/recipes/github_action.py 0.00% <0.00%> (ø)
piperider_cli/recipes/__init__.py 24.81% <9.80%> (-1.46%) ⬇️
piperider_cli/recipes/utils.py 30.27% <26.31%> (-0.91%) ⬇️
piperider_cli/dbt/list_task.py 65.65% <50.00%> (ø)
piperider_cli/cli.py 65.32% <66.66%> (+0.10%) ⬆️
piperider_cli/cli_utils/compare_with_recipe.py 24.65% <66.66%> (+24.65%) ⬆️
piperider_cli/dbtutil.py 67.04% <83.33%> (-0.07%) ⬇️
piperider_cli/runner.py 54.26% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@wcchang1115 wcchang1115 marked this pull request as ready for review September 15, 2023 02:56
Copy link
Contributor

@popcornylu popcornylu left a comment

Choose a reason for hiding this comment

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

Besides the comment in the review, there are some additional notes

  1. When we use HEAD, could we mark the HEAD as the current branch in the report?

  2. The error message is not clear

    $ piperider compare main main HEAD
    Error: Commit format is not supported
    

    we can say we only support one or no reference

  3. Clearer help

    $ piperider compare --help
    Usage: piperider compare [OPTIONS] [REFS]...
    
    $ git diff --help
    NAME
      git-diff - Show changes between commits, commit and working tree, etc
    
     SYNOPSIS
        git diff [<options>] [<commit>] [--] [<path>...]
        git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]
        git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]
        git diff [<options>] <commit>...<commit> [--] [<path>...]
    
image image

piperider_cli/cli_utils/compare_with_recipe.py Outdated Show resolved Hide resolved
@wcchang1115 wcchang1115 force-pushed the feature/sc-31643/support-piperider-compare-commit branch from c4406a8 to 1d58ce5 Compare September 15, 2023 08:53
Copy link
Contributor

@popcornylu popcornylu left a comment

Choose a reason for hiding this comment

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

LGTM

@popcornylu popcornylu merged commit e4c7fcb into main Sep 18, 2023
29 of 30 checks passed
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