software-gardening / almanack

An open-source handbook of applied guidance and tools for sustainable software development and maintenance.
https://software-gardening.github.io/almanack
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Extracting commit contents #59

Closed willdavidson05 closed 3 months ago

willdavidson05 commented 3 months ago

Description

This PR creates a git_extracting.py function that retrieves contents from a specific commit in a Git repository. The function can be tested using the test datasets created through the add_data.py function. Changes were also made to the test datasets and their contents, and the need for them to be zipped to maintain functionality is no longer necessary.

A test set was created to ensure that these test repositories are correctly deleted, to avoid a conflict with multiple repositories.

I appreciate any comments or feedback!

Closes #48

What is the nature of your change?

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

willdavidson05 commented 3 months ago

Thanks for the review and feedback @d33bs !! I'll start working on these comments now.

willdavidson05 commented 3 months ago

@d33bs Just a couple of other notes! I've added gitpython to the dependencies of poetry to ensure that the testing suite runs smoothly. Also, I've successfully implemented the creation, reading, and deletion of my test repositories (high and low entropy) using conftest.py. I'm curious if you think conftest.py is the appropriate place for this functionality, or if it should be moved to its own separate test file? Thanks again for your review and feedback! I've requested another review with the necessary changes. No rush, but please let me know your thoughts!

willdavidson05 commented 3 months ago

Thanks for the review @d33bs !! I've implemented almost all of your feedback! Would love to hear what you think about the test cases I have added. These tests were what I could come up with, but would like to hear if you have any ideas! I will note, that the coverage was 100% for these tests. I will go ahead and request a re-review, but no rush. Thank you!