scientific-writer 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of scientific-writer might be problematic. Click here for more details.

@@ -29,7 +29,7 @@ Example:
29
29
  from .api import generate_paper
30
30
  from .models import ProgressUpdate, PaperResult, PaperMetadata, PaperFiles
31
31
 
32
- __version__ = "2.0.0"
32
+ __version__ = "2.0.1"
33
33
  __author__ = "Scientific Writer Contributors"
34
34
  __license__ = "MIT"
35
35
 
@@ -0,0 +1,268 @@
1
+ Metadata-Version: 2.4
2
+ Name: scientific-writer
3
+ Version: 2.0.1
4
+ Summary: AI-powered scientific writing with programmatic API and CLI - powered by Claude Sonnet 4.5 and the Claude Agents SDK
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: <=3.12,>=3.10
8
+ Requires-Dist: claude-agent-sdk>=0.1.0
9
+ Requires-Dist: python-dotenv>=1.0.0
10
+ Requires-Dist: requests>=2.31.0
11
+ Description-Content-Type: text/markdown
12
+
13
+ # Claude Scientific Writer
14
+
15
+ [![PyPI version](https://badge.fury.io/py/scientific-writer.svg)](https://badge.fury.io/py/scientific-writer)
16
+ [![Total Downloads](https://static.pepy.tech/badge/scientific-writer)](https://pepy.tech/project/scientific-writer)
17
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18
+
19
+ A Python package and CLI for generating publication-ready scientific papers, reports, posters, grant proposals, and more academic documents with Claude Sonnet 4.5. Features real-time research lookup, intelligent paper detection, and comprehensive document conversion. Version 2.0 adds a fully typed, programmatic API while keeping the CLI 100% backward compatible.
20
+
21
+ **✨ What's New in v2.0+**
22
+ - Programmatic Python API with async support
23
+ - Research lookup with Perplexity Sonar Pro
24
+ - Intelligent paper detection (auto-resume editing)
25
+ - Grant proposal generation (NSF, NIH, DOE, DARPA)
26
+ - Research posters with LaTeX
27
+ - Scientific schematics (CONSORT, circuits, pathways)
28
+ - Document conversion (15+ formats with MarkItDown)
29
+ - ScholarEval peer review framework
30
+
31
+ ## Quick Start
32
+
33
+ ### Prerequisites
34
+ - Python 3.10-3.12
35
+ - ANTHROPIC_API_KEY (required), OPENROUTER_API_KEY (optional for research lookup)
36
+
37
+ ### Install
38
+
39
+ #### Option 1: Install from PyPI (Recommended)
40
+ ```bash
41
+ pip install scientific-writer
42
+ ```
43
+
44
+ #### Option 2: Install from source with uv
45
+ ```bash
46
+ git clone https://github.com/yourusername/claude-scientific-writer.git
47
+ cd claude-scientific-writer
48
+ uv sync
49
+ ```
50
+
51
+ ### Configure API keys
52
+ ```bash
53
+ # .env file (recommended)
54
+ echo "ANTHROPIC_API_KEY=your_key" > .env
55
+ echo "OPENROUTER_API_KEY=your_openrouter_key" >> .env
56
+ # or export in your shell
57
+ export ANTHROPIC_API_KEY='your_key'
58
+ ```
59
+
60
+ ### Use the CLI
61
+ ```bash
62
+ # If installed via pip
63
+ scientific-writer
64
+
65
+ # If installed from source with uv
66
+ uv run scientific-writer
67
+ ```
68
+
69
+ ### Use the Python API
70
+ ```python
71
+ import asyncio
72
+ from scientific_writer import generate_paper
73
+
74
+ async def main():
75
+ async for update in generate_paper("Create a Nature paper on CRISPR gene editing"):
76
+ if update["type"] == "progress":
77
+ print(f"[{update['percentage']}%] {update['message']}")
78
+ else:
79
+ print(f"PDF: {update['files']['pdf_final']}")
80
+
81
+ asyncio.run(main())
82
+ ```
83
+
84
+ ## Features
85
+
86
+ ### 📝 Document Generation
87
+ - **Scientific papers** with IMRaD structure (Nature, Science, NeurIPS, etc.)
88
+ - **Research posters** using LaTeX (beamerposter, tikzposter, baposter)
89
+ - **Grant proposals** (NSF, NIH, DOE, DARPA) with agency-specific formatting
90
+ - **Literature reviews** with systematic citation management
91
+ - **Scientific schematics** (CONSORT diagrams, circuit diagrams, biological pathways)
92
+
93
+ ### 🤖 AI-Powered Capabilities
94
+ - **Real-time research lookup** using Perplexity Sonar Pro (via OpenRouter)
95
+ - **Intelligent paper detection** - automatically identifies references to existing papers
96
+ - **Peer review feedback** with quantitative ScholarEval framework (8-dimension scoring)
97
+ - **Iterative editing** with context-aware revision suggestions
98
+
99
+ ### 🔧 Developer-Friendly
100
+ - **Programmatic API** - Full async Python API with type hints
101
+ - **CLI interface** - Interactive command-line tool with progress tracking
102
+ - **Progress streaming** - Real-time updates during generation
103
+ - **Comprehensive results** - JSON output with metadata, file paths, citations
104
+
105
+ ### 📦 Data & File Integration
106
+ - **Automatic data handling** - Drop files in `data/`, auto-sorted to `figures/` or `data/`
107
+ - **Document conversion** - PDF, DOCX, PPTX, XLSX to Markdown with MarkItDown
108
+ - **Bibliography management** - Automatic BibTeX generation and citation formatting
109
+ - **Figure integration** - Images automatically referenced and organized
110
+
111
+ ## Typical Workflow
112
+
113
+ ### CLI Usage
114
+ 1. Place figures and data in `data/` at the project root (images → `figures/`, files → `data/` automatically)
115
+ 2. Run `scientific-writer` and describe what you want
116
+ 3. Follow progress updates; outputs saved to `paper_outputs/<timestamp>_<topic>/`
117
+
118
+ ```bash
119
+ # Start a new paper
120
+ > Create a Nature paper on CRISPR gene editing with 5 key references
121
+
122
+ # Continue editing (automatically detected)
123
+ > Add a methods section about the experimental setup
124
+
125
+ # Reference existing paper by topic
126
+ > Find the acoustics paper and add a conclusion section
127
+
128
+ # Generate a grant proposal
129
+ > Write an NSF proposal for quantum computing research
130
+
131
+ # Create a research poster
132
+ > Generate a conference poster from my paper
133
+ ```
134
+
135
+ ### API Usage
136
+ ```python
137
+ import asyncio
138
+ from scientific_writer import generate_paper
139
+
140
+ async def main():
141
+ async for update in generate_paper(
142
+ query="Create a NeurIPS paper on transformers",
143
+ data_files=["results.csv", "figure.png"],
144
+ output_dir="./my_papers"
145
+ ):
146
+ if update["type"] == "progress":
147
+ print(f"[{update['percentage']}%] {update['message']}")
148
+ else:
149
+ print(f"✓ PDF: {update['files']['pdf_final']}")
150
+
151
+ asyncio.run(main())
152
+ ```
153
+
154
+ ## Quick Reference
155
+
156
+ ### Common Commands
157
+
158
+ | Task | Command Example |
159
+ |------|----------------|
160
+ | **Scientific Paper** | `> Create a Nature paper on CRISPR gene editing` |
161
+ | **Grant Proposal** | `> Write an NSF proposal for quantum computing research` |
162
+ | **Research Poster** | `> Generate a conference poster from my paper` |
163
+ | **Literature Review** | `> Create a literature review on machine learning in healthcare` |
164
+ | **Peer Review** | `> Evaluate this paper using the ScholarEval framework` |
165
+ | **Continue Editing** | `> Add a methods section` (automatically continues current paper) |
166
+ | **Find Existing Paper** | `> Find the acoustics paper and add a conclusion` |
167
+ | **New Paper** | `> new paper on climate change` (explicitly start fresh) |
168
+
169
+ ### Research Lookup Examples
170
+
171
+ ```bash
172
+ # Recent research (auto-triggers research lookup)
173
+ > Create a paper on recent advances in quantum computing (2024)
174
+
175
+ # Fact verification
176
+ > What are the current success rates for CAR-T therapy?
177
+
178
+ # Literature search
179
+ > Find 10 recent papers on transformer architectures from 2023-2024
180
+ ```
181
+
182
+ ### Document Types
183
+
184
+ | Type | Example |
185
+ |------|---------|
186
+ | **Papers** | Nature, Science, NeurIPS, ICML, IEEE, ACM |
187
+ | **Grants** | NSF, NIH R01/R21/K, DOE, DARPA |
188
+ | **Posters** | Conference posters (A0, A1, custom sizes) |
189
+ | **Reviews** | Systematic literature reviews |
190
+ | **Schematics** | CONSORT diagrams, circuits, biological pathways |
191
+
192
+ ### File Handling
193
+
194
+ ```bash
195
+ # 1. Drop files in data/ folder
196
+ cp results.csv ~/Documents/claude-scientific-writer/data/
197
+ cp figure.png ~/Documents/claude-scientific-writer/data/
198
+
199
+ # 2. Files are auto-sorted:
200
+ # Images (png, jpg, svg) → figures/
201
+ # Data (csv, json, txt) → data/
202
+
203
+ # 3. Reference in paper
204
+ > Create a paper analyzing the experimental results in results.csv
205
+ ```
206
+
207
+ ### API Quick Start
208
+
209
+ ```python
210
+ import asyncio
211
+ from scientific_writer import generate_paper
212
+
213
+ # Simple usage
214
+ async for update in generate_paper("Create a Nature paper on CRISPR"):
215
+ if update["type"] == "result":
216
+ print(f"PDF: {update['files']['pdf_final']}")
217
+
218
+ # With data files
219
+ async for update in generate_paper(
220
+ query="Analyze experimental results",
221
+ data_files=["results.csv", "figure.png"],
222
+ output_dir="./papers"
223
+ ):
224
+ if update["type"] == "progress":
225
+ print(f"[{update['percentage']}%] {update['message']}")
226
+ ```
227
+
228
+ ## Documentation
229
+
230
+ ### User Guides
231
+ - [📖 Complete Features Guide](docs/FEATURES.md) - Comprehensive overview of all capabilities
232
+ - [🔧 API Reference](docs/API.md) - Full programmatic API documentation
233
+ - [🎯 Skills Overview](docs/SKILLS.md) - All available skills and tools
234
+ - [🐛 Troubleshooting](docs/TROUBLESHOOTING.md) - Common issues and solutions
235
+
236
+ ### Developer Resources
237
+ - [💻 Development Guide](docs/DEVELOPMENT.md) - Contributing and development setup
238
+ - [📦 Releasing Guide](docs/RELEASING.md) - Versioning and publishing
239
+ - [📋 Release Notes](CHANGELOG.md) - Version history and updates
240
+ - [🤖 System Instructions](CLAUDE.md) - Agent instructions (advanced)
241
+
242
+ ## Versioning and Publishing (short)
243
+ Use `uv` and the helper scripts:
244
+ - Bump version (keeps pyproject + __init__ in sync): `uv run scripts/bump_version.py [patch|minor|major]`
245
+ - Build and publish: `uv run scripts/publish.py` (or `--bump patch|minor|major`)
246
+ See [docs/RELEASING.md](docs/RELEASING.md) for prerequisites, dry runs, tagging, and verification.
247
+
248
+ ## Migration (v1.x -> v2.0)
249
+ - CLI remains unchanged (scientific-writer).
250
+ - New programmatic API: from scientific_writer import generate_paper.
251
+ - Legacy single-file script is replaced by a proper package; no action needed for CLI users.
252
+
253
+ ## License
254
+ MIT - see LICENSE.
255
+
256
+ ## Support
257
+ - Open an issue on GitHub
258
+ - See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for common problems
259
+
260
+ ## ⭐ Show Your Support
261
+
262
+ If you find this project helpful for your research or work, please consider giving it a star on GitHub! It helps others discover the tool and motivates continued development. Thank you! 🙏
263
+
264
+ ![GitHub stars](https://img.shields.io/github/stars/K-Dense-AI/claude-scientific-writer?style=social)
265
+
266
+ ## Star History
267
+
268
+ [![Star History Chart](https://api.star-history.com/svg?repos=K-Dense-AI/claude-scientific-writer&type=Date)](https://star-history.com/#K-Dense-AI/claude-scientific-writer&Date)
@@ -1,11 +1,11 @@
1
- scientific_writer/__init__.py,sha256=SRUR4yXJ9cTBAUYsit7d4g_4v-8zVPWmh2jCCJRwPMU,1182
1
+ scientific_writer/__init__.py,sha256=4kM6vsHCtuymCtc_NfnboW8xKwIz9X5bdBL_WEkRmf4,1182
2
2
  scientific_writer/api.py,sha256=nWzBIvsTfCD_Are1-7kamhjqCHn37zc86js7S3QTdi0,12464
3
3
  scientific_writer/cli.py,sha256=Hox01o87h33HSumLVHl70AkNinS-OT6KduSzmwqmx40,14592
4
4
  scientific_writer/core.py,sha256=XsdXb-GuKY3ER9VXN1aBdcp4hcJXb4H6-e9wkZjJ1h4,6553
5
5
  scientific_writer/models.py,sha256=KjRjMjn4GtbHLIUrx2EZB4omGcZeLbflaTJmfNV1M6Y,2629
6
6
  scientific_writer/utils.py,sha256=z2nX3PDEcfW4pN_w47TDDC6Kmdcw5uFUGrT8T6lZYSg,9032
7
- scientific_writer-2.0.0.dist-info/METADATA,sha256=hh-NsQdiVEOc-92EqmyoUhIr2NdBREx4R5uMQ860ZWc,3237
8
- scientific_writer-2.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- scientific_writer-2.0.0.dist-info/entry_points.txt,sha256=pI1zUsWVV6eMkNEKfEmkKozOlLRZnhAZfXBsEyqXtqg,69
10
- scientific_writer-2.0.0.dist-info/licenses/LICENSE,sha256=H6FOLY6X6QMEnqcbDoq5BM0sBf-K-e1SIBAv0zSwxa4,1070
11
- scientific_writer-2.0.0.dist-info/RECORD,,
7
+ scientific_writer-2.0.1.dist-info/METADATA,sha256=Q5oY8ZXiYk6h-X3O0Ozv99VTfEskGmGyLaGFk53GVgY,9630
8
+ scientific_writer-2.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ scientific_writer-2.0.1.dist-info/entry_points.txt,sha256=pI1zUsWVV6eMkNEKfEmkKozOlLRZnhAZfXBsEyqXtqg,69
10
+ scientific_writer-2.0.1.dist-info/licenses/LICENSE,sha256=H6FOLY6X6QMEnqcbDoq5BM0sBf-K-e1SIBAv0zSwxa4,1070
11
+ scientific_writer-2.0.1.dist-info/RECORD,,
@@ -1,98 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: scientific-writer
3
- Version: 2.0.0
4
- Summary: AI-powered scientific writing with programmatic API and CLI - powered by Claude Sonnet 4.5 and the Claude Agents SDK
5
- License: MIT
6
- License-File: LICENSE
7
- Requires-Python: <=3.12,>=3.10
8
- Requires-Dist: claude-agent-sdk>=0.1.0
9
- Requires-Dist: python-dotenv>=1.0.0
10
- Requires-Dist: requests>=2.31.0
11
- Description-Content-Type: text/markdown
12
-
13
- # Claude Scientific Writer
14
-
15
- A Python package and CLI for generating publication-ready scientific papers with Claude Sonnet. Version 2.0 adds a fully typed, programmatic API while keeping the CLI 100% backward compatible.
16
-
17
- ## Quick Start
18
-
19
- ### Prerequisites
20
- - Python 3.10+
21
- - uv (package and environment manager)
22
- - ANTHROPIC_API_KEY (required), OPENROUTER_API_KEY (optional for research lookup)
23
-
24
- ### Install
25
- ```bash
26
- git clone https://github.com/yourusername/claude-scientific-writer.git
27
- cd claude-scientific-writer
28
- uv sync
29
- ```
30
-
31
- ### Configure API keys
32
- ```bash
33
- # .env file (recommended)
34
- echo "ANTHROPIC_API_KEY=your_key" > .env
35
- echo "OPENROUTER_API_KEY=your_openrouter_key" >> .env
36
- # or export in your shell
37
- export ANTHROPIC_API_KEY='your_key'
38
- ```
39
-
40
- ### Use the CLI
41
- ```bash
42
- uv run scientific-writer
43
- ```
44
-
45
- ### Use the Python API
46
- ```python
47
- import asyncio
48
- from scientific_writer import generate_paper
49
-
50
- async def main():
51
- async for update in generate_paper("Create a Nature paper on CRISPR gene editing"):
52
- if update["type"] == "progress":
53
- print(f"[{update['percentage']}%] {update['message']}")
54
- else:
55
- print(f"PDF: {update['files']['pdf_final']}")
56
-
57
- asyncio.run(main())
58
- ```
59
-
60
- ## Features
61
- - Scientific writing (IMRaD) with LaTeX and BibTeX outputs
62
- - Real-time progress streaming and transparent logging
63
- - Automatic bibliography and citation management
64
- - Data and figure integration from a local data/ folder
65
- - Research lookup via OpenRouter (optional)
66
- - CLI and programmatic API with full type hints
67
-
68
- ## Typical Workflow
69
- 1. Place figures and data in data/ at the project root (images -> figures/, files -> data/ automatically).
70
- 2. Run the CLI (or use the API) and describe what you want (venue, topic, constraints).
71
- 3. Follow progress updates; outputs are saved under paper_outputs/<timestamp>_<topic>/.
72
-
73
- ## Documentation
74
- - API Reference: Docs/API.md
75
- - Troubleshooting: Docs/TROUBLESHOOTING.md
76
- - Skills Overview: Docs/SKILLS.md
77
- - Development and Contributing: Docs/DEVELOPMENT.md
78
- - Releasing (versioning & publishing): Docs/RELEASING.md
79
- - Release Notes: CHANGELOG.md
80
- - System Instructions (for the agent): CLAUDE.md
81
-
82
- ## Versioning and Publishing (short)
83
- Use `uv` and the helper scripts:
84
- - Bump version (keeps pyproject + __init__ in sync): `uv run scripts/bump_version.py [patch|minor|major]`
85
- - Build and publish: `uv run scripts/publish.py` (or `--bump patch|minor|major`)
86
- See Docs/RELEASING.md for prerequisites, dry runs, tagging, and verification.
87
-
88
- ## Migration (v1.x -> v2.0)
89
- - CLI remains unchanged (scientific-writer).
90
- - New programmatic API: from scientific_writer import generate_paper.
91
- - Legacy single-file script is replaced by a proper package; no action needed for CLI users.
92
-
93
- ## License
94
- MIT - see LICENSE.
95
-
96
- ## Support
97
- - Open an issue on GitHub
98
- - See Docs/TROUBLESHOOTING.md for common problems