-
Notifications
You must be signed in to change notification settings - Fork 20
increase test coverage to 99.5% #70
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
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.
Pull Request Overview
This PR aims to increase test coverage to 99.5% by adding new tests and refactoring parts of the core functionality for both writing and parsing RIS files.
- Refactored tests across writer, parser, and utils to use fixtures and cover more scenarios.
- Updated dependency versions and configuration in pyproject.toml.
- Adjusted core code for writer and parser modules, including the introduction of an abstract method for header generation.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_writer.py | Refactored tests to use a fixture for input data and updated expected outputs. |
| tests/test_utils.py | Added tests for the invert_dictionary utility function. |
| tests/test_parser.py | Refactored file-loading tests and added a fixture for expected outcomes. |
| rispy/writer.py | Changed set_header to an abstract method and updated dump/dumps logic. |
| rispy/parser.py | Removed a type-check in _add_list_value and updated load/loads functions. |
| pyproject.toml | Updated dev dependency versions and raised the coverage threshold to 99.5. |
Comments suppressed due to low confidence (1)
rispy/parser.py:200
- Removing the type check for 'record[name]' (previously verifying it was a string) may lead to unintended behavior when 'record[name]' is already a non-string value. Consider reintroducing the type validation to avoid wrapping a non-string value into a new list.
must_exist = record[name]
J535D165
left a comment
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.
Very good PR
|
Thanks, feel free to merge after the rebase. |
# Conflicts: # .github/workflows/main.yml # README.md # pyproject.toml
Write new tests, refactor code a little bit, and increase test coverage to 99.5%.
I also updated our dev dependencies to the latest versions.
This is follow-on work from #69