Merged
Conversation
There was a problem hiding this comment.
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]
shapiromatron
commented
May 22, 2025
J535D165
reviewed
May 22, 2025
Collaborator
|
Thanks, feel free to merge after the rebase. |
# Conflicts: # .github/workflows/main.yml # README.md # pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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