thoth-station / thamos

A CLI tool and library for communicating with Thoth
http://thoth-station.ninja
GNU General Public License v3.0
15 stars 17 forks source link

added diff command and flag #1177

Closed Gkrumbach07 closed 1 year ago

Gkrumbach07 commented 1 year ago

Related Issues and Dependencies

Fixes: https://github.com/thoth-station/thamos/issues/1147 fixes: https://github.com/thoth-station/thamos/issues/1146

This introduces a breaking change

This should yield a new module release

This Pull Request implements

Added a diff command and added a --diff flag to advise command

Description

diff compares the justifications and stack info of two advises, using the stored previous advise if possible. It only shows the differences and hides the similarities.

goern commented 1 year ago

+1 on json ;) its all for the machines!

PYTHONPATH=. ./thamos-cli version
Thamos Client version: 1.27.11
Thoth API https://khemenu.thoth-station.ninja/api/v1: 0.35.8

there seem to be an error in displaying the advise ID, see the missing a after the (:

Try 'adviser-220928133843-a22248989080074f --help' for help.
╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Got unexpected extra arguments (v i s e r - 2 2 0 9 2 8 1 3 3 8 4 3 - a 2 2 2 4 8 9 8 9 0 8 0 0 7 4 f)                                                                                                                                                     │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Check Thamos documentation: https://thoth-station.ninja/docs/developers/thamos
goern commented 1 year ago
 PYTHONPATH=../thamos ../thamos/thamos-cli diff adviser-220928134359-bc7c0f22c68aa6b  adviser-220928133843-a22248989080074f  
Comparing old: adviser-220928133843-a22248989080074f to new: adviser-220928134359-bc7c0f22c68aa6b
                                                                                                                   Stack Info Differences                                                                                                                     
                                                                  ╷                                                                                  ╷                                        ╷                                                               
                                                       Difference │ Link                                                                             │ Message                                │ Type                                                          
                                                      ════════════╪══════════════════════════════════════════════════════════════════════════════════╪════════════════════════════════════════╪════════                                                       
                                                       REMOVED    │ https://thoth-station.ninja/search/adviser-220928133843-a22248989080074f/summary │ Results can be browsed in Thoth search │ ✔️ INFO                                                        
                                                       ADDED      │ https://thoth-station.ninja/search/adviser-220928134359-bc7c0f22c68aa6b/summary  │ Results can be browsed in Thoth search │ ✔️ INFO                                                        
                                                                  ╵                                                                                  ╵                                        ╵                                                                                                                                                                                                                                                                                                   

/lgtm

Gkrumbach07 commented 1 year ago

I think they are missing the /advise part between /search and the analysis ID

I thought this was fixed in an older PR? Are you looking at an older adviser document?

there seem to be an error in displaying the advise ID, see the missing a after the (:

Was this issue present before this PR?

@mayaCostantini @goern I can add the JSON support, I don't think it will take too much time.

mayaCostantini commented 1 year ago

Are you looking at an older adviser document?

No, both documents (old and new) were generated today.

Gkrumbach07 commented 1 year ago

No, both documents (old and new) were generated today.

Thats odd. It is updated here: https://github.com/thoth-station/adviser/blob/master/thoth/adviser/boots/thoth_search.py#L37 I am not sure why it still is giving the wrong url

Gkrumbach07 commented 1 year ago

can we force push past the code climate error. I dont see how I can further reduce the nesting

sesheta commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mayaCostantini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/thoth-station/thamos/blob/master/OWNERS)~~ [mayaCostantini] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
mayaCostantini commented 1 year ago

/retest