Skip to content

Commit 4831cb8

Browse files
committed
refactor: code review cleanup and test suite improvements
- Restructure test suite with class-based organization and clearer docstrings explaining test strategy and mock design decisions - Fix DummyResponse mock to properly support streaming responses (raw attribute) matching real requests.Response behavior - Improve mock_responses router with explicit URL matching and clear fallthrough-to-404 semantics - Consolidate shared fixtures in conftest.py with descriptive comments on each fixture purpose - Clean up exception hierarchy and CLI interface - Update documentation and metadata for consistency
1 parent eaa1424 commit 4831cb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1883
-3093
lines changed

.zenodo.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"title": "OneCite: Universal Citation Management and Academic Reference Toolkit",
3-
"description": "OneCite is a powerful command-line tool and Python library designed to automate the tedious process of citation management. It supports multiple input formats (DOI, arXiv ID, PMID, paper titles, etc.) and generates clean, accurate bibliographic entries in BibTeX, APA, or MLA format.",
2+
"title": "OneCite: Citation Management and Academic Reference Toolkit",
3+
"description": "OneCite is a command-line tool and Python library that automates citation management. It supports multiple input formats (DOI, arXiv ID, PMID, paper titles, etc.) and generates clean, accurate bibliographic entries in BibTeX, APA, or MLA format.",
44
"creators": [
55
{
66
"name": "He, Zhiang",

CHANGELOG.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,39 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
77
## [Unreleased]
88

99
### Added
10-
- Comprehensive RST documentation using Sphinx
10+
- RST documentation using Sphinx
1111
- Full API reference documentation
1212
- FAQ section with common questions
1313
- Contributing guidelines
14-
- MCP (Model Context Protocol) integration documentation
1514
- Pre-commit hooks configuration
1615

1716
### Changed
18-
- Improved error handling and exception hierarchy
19-
- Enhanced Python API with better type hints
20-
- Updated README with more examples
17+
- Refactored exception hierarchy
18+
- Added type hints to Python API
19+
- Updated README examples
2120

2221
### Fixed
23-
- Various bug fixes in data source integration
22+
- CrossRef and Semantic Scholar response parsing edge cases
2423

2524
## [0.0.11] - 2024-10-19
2625

2726
### Added
28-
- MCP server support for AI assistant integration
2927
- Custom YAML-based template system
3028
- Support for multiple output formats (BibTeX, APA, MLA)
3129
- Interactive mode for ambiguous reference selection
3230
- Support for DOI, arXiv, PMID, ISBN, and GitHub identifiers
3331
- Integration with 9 major academic data sources
34-
- Comprehensive test suite
32+
- Test suite
3533

3634
### Changed
3735
- Refactored core processing pipeline
38-
- Improved data source prioritization
39-
- Enhanced error messages
36+
- Reordered data source priority (CrossRef first for DOI queries)
37+
- Clearer error messages on failed lookups
4038

4139
### Fixed
42-
- Fixed encoding issues with special characters
43-
- Improved robustness of DOI parsing
44-
- Fixed compatibility with older Python versions
40+
- Encoding issues with non-ASCII characters in author names
41+
- DOI parsing for URLs with trailing query strings
42+
- Python 3.10 compatibility issues
4543

4644
## [0.0.10] - 2024-10-01
4745

@@ -51,10 +49,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
5149
- Support for journal articles and conference papers
5250

5351
### Changed
54-
- Improved search accuracy
52+
- Better title matching for fuzzy searches
5553

5654
### Fixed
57-
- Fixed several data source API issues
55+
- PubMed API response handling
56+
- Semantic Scholar rate limit handling
5857

5958
## [0.0.9] and Earlier
6059

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
33
type: software
4-
title: "OneCite: Universal Citation Management and Academic Reference Toolkit"
4+
title: "OneCite: Citation Management and Academic Reference Toolkit"
55
authors:
66
- family-names: "He"
77
given-names: "Zhiang"
88
email: "ang@hezhiang.com"
99
repository-code: "https://github.com/HzaCode/OneCite"
1010
url: "https://github.com/HzaCode/OneCite"
11-
abstract: "OneCite is a powerful command-line tool and Python library designed to automate the tedious process of citation management. It supports multiple input formats (DOI, arXiv ID, PMID, paper titles, etc.) and generates clean, accurate bibliographic entries in BibTeX, APA, or MLA format."
11+
abstract: "OneCite is a command-line tool and Python library that automates citation management. It supports multiple input formats (DOI, arXiv ID, PMID, paper titles, etc.) and generates clean, accurate bibliographic entries in BibTeX, APA, or MLA format."
1212
keywords:
1313
- citation
1414
- bibliography

MCP_DEPLOYMENT.md

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)