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

Summary of updated snapshots #597

Open
KaeganCasey opened this issue Apr 13, 2022 · 4 comments
Open

Summary of updated snapshots #597

KaeganCasey opened this issue Apr 13, 2022 · 4 comments
Labels
feature request New feature or request good first issue Good for newcomers

Comments

@KaeganCasey
Copy link

KaeganCasey commented Apr 13, 2022

Is your feature request related to a problem? Please describe.

When I run snapshot update and only a few snapshots have changed or a few new ones get created it currently gives a summary saying "x snapshots have been updated".

Describe the solution you'd like

It would be wonderful if it could print a complete list of the names of each of the snapshots so that you can feel more confident that only the ones you expected to be updated / created were changed. This would give me more confidence when updating snapshots and a clear list of the ones I should go look at manually to validate their correctness. Ideally it would have a separate section where it prints the names of any snapshots that were updated and then another section for printing the names of newly created snapshots.

Thank you very much for this awesome library it saves me so much time and effort and has beautiful syntax.

@noahnu noahnu added the feature request New feature or request label Apr 13, 2022
@noahnu
Copy link
Collaborator

noahnu commented Apr 13, 2022

  1. Perhaps we can extend --snapshot-details. This should be relatively straightforward if you're interested in contributing (otherwise no ETA on my side at the moment, I'm trying to get some more internal contributors to work through the open issues list).
  2. I didn't realize it was via a Pycharm plugin. I think that should be doable. I'll need to dig into the plugin some more. My main concern with repr is that we'd have to perform an IO operation to read the snapshot.

@KaeganCasey
Copy link
Author

That all sounds awesome! Thank you for responding so quickly! No rush as these are mostly cosmetic enhancements.

@noahnu
Copy link
Collaborator

noahnu commented Aug 23, 2024

2 is implemented in https://github.com/syrupy-project/syrupy/releases/tag/v4.7.0. Will edit this issue so it's scoped to snapshot details

@noahnu noahnu changed the title Summary of updated snapshots, ability to view diffs in pycharm Summary of updated snapshots Aug 23, 2024
@noahnu noahnu added the good first issue Good for newcomers label Aug 23, 2024
@noahnu
Copy link
Collaborator

noahnu commented Nov 23, 2024

This should be a simple change to implement. The reporter prints out a summary for creates/updates here:

).format(green(self.num_updated))
. All we'd have to do is check if self.include_snapshot_details: and then print some additional info. All the required context is already available.

Open to contributions on this issue.

@noahnu noahnu moved this to Ready in Syrupy Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

2 participants