Skip to content

Commit 12b1dea

Browse files
committed
release: v0.1.0 - documentation cleanup and PyOpenSci review preparation
1 parent ff610c3 commit 12b1dea

21 files changed

Lines changed: 279 additions & 91 deletions

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A clear and concise description of what actually happened.
2626

2727
## Environment
2828

29-
- **OneCite Version**: [e.g., 0.0.11]
29+
- **OneCite Version**: [e.g., 0.1.0]
3030
- **Python Version**: [e.g., 3.9]
3131
- **Operating System**: [e.g., Windows 10, macOS 13, Ubuntu 22.04]
3232
- **Installation Method**: [e.g., pip, from source]

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# runs-on: ubuntu-latest
1313
#
1414
# steps:
15-
# - uses: actions/checkout@v3
15+
# - uses: actions/checkout@v4
1616
#
1717
# - name: Set up Python
18-
# uses: actions/setup-python@v4
18+
# uses: actions/setup-python@v5
1919
# with:
2020
# python-version: '3.10'
2121
#

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
python-version: ['3.10', '3.11']
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v4
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525

.readthedocs.yml

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

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
66

77
## [Unreleased]
88

9+
## [0.1.0] - 2025-02-09
10+
911
### Added
1012
- RST documentation using Sphinx
1113
- Full API reference documentation
1214
- FAQ section with common questions
1315
- Contributing guidelines
1416
- Pre-commit hooks configuration
17+
- Google-style docstrings with Args/Returns for all public API functions
18+
- Auto-deploy documentation to GitHub Pages via CI
1519

1620
### Changed
1721
- Refactored exception hierarchy
1822
- Added type hints to Python API
1923
- Updated README examples
24+
- Bumped minimum Python version declaration in docs to 3.10
25+
- Updated CI actions to latest versions (checkout v4, setup-python v5)
26+
- Updated copyright year to 2024-2025
27+
- Fixed Documentation URL in pyproject.toml to point to GitHub Pages
28+
29+
### Removed
30+
- MCP integration page and all related references
31+
- `.readthedocs.yml` (docs now hosted on GitHub Pages)
32+
- `docs/_build/` build artifacts from repository
2033

2134
### Fixed
2235
- CrossRef and Semantic Scholar response parsing edge cases
36+
- API documentation using incorrect return value fields (`output_content` -> `results`)
37+
- Version number inconsistencies across metadata files
38+
- Python version requirement inconsistencies in docs (3.7 -> 3.10)
2339

2440
## [0.0.11] - 2024-10-19
2541

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ keywords:
1919
- arxiv
2020
- research
2121
license: MIT
22-
version: "0.0.11"
23-
date-released: "2025-08-12"
22+
version: "0.1.0"
23+
date-released: "2025-02-09"
2424

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 He Zhiang
3+
Copyright (c) 2024-2025 He Zhiang
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ def auto_select_callback(candidates):
198198
result = process_references(
199199
input_content="Deep learning review\nLeCun, Bengio, Hinton\nNature 2015",
200200
input_type="txt",
201+
template_name="journal_article_full",
201202
output_format="bibtex",
202203
interactive_callback=auto_select_callback
203204
)
204205

205-
print(result['output_content'])
206+
print('\n\n'.join(result['results']))
206207
```
207208
</details>
208209

docs/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ Subsubsection
128128
# Code block
129129
import onecite
130130
131-
result = onecite.process_references("10.1038/nature14539")
131+
result = onecite.process_references(
132+
"10.1038/nature14539", "txt", "journal_article_full",
133+
"bibtex", lambda c: 0
134+
)
132135
133136
- Bullet list
134137
- Another item
@@ -156,8 +159,14 @@ Use `.. code-block::` for syntax-highlighted code:
156159
157160
from onecite import process_references
158161
159-
result = process_references("10.1038/nature14539")
160-
print(result['output_content'])
162+
result = process_references(
163+
"10.1038/nature14539",
164+
input_type="txt",
165+
template_name="journal_article_full",
166+
output_format="bibtex",
167+
interactive_callback=lambda c: 0
168+
)
169+
print('\n\n'.join(result['results']))
161170
```
162171

163172
## Configuration

docs/api/pipeline.rst

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,15 @@ Batch Processing
283283
]
284284
285285
result = controller.process(
286-
entries=references,
287-
output_format="bibtex"
286+
input_content="\n\n".join(references),
287+
input_type="txt",
288+
template_name="journal_article_full",
289+
output_format="bibtex",
290+
interactive_callback=lambda candidates: 0
288291
)
289292
290-
print(f"Processed: {result['processed_count']}")
291-
print(f"Failed: {result['failed_count']}")
293+
print(f"Processed: {result['report']['succeeded']}")
294+
print(f"Failed: {len(result['report']['failed_entries'])}")
292295

293296
Performance Optimization
294297
------------------------
@@ -298,7 +301,13 @@ Performance Optimization
298301
::
299302

300303
# Fast path for single reference
301-
result = process_references("10.1038/nature14539")
304+
result = process_references(
305+
input_content="10.1038/nature14539",
306+
input_type="txt",
307+
template_name="journal_article_full",
308+
output_format="bibtex",
309+
interactive_callback=lambda c: 0
310+
)
302311

303312
**Batch References:**
304313

@@ -329,7 +338,13 @@ Validation Errors
329338
from onecite import ValidationError
330339
331340
try:
332-
result = process_references("")
341+
result = process_references(
342+
input_content="",
343+
input_type="txt",
344+
template_name="journal_article_full",
345+
output_format="bibtex",
346+
interactive_callback=lambda c: 0
347+
)
333348
except ValidationError:
334349
print("Empty input")
335350

@@ -341,7 +356,13 @@ Resolution Errors
341356
from onecite import ResolverError
342357
343358
try:
344-
result = process_references("invalid/doi")
359+
result = process_references(
360+
input_content="invalid/doi",
361+
input_type="txt",
362+
template_name="journal_article_full",
363+
output_format="bibtex",
364+
interactive_callback=lambda c: 0
365+
)
345366
except ResolverError:
346367
print("Could not find reference")
347368
print("Check identifier or try again later")
@@ -353,14 +374,20 @@ Partial Success
353374

354375
from onecite import process_references
355376
356-
result = process_references(mixed_refs)
377+
result = process_references(
378+
input_content=mixed_refs,
379+
input_type="txt",
380+
template_name="journal_article_full",
381+
output_format="bibtex",
382+
interactive_callback=lambda c: 0
383+
)
357384
358-
print(f"Success: {result['processed_count']}")
359-
print(f"Failed: {result['failed_count']}")
385+
print(f"Success: {result['report']['succeeded']}")
386+
print(f"Failed: {len(result['report']['failed_entries'])}")
360387
361-
if result['warnings']:
362-
for warning in result['warnings']:
363-
print(f"Warning: {warning}")
388+
if result['report']['failed_entries']:
389+
for entry in result['report']['failed_entries']:
390+
print(f"Failed entry {entry['id']}: {entry.get('error', 'Unknown')}")
364391

365392
Pipeline Configuration
366393
======================

0 commit comments

Comments
 (0)