Metadata-Version: 2.4
Name: paper-scoring-connectors
Version: 0.1.0
Summary: Optional data-source and model-provider adapters for paper-scoring-core
Project-URL: Repository, https://github.com/maikeruSan/paper-scoring-connectors
Author: Paper Scoring contributors
License: MIT License
        
        Copyright (c) 2026 paper-scoring contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: paper-scoring-core<0.2,>=0.1
Provides-Extra: all
Requires-Dist: defusedxml<1,>=0.7; extra == 'all'
Requires-Dist: ollama<1,>=0.4.3; extra == 'all'
Requires-Dist: openai<3,>=1.68; extra == 'all'
Requires-Dist: pypdf<7,>=5; extra == 'all'
Provides-Extra: arxiv
Requires-Dist: defusedxml<1,>=0.7; extra == 'arxiv'
Provides-Extra: ollama
Requires-Dist: ollama<1,>=0.4.3; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: openai<3,>=1.68; extra == 'openai'
Provides-Extra: openalex
Provides-Extra: pdf
Requires-Dist: pypdf<7,>=5; extra == 'pdf'
Provides-Extra: security
Requires-Dist: bandit[toml]<2,>=1.8; extra == 'security'
Requires-Dist: detect-secrets<2,>=1.5; extra == 'security'
Requires-Dist: pip-audit<3,>=2.8; extra == 'security'
Provides-Extra: test
Requires-Dist: build<2,>=1.2; extra == 'test'
Requires-Dist: defusedxml<1,>=0.7; extra == 'test'
Requires-Dist: mypy<2,>=1.14; extra == 'test'
Requires-Dist: ollama<1,>=0.4.3; extra == 'test'
Requires-Dist: pytest-cov<8,>=6; extra == 'test'
Requires-Dist: pytest<10,>=9.0.3; extra == 'test'
Requires-Dist: ruff<1,>=0.12; extra == 'test'
Requires-Dist: twine<7,>=6; extra == 'test'
Requires-Dist: types-defusedxml<1,>=0.7; extra == 'test'
Description-Content-Type: text/markdown

# paper-scoring-connectors

Optional data-source, document, related-work, and assessment-provider adapters for
`paper-scoring-core`. The package contains no credentials, reads no `.env` files, and performs no
work at import time. Applications inject configuration when they create an adapter.

## Installation

Install only the integrations that an application needs:

```shell
python -m pip install "paper-scoring-connectors[arxiv,pdf,openalex]"
python -m pip install "paper-scoring-connectors[openai]"
python -m pip install "paper-scoring-connectors[ollama]"
```

`openalex` intentionally adds no third-party dependency; it uses the Python standard library.
`all` installs every optional SDK. Dependencies between paper-scoring distributions use normal
PyPI version constraints and never Git or local filesystem references.

## Examples

Search arXiv without exposing SDK objects to the rest of the application:

```python
from datetime import date

from paper_scoring_connectors.arxiv import ArxivSource

documents = ArxivSource().search("cs.AI", date(2026, 1, 15), max_results=10)
```

Lower-level `ArxivClient`, `QueryBuilder`, and `download_pdf` APIs are available when an
application needs control over individual steps. Batch pipelines should call
`ArxivSource.search_with_failures(...)`: it isolates each download/extraction failure and returns
`ArxivBatchResult(successes=..., failures=...)`. Failures contain only the paper ID, title, and
exception type; provider messages are never retained.

Extract a local PDF into the core document contract:

```python
from paper_scoring_connectors.pdf import PdfDocumentLoader

document = PdfDocumentLoader().load("paper.pdf", title="A paper")
```

Create an assessment adapter with an arbitrary model identifier (there is no model enum):

```python
from paper_scoring_connectors.providers import create_assessment_model

model = create_assessment_model("openai", "your-model-id", api_key="injected-at-runtime")
```

For Ollama, pass `host=` and any client options explicitly. SDK defaults may consume process
environment variables that the caller injects at runtime; this package never parses `.env` files.

## Supported contract

Version 0.1 targets these `paper-scoring-core` imports:

```python
from paper_scoring.models import AssessmentRequest, AssessmentResponse, PaperDocument, PageText
from paper_scoring.ports import AssessmentModel, RelatedWorkRetriever
from paper_scoring.rubric import render_assessment_prompt
```

The core contract is the only mandatory runtime dependency. Each connector is independently
importable, and provider SDK imports remain lazy.

## Development

```shell
python -m pip install -e ".[all,test,security]"
pytest
ruff check .
mypy
bandit -c pyproject.toml -r src
python -m build
```

All functional tests are offline and use injected fake transports or clients. See
`docs/report-templates/` for the release evidence templates populated by the release workflow.
