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

Refine CLI for use with get_table as almanack <repo path> #136

Merged
merged 8 commits into from
Nov 12, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Nov 2, 2024

Description

This PR refines the CLI to use get_table as $ almanack <repo path> when the Software Gardening Almanack is used through python-fire. The goal was to make using the internal functionality easily from outside of a Pythonic API, for example, as with workflow pipelines that may not use Python API's.

Thanks for any feedback!

Closes #134

What is the nature of your change?

  • Content additions or updates (adds or updates content)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

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

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own contributions.
  • I have commented my content, particularly in hard-to-understand areas.
  • I have made corresponding changes to related documentation (outside of book content).
  • My changes generate no new warnings.
  • New and existing tests pass locally with my changes.
  • I have added tests that prove my additions are effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

@d33bs d33bs marked this pull request as ready for review November 4, 2024 13:37
src/almanack/cli.py Outdated Show resolved Hide resolved
tests/test_cli.py Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
Co-Authored-By: Gregory Way <[email protected]>
@d33bs d33bs requested a review from gwaybio November 5, 2024 15:25
Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

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

Nice work; seems like you cleaned up a lot of things and added some tests. I made a few comments which probably should be reviewed before merging, but nothing serious.

src/almanack/cli.py Outdated Show resolved Hide resolved
src/almanack/metrics/data.py Show resolved Hide resolved
d33bs and others added 2 commits November 7, 2024 16:43
Co-Authored-By: Gregory Way <[email protected]>
Co-Authored-By: Faisal Alquaddoomi <[email protected]>
@d33bs
Copy link
Member Author

d33bs commented Nov 7, 2024

Thanks @falquaddoomi for the review! I've made some changes based on your comments and revisited what @gwaybio mentioned, regarding the unsafe space splitting for the subprocess testing utility function, based on both of your feedback.

@d33bs
Copy link
Member Author

d33bs commented Nov 7, 2024

Openly, I wondered if the default behavior of the output returned by almanack <repo path> should be a human-readable table instead of data. We could add a --json flag to return what is currently provided. Perhaps this is an additional issue/ PR at a later time?

@falquaddoomi
Copy link
Contributor

Openly, I wondered if the default behavior of the output returned by almanack <repo path> should be a human-readable table instead of data. We could add a --json flag to return what is currently provided. Perhaps this is an additional issue/ PR at a later time?

I think that sounds like a reasonable idea, if you expect people to be using it interactively rather than parsing it. I think it pertains to this PR so it would make sense to include it here, but it's up to you if you'd prefer for it to be reviewed in more detail in a different PR.

@d33bs
Copy link
Member Author

d33bs commented Nov 12, 2024

Thanks @falquaddoomi - I created #172 to further this development. I don't know of an exact demand for this right now whereas we can more readily make use of this PR's CLI modifications as is.

Separately, @gwaybio , @falquaddoomi , is there anything else I may add to this PR in order to ready it for a merge? Thanks in advance for any further feedback!

Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

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

I don't have anything to add; this all looks good to me!

@d33bs
Copy link
Member Author

d33bs commented Nov 12, 2024

Thanks @falquaddoomi and @gwaybio for your reviews! Merging this in now.

@d33bs d33bs merged commit 906da2b into software-gardening:main Nov 12, 2024
11 checks passed
@d33bs d33bs deleted the refine-cli-for-table branch November 12, 2024 22:30
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.

Enable CLI use of almanack.table(repo_url="") to run $ almanack <repo location here>
3 participants