-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix: code coverage percent for gatorgrade files #157
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the conversations from class today it looks like uploading the coverage.json
is not a viable option and our coverage badge should be generated in actions and based on that. I was able to the coverage command to run however so that is good. I think we need to have more discussions about what to do about the .json
file.
today in lab professor said we are not gonna have it committed anymore so I updated and deleted it. |
Hello @hannahb09 there is at least one revision that has been requested, can you please investigate this further? |
So what is the plan going forward with coverage? Does it still work but no |
Hi @hannahb09, you've requested review but you haven't addressed the comments/questions here. Please do so. |
We are ignoring the coverage.json file now on it has been added to the gitignore file and Kapfhammer has said we will not commit it from now on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got an error when trying to run poetry run task coverage
on Windows 10
C:\Users\Palla\AppData\Local\pypoetry\Cache\virtualenvs\gatorgrade-QO4nVhz5-py3.12\Lib\site-packages\_pytest\config\__init__.py:331: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
UsageError: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: argument --cov-report: invalid choice: "json" (choose from "['term', 'term-missing', 'annotate', 'html', 'xml']")
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
config = pluginmanager.hook.pytest_cmdline_parse(
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: argument --cov-report: invalid choice: "json" (choose from "['term', 'term-missing', 'annotate', 'html', 'xml']")
I also noticed the coverage commands in the
|
I think part of it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, poetry run task coverage
and poetry run task coverage-silent
work well on Ubuntu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There issues with the test cases. This is not your bug but still needs fixed. What is happening is that there is a test that wants gatorgrade
to fail a check but it is displaying all this output! That is not good because it looks like things are failing! Please fix the toml
file to update the commands.
poetry run task test-silent makes the command work where the test just tells you how many passes. |
Code Coverage
Description
This is a fix so that gatorgrade when running the code coverage gets the right files which is gatorgrade files and leaves out empty files that have no code in the over all percentage. These are the code commands that should work.
poetry run task coverage
I got on linuxfor
poetry run task test
I gotType of Change