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

Add code coverage badge through coverage.py #63

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Jul 28, 2024

Description

This PR adds a code coverage badge to the readme by running coverage.py through pytests, generating a report, and then generating a badge. Any changes to the coverage should change this file in future PR's.

Additionally:

  • I reorganized the logo location to be grouped into a directory where the badge image could be stored under media.
  • I also took a moment to update pre-commit hooks and related linting in somewhat unrelated files.

Closes #60

What kind of change(s) are included?

  • Feature (adds or updates new capabilities)
  • 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 and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • These changes pass all pre-commit checks.
  • I have added comments to my code to help provide understanding
  • I have added a test which covers the code changes found within this PR
  • I have deleted all non-relevant text in this pull request template.

@d33bs d33bs marked this pull request as ready for review July 28, 2024 02:58
@d33bs d33bs requested a review from jenna-tomkinson July 29, 2024 13:55
Copy link
Member

@jenna-tomkinson jenna-tomkinson left a comment

Choose a reason for hiding this comment

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

Short and simple PR, nice job! I was wondering why the change from logo to media, is this a specific standard the packages tend to follow?

I am approving this PR since I don't see any glaring issues, mainly just things I had questions about. Feel free to merge after addressing!

.pre-commit-config.yaml Show resolved Hide resolved
src/cosmicqc/frame.py Show resolved Hide resolved
@d33bs
Copy link
Member Author

d33bs commented Jul 30, 2024

Thank you @jenna-tomkinson ! Addressing your question:

I was wondering why the change from logo to media, is this a specific standard the packages tend to follow?

I think of it like I do modules or classes: when there's one "thing" or "object" it's okay to keep things specific. Once there's more than one "thing" it's useful to create an abstraction to house those "things" in some sort of hierarchy to reduce the amount of "horizontal" spread (really, to reduce the complexity of looking through the repo and its contents). Keep in mind there are contrasting opinions about these things - some prefer nesting with directories and files, others prefer single-directory structures (placing everything into a single directory). I tend to practice nesting, but this doesn't mean it's perfect!

In this case we had one "thing" (the logo code and images). The changes in this PR added another "thing" (the code coverage badge image). As a result I created the abstraction of "media" to help organize these things instead of having two folders for similar but different things. I don't know that there's a standard when it comes to this, I think I picked up on media from earlier web framework experiences, but I'm not sure! I have a feeling these may be better suited to go into the docs folder somewhere eventually, but I don't know exactly where yet because we haven't selected a docs framework or strategy (which would inform where it goes).

Thanks again, merging this in!

@d33bs d33bs merged commit 2172952 into WayScience:main Jul 30, 2024
11 checks passed
@d33bs d33bs deleted the code-coverage-badge branch July 30, 2024 14:45
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.

Add test coverage data + badge to project
2 participants