paperful 1.1.0__tar.gz

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.
Files changed (576) hide show
  1. paperful-1.1.0/.dockerignore +35 -0
  2. paperful-1.1.0/.env.example +49 -0
  3. paperful-1.1.0/.github/workflows/ci.yml +51 -0
  4. paperful-1.1.0/.github/workflows/coverage-badge.yml +40 -0
  5. paperful-1.1.0/.github/workflows/docs.yml +36 -0
  6. paperful-1.1.0/.github/workflows/pages.yml +48 -0
  7. paperful-1.1.0/.github/workflows/publish.yml +33 -0
  8. paperful-1.1.0/.gitignore +24 -0
  9. paperful-1.1.0/.python-version +1 -0
  10. paperful-1.1.0/.readthedocs.yml +19 -0
  11. paperful-1.1.0/CHANGELOG.md +781 -0
  12. paperful-1.1.0/CONTRIBUTING.md +78 -0
  13. paperful-1.1.0/Dockerfile +68 -0
  14. paperful-1.1.0/LICENSE +21 -0
  15. paperful-1.1.0/Makefile +64 -0
  16. paperful-1.1.0/PKG-INFO +255 -0
  17. paperful-1.1.0/README.md +195 -0
  18. paperful-1.1.0/badges/coverage.json +6 -0
  19. paperful-1.1.0/compose.gui.yaml +9 -0
  20. paperful-1.1.0/compose.override.example.yaml +15 -0
  21. paperful-1.1.0/compose.yaml +39 -0
  22. paperful-1.1.0/config.example.toml +419 -0
  23. paperful-1.1.0/config.minimal.toml +14 -0
  24. paperful-1.1.0/data +1 -0
  25. paperful-1.1.0/docs/ROADMAP.md +1502 -0
  26. paperful-1.1.0/docs/TERMS.md +35 -0
  27. paperful-1.1.0/docs/_static/.gitkeep +0 -0
  28. paperful-1.1.0/docs/_static/docs.css +19 -0
  29. paperful-1.1.0/docs/_static/icon.png +0 -0
  30. paperful-1.1.0/docs/_static/logo-dark.png +0 -0
  31. paperful-1.1.0/docs/_static/logo.png +0 -0
  32. paperful-1.1.0/docs/_static/workflows/activity.png +0 -0
  33. paperful-1.1.0/docs/_static/workflows/briefs.png +0 -0
  34. paperful-1.1.0/docs/_static/workflows/discover-people.png +0 -0
  35. paperful-1.1.0/docs/_static/workflows/discover.png +0 -0
  36. paperful-1.1.0/docs/_static/workflows/index-ask.png +0 -0
  37. paperful-1.1.0/docs/_static/workflows/index.png +0 -0
  38. paperful-1.1.0/docs/_static/workflows/library.png +0 -0
  39. paperful-1.1.0/docs/_static/workflows/mirror.png +0 -0
  40. paperful-1.1.0/docs/_static/workflows/repair.png +0 -0
  41. paperful-1.1.0/docs/_static/workflows/system.png +0 -0
  42. paperful-1.1.0/docs/_static/workflows/wanted-held.png +0 -0
  43. paperful-1.1.0/docs/_static/workflows/wanted.png +0 -0
  44. paperful-1.1.0/docs/_templates/page.html +40 -0
  45. paperful-1.1.0/docs/ai.md +286 -0
  46. paperful-1.1.0/docs/architecture.md +448 -0
  47. paperful-1.1.0/docs/authorwatch.md +160 -0
  48. paperful-1.1.0/docs/bbnj-author-lanes.md +205 -0
  49. paperful-1.1.0/docs/browser-agent-models.md +111 -0
  50. paperful-1.1.0/docs/camofox.md +83 -0
  51. paperful-1.1.0/docs/commands.md +481 -0
  52. paperful-1.1.0/docs/comparison-reference.md +211 -0
  53. paperful-1.1.0/docs/comparison.md +188 -0
  54. paperful-1.1.0/docs/conf.py +84 -0
  55. paperful-1.1.0/docs/config.md +412 -0
  56. paperful-1.1.0/docs/dedupe.md +98 -0
  57. paperful-1.1.0/docs/developer.md +331 -0
  58. paperful-1.1.0/docs/docker.md +297 -0
  59. paperful-1.1.0/docs/e2e-nba.md +148 -0
  60. paperful-1.1.0/docs/e2e-stack.md +101 -0
  61. paperful-1.1.0/docs/endnote.md +94 -0
  62. paperful-1.1.0/docs/example-setups.md +353 -0
  63. paperful-1.1.0/docs/ezproxy.md +204 -0
  64. paperful-1.1.0/docs/favicon-32.png +0 -0
  65. paperful-1.1.0/docs/favicon.ico +0 -0
  66. paperful-1.1.0/docs/first-fill.md +106 -0
  67. paperful-1.1.0/docs/grow-library.md +101 -0
  68. paperful-1.1.0/docs/gui.md +291 -0
  69. paperful-1.1.0/docs/how-it-works.md +151 -0
  70. paperful-1.1.0/docs/icon.png +0 -0
  71. paperful-1.1.0/docs/index.md +78 -0
  72. paperful-1.1.0/docs/llm.md +429 -0
  73. paperful-1.1.0/docs/logo-dark.png +0 -0
  74. paperful-1.1.0/docs/logo.png +0 -0
  75. paperful-1.1.0/docs/mendeley.md +71 -0
  76. paperful-1.1.0/docs/plans/miss-desk-1.0-gui-fixes.md +177 -0
  77. paperful-1.1.0/docs/quiet-mirror.md +136 -0
  78. paperful-1.1.0/docs/rag.md +317 -0
  79. paperful-1.1.0/docs/releases.md +121 -0
  80. paperful-1.1.0/docs/research-ops.md +110 -0
  81. paperful-1.1.0/docs/research-pack.md +103 -0
  82. paperful-1.1.0/docs/scihub.md +54 -0
  83. paperful-1.1.0/docs/screen.md +39 -0
  84. paperful-1.1.0/docs/serpapi.md +107 -0
  85. paperful-1.1.0/docs/sessions.md +119 -0
  86. paperful-1.1.0/docs/snowball.md +765 -0
  87. paperful-1.1.0/docs/sources.md +145 -0
  88. paperful-1.1.0/docs/templates/e2e-watch-assessment.md +63 -0
  89. paperful-1.1.0/docs/tidy-library.md +90 -0
  90. paperful-1.1.0/docs/walkthroughs.md +42 -0
  91. paperful-1.1.0/docs/why.md +74 -0
  92. paperful-1.1.0/docs/workflows.md +416 -0
  93. paperful-1.1.0/docs/zotero.md +226 -0
  94. paperful-1.1.0/out +1 -0
  95. paperful-1.1.0/packs +1 -0
  96. paperful-1.1.0/paperful/__init__.py +3 -0
  97. paperful-1.1.0/paperful/acronyms.py +173 -0
  98. paperful-1.1.0/paperful/agent_json.py +95 -0
  99. paperful-1.1.0/paperful/agent_ops.py +558 -0
  100. paperful-1.1.0/paperful/all_cmd.py +345 -0
  101. paperful-1.1.0/paperful/ask_cmd.py +335 -0
  102. paperful-1.1.0/paperful/attach.py +291 -0
  103. paperful-1.1.0/paperful/attach_cmd.py +93 -0
  104. paperful-1.1.0/paperful/attachments.py +570 -0
  105. paperful-1.1.0/paperful/attachments_cmd.py +219 -0
  106. paperful-1.1.0/paperful/author_request.py +138 -0
  107. paperful-1.1.0/paperful/authors_cmd.py +168 -0
  108. paperful-1.1.0/paperful/authors_report.py +197 -0
  109. paperful-1.1.0/paperful/authorwatch.py +1396 -0
  110. paperful-1.1.0/paperful/authorwatch_social.py +169 -0
  111. paperful-1.1.0/paperful/authorwatch_suggest.py +432 -0
  112. paperful-1.1.0/paperful/browser_agent.py +881 -0
  113. paperful-1.1.0/paperful/cache_cmd.py +42 -0
  114. paperful-1.1.0/paperful/camofox_client.py +245 -0
  115. paperful-1.1.0/paperful/camofox_recover.py +184 -0
  116. paperful-1.1.0/paperful/catalogue.py +611 -0
  117. paperful-1.1.0/paperful/circuit.py +85 -0
  118. paperful-1.1.0/paperful/cli.py +6233 -0
  119. paperful-1.1.0/paperful/cli_runtime.py +970 -0
  120. paperful-1.1.0/paperful/collections_add.py +151 -0
  121. paperful-1.1.0/paperful/collections_cmd.py +130 -0
  122. paperful-1.1.0/paperful/completeness_cmd.py +14 -0
  123. paperful-1.1.0/paperful/config.py +922 -0
  124. paperful-1.1.0/paperful/config_tables.py +667 -0
  125. paperful-1.1.0/paperful/cookies.py +332 -0
  126. paperful-1.1.0/paperful/coverage.py +349 -0
  127. paperful-1.1.0/paperful/coverage_cmd.py +133 -0
  128. paperful-1.1.0/paperful/data/grey_playbooks_examples/grey_playbooks_energy.toml +16 -0
  129. paperful-1.1.0/paperful/data/grey_playbooks_examples/grey_playbooks_intl_orgs.toml +29 -0
  130. paperful-1.1.0/paperful/data/grey_playbooks_ocean.toml +89 -0
  131. paperful-1.1.0/paperful/dedupe.py +807 -0
  132. paperful-1.1.0/paperful/dedupe_cmd.py +268 -0
  133. paperful-1.1.0/paperful/doctor.py +1123 -0
  134. paperful-1.1.0/paperful/doctor_cmd.py +183 -0
  135. paperful-1.1.0/paperful/download.py +148 -0
  136. paperful-1.1.0/paperful/e2e_nba.py +1087 -0
  137. paperful-1.1.0/paperful/endnote.py +1216 -0
  138. paperful-1.1.0/paperful/export_build.py +89 -0
  139. paperful-1.1.0/paperful/export_cmd.py +148 -0
  140. paperful-1.1.0/paperful/fetch_wins.py +362 -0
  141. paperful-1.1.0/paperful/fix_metadata_cmd.py +236 -0
  142. paperful-1.1.0/paperful/gaps_cmd.py +269 -0
  143. paperful-1.1.0/paperful/grey_probe.py +465 -0
  144. paperful-1.1.0/paperful/greyid.py +164 -0
  145. paperful-1.1.0/paperful/grounding.py +62 -0
  146. paperful-1.1.0/paperful/handoff.py +582 -0
  147. paperful-1.1.0/paperful/handoff_rank.py +118 -0
  148. paperful-1.1.0/paperful/identity.py +258 -0
  149. paperful-1.1.0/paperful/inbox.py +918 -0
  150. paperful-1.1.0/paperful/inbox_cmd.py +359 -0
  151. paperful-1.1.0/paperful/inbox_match.py +484 -0
  152. paperful-1.1.0/paperful/inbox_route.py +489 -0
  153. paperful-1.1.0/paperful/ingest_dois.py +299 -0
  154. paperful-1.1.0/paperful/interop/__init__.py +31 -0
  155. paperful-1.1.0/paperful/interop/bibtex.py +169 -0
  156. paperful-1.1.0/paperful/interop/endnote_xml.py +265 -0
  157. paperful-1.1.0/paperful/interop/load.py +131 -0
  158. paperful-1.1.0/paperful/interop/ris.py +190 -0
  159. paperful-1.1.0/paperful/interop/types.py +322 -0
  160. paperful-1.1.0/paperful/library.py +907 -0
  161. paperful-1.1.0/paperful/lint.py +414 -0
  162. paperful-1.1.0/paperful/lint_cmd.py +179 -0
  163. paperful-1.1.0/paperful/llm/__init__.py +85 -0
  164. paperful-1.1.0/paperful/llm/client.py +324 -0
  165. paperful-1.1.0/paperful/llm/embed.py +300 -0
  166. paperful-1.1.0/paperful/llm/preflight.py +114 -0
  167. paperful-1.1.0/paperful/llm/validate.py +170 -0
  168. paperful-1.1.0/paperful/llm_pdf_match.py +66 -0
  169. paperful-1.1.0/paperful/llm_title.py +70 -0
  170. paperful-1.1.0/paperful/mcp_server.py +353 -0
  171. paperful-1.1.0/paperful/mendeley.py +1344 -0
  172. paperful-1.1.0/paperful/metadata.py +326 -0
  173. paperful-1.1.0/paperful/mirror.py +509 -0
  174. paperful-1.1.0/paperful/mirrors_cmd.py +27 -0
  175. paperful-1.1.0/paperful/miss_surface.py +323 -0
  176. paperful-1.1.0/paperful/notehtml.py +102 -0
  177. paperful-1.1.0/paperful/notes.py +196 -0
  178. paperful-1.1.0/paperful/notes_delete_cmd.py +170 -0
  179. paperful-1.1.0/paperful/oa_locations.py +106 -0
  180. paperful-1.1.0/paperful/ocr.py +327 -0
  181. paperful-1.1.0/paperful/ocr_cmd.py +216 -0
  182. paperful-1.1.0/paperful/ocr_ignore.py +113 -0
  183. paperful-1.1.0/paperful/ocr_ignore_cmd.py +92 -0
  184. paperful-1.1.0/paperful/pack.py +228 -0
  185. paperful-1.1.0/paperful/pack_bib.py +122 -0
  186. paperful-1.1.0/paperful/pack_cmd.py +93 -0
  187. paperful-1.1.0/paperful/page_signals.py +274 -0
  188. paperful-1.1.0/paperful/pdfid.py +171 -0
  189. paperful-1.1.0/paperful/pipeline.py +1341 -0
  190. paperful-1.1.0/paperful/pipeline_attach.py +101 -0
  191. paperful-1.1.0/paperful/pipeline_browser.py +44 -0
  192. paperful-1.1.0/paperful/pipeline_phases.py +244 -0
  193. paperful-1.1.0/paperful/pipeline_save.py +127 -0
  194. paperful-1.1.0/paperful/playbooks.py +338 -0
  195. paperful-1.1.0/paperful/progress.py +95 -0
  196. paperful-1.1.0/paperful/provenance.py +106 -0
  197. paperful-1.1.0/paperful/quotes.py +111 -0
  198. paperful-1.1.0/paperful/rag/__init__.py +6 -0
  199. paperful-1.1.0/paperful/rag/answer.py +109 -0
  200. paperful-1.1.0/paperful/rag/answered.py +248 -0
  201. paperful-1.1.0/paperful/rag/ask_turn.py +101 -0
  202. paperful-1.1.0/paperful/rag/auto.py +43 -0
  203. paperful-1.1.0/paperful/rag/batch.py +296 -0
  204. paperful-1.1.0/paperful/rag/chunk.py +214 -0
  205. paperful-1.1.0/paperful/rag/extract.py +220 -0
  206. paperful-1.1.0/paperful/rag/index.py +232 -0
  207. paperful-1.1.0/paperful/rag/ingest.py +468 -0
  208. paperful-1.1.0/paperful/rag/ledger.py +223 -0
  209. paperful-1.1.0/paperful/rag/prompt.py +228 -0
  210. paperful-1.1.0/paperful/rag/questions.py +301 -0
  211. paperful-1.1.0/paperful/rag/retrieve.py +133 -0
  212. paperful-1.1.0/paperful/rag/status.py +112 -0
  213. paperful-1.1.0/paperful/rag/thread.py +115 -0
  214. paperful-1.1.0/paperful/reachout.py +301 -0
  215. paperful-1.1.0/paperful/reachout_cmd.py +218 -0
  216. paperful-1.1.0/paperful/recover_cmd.py +175 -0
  217. paperful-1.1.0/paperful/refs_gap.py +207 -0
  218. paperful-1.1.0/paperful/refs_gap_cmd.py +158 -0
  219. paperful-1.1.0/paperful/remarks.py +133 -0
  220. paperful-1.1.0/paperful/resolve/__init__.py +89 -0
  221. paperful-1.1.0/paperful/resolve/enrich.py +623 -0
  222. paperful-1.1.0/paperful/resolve/ids.py +560 -0
  223. paperful-1.1.0/paperful/restore.py +276 -0
  224. paperful-1.1.0/paperful/routing.py +626 -0
  225. paperful-1.1.0/paperful/run_cmd.py +288 -0
  226. paperful-1.1.0/paperful/run_config.py +801 -0
  227. paperful-1.1.0/paperful/run_hooks.py +484 -0
  228. paperful-1.1.0/paperful/runreport.py +774 -0
  229. paperful-1.1.0/paperful/scope.py +144 -0
  230. paperful-1.1.0/paperful/screen.py +637 -0
  231. paperful-1.1.0/paperful/screen_cmd.py +205 -0
  232. paperful-1.1.0/paperful/sections/__init__.py +1 -0
  233. paperful-1.1.0/paperful/sections/command.py +196 -0
  234. paperful-1.1.0/paperful/sections/extract.py +256 -0
  235. paperful-1.1.0/paperful/sections/headings.py +172 -0
  236. paperful-1.1.0/paperful/sections/llm.py +148 -0
  237. paperful-1.1.0/paperful/serve.py +77 -0
  238. paperful-1.1.0/paperful/session.py +1168 -0
  239. paperful-1.1.0/paperful/session_cmd.py +332 -0
  240. paperful-1.1.0/paperful/snapshot.py +696 -0
  241. paperful-1.1.0/paperful/snowball/__init__.py +19 -0
  242. paperful-1.1.0/paperful/snowball/authors.py +388 -0
  243. paperful-1.1.0/paperful/snowball/bibliography.py +564 -0
  244. paperful-1.1.0/paperful/snowball/briefing.py +230 -0
  245. paperful-1.1.0/paperful/snowball/candidate.py +71 -0
  246. paperful-1.1.0/paperful/snowball/command.py +1734 -0
  247. paperful-1.1.0/paperful/snowball/crawl.py +1441 -0
  248. paperful-1.1.0/paperful/snowball/digest.py +330 -0
  249. paperful-1.1.0/paperful/snowball/europepmc.py +239 -0
  250. paperful-1.1.0/paperful/snowball/expand.py +474 -0
  251. paperful-1.1.0/paperful/snowball/fill.py +755 -0
  252. paperful-1.1.0/paperful/snowball/hops.py +352 -0
  253. paperful-1.1.0/paperful/snowball/ingest.py +348 -0
  254. paperful-1.1.0/paperful/snowball/local_cites.py +172 -0
  255. paperful-1.1.0/paperful/snowball/local_openalex.py +284 -0
  256. paperful-1.1.0/paperful/snowball/openalex.py +924 -0
  257. paperful-1.1.0/paperful/snowball/orcid.py +129 -0
  258. paperful-1.1.0/paperful/snowball/preflight.py +134 -0
  259. paperful-1.1.0/paperful/snowball/profile.py +226 -0
  260. paperful-1.1.0/paperful/snowball/queue.py +74 -0
  261. paperful-1.1.0/paperful/snowball/rank.py +23 -0
  262. paperful-1.1.0/paperful/snowball/refine.py +56 -0
  263. paperful-1.1.0/paperful/snowball/searxng.py +112 -0
  264. paperful-1.1.0/paperful/snowball/seeds.py +101 -0
  265. paperful-1.1.0/paperful/snowball/similar.py +159 -0
  266. paperful-1.1.0/paperful/snowball/tally.py +205 -0
  267. paperful-1.1.0/paperful/snowball/titles.py +133 -0
  268. paperful-1.1.0/paperful/snowball/trends.py +96 -0
  269. paperful-1.1.0/paperful/snowball/trends_cmd.py +75 -0
  270. paperful-1.1.0/paperful/snowball/watch.py +393 -0
  271. paperful-1.1.0/paperful/sources/__init__.py +46 -0
  272. paperful-1.1.0/paperful/sources/arxiv.py +68 -0
  273. paperful-1.1.0/paperful/sources/author_site.py +77 -0
  274. paperful-1.1.0/paperful/sources/base.py +138 -0
  275. paperful-1.1.0/paperful/sources/biorxiv.py +42 -0
  276. paperful-1.1.0/paperful/sources/browser_agent.py +72 -0
  277. paperful-1.1.0/paperful/sources/camofox.py +43 -0
  278. paperful-1.1.0/paperful/sources/core.py +70 -0
  279. paperful-1.1.0/paperful/sources/direct.py +100 -0
  280. paperful-1.1.0/paperful/sources/europepmc.py +91 -0
  281. paperful-1.1.0/paperful/sources/ezproxy.py +178 -0
  282. paperful-1.1.0/paperful/sources/htmlpdf.py +273 -0
  283. paperful-1.1.0/paperful/sources/landing.py +399 -0
  284. paperful-1.1.0/paperful/sources/openaire.py +96 -0
  285. paperful-1.1.0/paperful/sources/openalex.py +73 -0
  286. paperful-1.1.0/paperful/sources/scholar.py +181 -0
  287. paperful-1.1.0/paperful/sources/scihub.py +250 -0
  288. paperful-1.1.0/paperful/sources/semanticscholar.py +42 -0
  289. paperful-1.1.0/paperful/sources/serpapi_scholar.py +89 -0
  290. paperful-1.1.0/paperful/sources/unpaywall.py +77 -0
  291. paperful-1.1.0/paperful/ste.py +219 -0
  292. paperful-1.1.0/paperful/store.py +634 -0
  293. paperful-1.1.0/paperful/summarize.py +612 -0
  294. paperful-1.1.0/paperful/summarize_cmd.py +237 -0
  295. paperful-1.1.0/paperful/sync.py +665 -0
  296. paperful-1.1.0/paperful/synthesize.py +691 -0
  297. paperful-1.1.0/paperful/synthesize_cmd.py +270 -0
  298. paperful-1.1.0/paperful/twenty.py +1373 -0
  299. paperful-1.1.0/paperful/ui/__init__.py +1 -0
  300. paperful-1.1.0/paperful/ui/app.py +226 -0
  301. paperful-1.1.0/paperful/ui/commands.py +241 -0
  302. paperful-1.1.0/paperful/ui/context.py +105 -0
  303. paperful-1.1.0/paperful/ui/discover_jobs.py +159 -0
  304. paperful-1.1.0/paperful/ui/discover_routes.py +825 -0
  305. paperful-1.1.0/paperful/ui/doctor_steps.py +17 -0
  306. paperful-1.1.0/paperful/ui/index_jobs.py +628 -0
  307. paperful-1.1.0/paperful/ui/index_routes.py +688 -0
  308. paperful-1.1.0/paperful/ui/jobs.py +718 -0
  309. paperful-1.1.0/paperful/ui/pages.py +1006 -0
  310. paperful-1.1.0/paperful/ui/prefs.py +45 -0
  311. paperful-1.1.0/paperful/ui/preview_store.py +39 -0
  312. paperful-1.1.0/paperful/ui/rag_form.py +201 -0
  313. paperful-1.1.0/paperful/ui/repair_jobs.py +774 -0
  314. paperful-1.1.0/paperful/ui/repair_mirror_jobs.py +785 -0
  315. paperful-1.1.0/paperful/ui/repair_routes.py +297 -0
  316. paperful-1.1.0/paperful/ui/shell_routes.py +508 -0
  317. paperful-1.1.0/paperful/ui/snowball_form.py +244 -0
  318. paperful-1.1.0/paperful/ui/static/favicon-32.png +0 -0
  319. paperful-1.1.0/paperful/ui/static/icon.png +0 -0
  320. paperful-1.1.0/paperful/ui/static/workbench.css +886 -0
  321. paperful-1.1.0/paperful/ui/static/workbench.js +164 -0
  322. paperful-1.1.0/paperful/ui/templates/_help.html +11 -0
  323. paperful-1.1.0/paperful/ui/templates/_icon_btn.html +28 -0
  324. paperful-1.1.0/paperful/ui/templates/_job_status.html +8 -0
  325. paperful-1.1.0/paperful/ui/templates/_miss_surface.html +47 -0
  326. paperful-1.1.0/paperful/ui/templates/_rag_prompt_fields.html +23 -0
  327. paperful-1.1.0/paperful/ui/templates/_rag_scope_fields.html +10 -0
  328. paperful-1.1.0/paperful/ui/templates/activity.html +23 -0
  329. paperful-1.1.0/paperful/ui/templates/ask.html +120 -0
  330. paperful-1.1.0/paperful/ui/templates/base.html +71 -0
  331. paperful-1.1.0/paperful/ui/templates/brief_summary.html +9 -0
  332. paperful-1.1.0/paperful/ui/templates/briefs.html +119 -0
  333. paperful-1.1.0/paperful/ui/templates/discover.html +432 -0
  334. paperful-1.1.0/paperful/ui/templates/index.html +161 -0
  335. paperful-1.1.0/paperful/ui/templates/library.html +115 -0
  336. paperful-1.1.0/paperful/ui/templates/mirror.html +65 -0
  337. paperful-1.1.0/paperful/ui/templates/repair.html +91 -0
  338. paperful-1.1.0/paperful/ui/templates/settings.html +33 -0
  339. paperful-1.1.0/paperful/ui/templates/stub.html +6 -0
  340. paperful-1.1.0/paperful/ui/templates/system.html +22 -0
  341. paperful-1.1.0/paperful/ui/templates/wanted.html +265 -0
  342. paperful-1.1.0/paperful/ui/verify.py +69 -0
  343. paperful-1.1.0/paperful/ui/wanted_jobs.py +358 -0
  344. paperful-1.1.0/paperful/ui/wanted_routes.py +512 -0
  345. paperful-1.1.0/paperful/urls.py +163 -0
  346. paperful-1.1.0/paperful/versions.py +544 -0
  347. paperful-1.1.0/paperful/versions_cmd.py +148 -0
  348. paperful-1.1.0/paperful/witness.py +183 -0
  349. paperful-1.1.0/paperful/xfer.py +53 -0
  350. paperful-1.1.0/paperful/zot.py +823 -0
  351. paperful-1.1.0/paperful-cloud/favicon-32.png +0 -0
  352. paperful-1.1.0/paperful-cloud/favicon.ico +0 -0
  353. paperful-1.1.0/paperful-cloud/index.html +80 -0
  354. paperful-1.1.0/paperful-cloud/og.png +0 -0
  355. paperful-1.1.0/profiles/bbnj-journal.toml +12 -0
  356. paperful-1.1.0/profiles/doi-refs-gated.toml +9 -0
  357. paperful-1.1.0/profiles/e2e-nba-run.toml +12 -0
  358. paperful-1.1.0/profiles/e2e-nba-search.toml +14 -0
  359. paperful-1.1.0/profiles/keyword-library.toml +11 -0
  360. paperful-1.1.0/profiles/keyword-scout.toml +8 -0
  361. paperful-1.1.0/profiles/orcid-ego-auto.toml +10 -0
  362. paperful-1.1.0/pyproject.toml +121 -0
  363. paperful-1.1.0/scripts/coverage_badge.py +54 -0
  364. paperful-1.1.0/scripts/docs/capture_workbench.py +369 -0
  365. paperful-1.1.0/scripts/e2e_nba.py +16 -0
  366. paperful-1.1.0/scripts/e2e_stack.py +16 -0
  367. paperful-1.1.0/scripts/release/assemble_pages_site.sh +47 -0
  368. paperful-1.1.0/scripts/release/build_docs.sh +34 -0
  369. paperful-1.1.0/scripts/release/pre_release.sh +121 -0
  370. paperful-1.1.0/state +1 -0
  371. paperful-1.1.0/tests/conftest.py +270 -0
  372. paperful-1.1.0/tests/fixtures/agent_json/ask.json +17 -0
  373. paperful-1.1.0/tests/fixtures/agent_json/inbox_drain.json +11 -0
  374. paperful-1.1.0/tests/fixtures/agent_json/ingest_dois.json +11 -0
  375. paperful-1.1.0/tests/fixtures/agent_json/refs_gap.json +11 -0
  376. paperful-1.1.0/tests/fixtures/agent_json/run.json +11 -0
  377. paperful-1.1.0/tests/fixtures/agent_json_v1_keys.json +11 -0
  378. paperful-1.1.0/tests/fixtures/authorwatch/rg-follows.html +5 -0
  379. paperful-1.1.0/tests/fixtures/coverage_pack_v1/keys.json +8 -0
  380. paperful-1.1.0/tests/fixtures/coverage_pack_v1/pack.json +29 -0
  381. paperful-1.1.0/tests/fixtures/grey/corpus.toml +114 -0
  382. paperful-1.1.0/tests/fixtures/grey/recorded/00-undocs-unga-vme.json +24 -0
  383. paperful-1.1.0/tests/fixtures/grey/recorded/01-undocs-unga-vme.json +24 -0
  384. paperful-1.1.0/tests/fixtures/grey/recorded/02-undocs-unga-vme-symbol.json +24 -0
  385. paperful-1.1.0/tests/fixtures/grey/recorded/03-fao.json +24 -0
  386. paperful-1.1.0/tests/fixtures/grey/recorded/04-fao.json +24 -0
  387. paperful-1.1.0/tests/fixtures/grey/recorded/05-bbnj-doalos-prepcom.json +349 -0
  388. paperful-1.1.0/tests/fixtures/grey/recorded/06-bbnj-doalos-prepcom.json +16 -0
  389. paperful-1.1.0/tests/fixtures/grey/recorded/07-isa-deepdata.json +337 -0
  390. paperful-1.1.0/tests/fixtures/grey/recorded/08-rfmo-docs.json +465 -0
  391. paperful-1.1.0/tests/fixtures/grey/recorded/09-rfmo-docs.json +345 -0
  392. paperful-1.1.0/tests/fixtures/grey/recorded/10-rfmo-docs.json +249 -0
  393. paperful-1.1.0/tests/fixtures/grey/recorded/11-iucn-dosi.json +359 -0
  394. paperful-1.1.0/tests/fixtures/grey/recorded/12-iucn-dosi.json +368 -0
  395. paperful-1.1.0/tests/fixtures/grey/recorded/13-thinktank-ocean.json +16 -0
  396. paperful-1.1.0/tests/fixtures/grey/recorded/14-thinktank-ocean.json +16 -0
  397. paperful-1.1.0/tests/fixtures/grey/recorded/15-iea-scrape.json +16 -0
  398. paperful-1.1.0/tests/fixtures/grey/recorded/16-irena-scrape.json +16 -0
  399. paperful-1.1.0/tests/fixtures/grey/recorded/17-irena-scrape.json +16 -0
  400. paperful-1.1.0/tests/fixtures/grey/recorded/18-oecd-scrape.json +16 -0
  401. paperful-1.1.0/tests/fixtures/grey/recorded/19-who-scrape.json +16 -0
  402. paperful-1.1.0/tests/fixtures/grey/recorded/20-unep-scrape.json +356 -0
  403. paperful-1.1.0/tests/fixtures/grey/recorded/21-undp-scrape.json +16 -0
  404. paperful-1.1.0/tests/fixtures/grey/recorded/index.json +444 -0
  405. paperful-1.1.0/tests/fixtures/inbox_proposal_v1/keys.json +6 -0
  406. paperful-1.1.0/tests/fixtures/inbox_proposal_v1/pending.json +13 -0
  407. paperful-1.1.0/tests/fixtures/item_v1/empty_shell.json +46 -0
  408. paperful-1.1.0/tests/fixtures/item_v1/keys.json +31 -0
  409. paperful-1.1.0/tests/fixtures/item_v1/record.json +15 -0
  410. paperful-1.1.0/tests/fixtures/note_v1/block.json +8 -0
  411. paperful-1.1.0/tests/fixtures/note_v1/keys.json +8 -0
  412. paperful-1.1.0/tests/fixtures/refs_gap_pack_v1/keys.json +8 -0
  413. paperful-1.1.0/tests/fixtures/refs_gap_pack_v1/pack.json +31 -0
  414. paperful-1.1.0/tests/fixtures/run_report_v1/keys.json +64 -0
  415. paperful-1.1.0/tests/fixtures/run_report_v1/minimal.json +41 -0
  416. paperful-1.1.0/tests/fixtures/scihub_captcha.html +97 -0
  417. paperful-1.1.0/tests/fixtures/scihub_found.html +446 -0
  418. paperful-1.1.0/tests/fixtures/scihub_not_found.html +34 -0
  419. paperful-1.1.0/tests/fixtures/scihub_not_in_db.html +223 -0
  420. paperful-1.1.0/tests/fixtures/scihub_turnstile.html +13 -0
  421. paperful-1.1.0/tests/fixtures/springer_chapter_notes.html +14 -0
  422. paperful-1.1.0/tests/ragfakes.py +110 -0
  423. paperful-1.1.0/tests/test_acronyms.py +109 -0
  424. paperful-1.1.0/tests/test_agent_ops_envelopes.py +48 -0
  425. paperful-1.1.0/tests/test_agent_ops_mcp.py +99 -0
  426. paperful-1.1.0/tests/test_attach.py +223 -0
  427. paperful-1.1.0/tests/test_attachments.py +231 -0
  428. paperful-1.1.0/tests/test_author_request.py +146 -0
  429. paperful-1.1.0/tests/test_authors_report.py +248 -0
  430. paperful-1.1.0/tests/test_authorwatch.py +777 -0
  431. paperful-1.1.0/tests/test_bibliography.py +283 -0
  432. paperful-1.1.0/tests/test_book_chapter.py +443 -0
  433. paperful-1.1.0/tests/test_browser_agent.py +860 -0
  434. paperful-1.1.0/tests/test_cache_clean.py +83 -0
  435. paperful-1.1.0/tests/test_camofox.py +352 -0
  436. paperful-1.1.0/tests/test_cli.py +3016 -0
  437. paperful-1.1.0/tests/test_cli_runtime.py +100 -0
  438. paperful-1.1.0/tests/test_cli_runtime_helpers.py +132 -0
  439. paperful-1.1.0/tests/test_cli_smoke_extra.py +106 -0
  440. paperful-1.1.0/tests/test_cmd_modules.py +139 -0
  441. paperful-1.1.0/tests/test_collections_add.py +126 -0
  442. paperful-1.1.0/tests/test_config.py +323 -0
  443. paperful-1.1.0/tests/test_coverage.py +109 -0
  444. paperful-1.1.0/tests/test_coverage_badge.py +33 -0
  445. paperful-1.1.0/tests/test_crossref.py +119 -0
  446. paperful-1.1.0/tests/test_dedupe.py +992 -0
  447. paperful-1.1.0/tests/test_doctor.py +113 -0
  448. paperful-1.1.0/tests/test_download.py +145 -0
  449. paperful-1.1.0/tests/test_e2e_nba.py +277 -0
  450. paperful-1.1.0/tests/test_endnote.py +304 -0
  451. paperful-1.1.0/tests/test_enrich.py +341 -0
  452. paperful-1.1.0/tests/test_ensure_playwright.py +86 -0
  453. paperful-1.1.0/tests/test_export_build.py +136 -0
  454. paperful-1.1.0/tests/test_extracted_cmds.py +599 -0
  455. paperful-1.1.0/tests/test_ezproxy_scholar.py +354 -0
  456. paperful-1.1.0/tests/test_fetch_wins.py +227 -0
  457. paperful-1.1.0/tests/test_grey_probe.py +249 -0
  458. paperful-1.1.0/tests/test_handoff.py +326 -0
  459. paperful-1.1.0/tests/test_htmlpdf.py +178 -0
  460. paperful-1.1.0/tests/test_identity.py +48 -0
  461. paperful-1.1.0/tests/test_inbox.py +1055 -0
  462. paperful-1.1.0/tests/test_inbox_route.py +206 -0
  463. paperful-1.1.0/tests/test_index_jobs_unit.py +66 -0
  464. paperful-1.1.0/tests/test_ingest_dois.py +114 -0
  465. paperful-1.1.0/tests/test_interop.py +134 -0
  466. paperful-1.1.0/tests/test_landing.py +221 -0
  467. paperful-1.1.0/tests/test_library.py +389 -0
  468. paperful-1.1.0/tests/test_lint.py +370 -0
  469. paperful-1.1.0/tests/test_llm.py +553 -0
  470. paperful-1.1.0/tests/test_llm_embed.py +328 -0
  471. paperful-1.1.0/tests/test_llm_verbs.py +889 -0
  472. paperful-1.1.0/tests/test_local_cites.py +131 -0
  473. paperful-1.1.0/tests/test_login_engine.py +68 -0
  474. paperful-1.1.0/tests/test_mendeley.py +434 -0
  475. paperful-1.1.0/tests/test_metadata.py +853 -0
  476. paperful-1.1.0/tests/test_mirror.py +316 -0
  477. paperful-1.1.0/tests/test_mirror_entries.py +121 -0
  478. paperful-1.1.0/tests/test_mirror_first.py +436 -0
  479. paperful-1.1.0/tests/test_miss_surface.py +107 -0
  480. paperful-1.1.0/tests/test_notes.py +153 -0
  481. paperful-1.1.0/tests/test_ocr.py +490 -0
  482. paperful-1.1.0/tests/test_openalex_store.py +319 -0
  483. paperful-1.1.0/tests/test_operator_cmds_behavior.py +205 -0
  484. paperful-1.1.0/tests/test_pack_bib.py +121 -0
  485. paperful-1.1.0/tests/test_pdfid.py +118 -0
  486. paperful-1.1.0/tests/test_pipeline.py +1769 -0
  487. paperful-1.1.0/tests/test_playbooks.py +536 -0
  488. paperful-1.1.0/tests/test_pre_release.py +52 -0
  489. paperful-1.1.0/tests/test_progress.py +112 -0
  490. paperful-1.1.0/tests/test_provenance.py +43 -0
  491. paperful-1.1.0/tests/test_quotes.py +26 -0
  492. paperful-1.1.0/tests/test_rag_auto.py +262 -0
  493. paperful-1.1.0/tests/test_rag_batch.py +258 -0
  494. paperful-1.1.0/tests/test_rag_chunk.py +149 -0
  495. paperful-1.1.0/tests/test_rag_cli.py +399 -0
  496. paperful-1.1.0/tests/test_rag_extract.py +191 -0
  497. paperful-1.1.0/tests/test_rag_index.py +180 -0
  498. paperful-1.1.0/tests/test_rag_ingest.py +325 -0
  499. paperful-1.1.0/tests/test_rag_ledger.py +248 -0
  500. paperful-1.1.0/tests/test_rag_retrieve.py +293 -0
  501. paperful-1.1.0/tests/test_reachout.py +217 -0
  502. paperful-1.1.0/tests/test_refs_gap.py +63 -0
  503. paperful-1.1.0/tests/test_remarks.py +143 -0
  504. paperful-1.1.0/tests/test_resolve.py +296 -0
  505. paperful-1.1.0/tests/test_routing.py +356 -0
  506. paperful-1.1.0/tests/test_rows_6_7_14.py +265 -0
  507. paperful-1.1.0/tests/test_run_config.py +498 -0
  508. paperful-1.1.0/tests/test_run_hooks_unit.py +76 -0
  509. paperful-1.1.0/tests/test_runreport.py +554 -0
  510. paperful-1.1.0/tests/test_schema_freeze.py +165 -0
  511. paperful-1.1.0/tests/test_scholar_tail.py +185 -0
  512. paperful-1.1.0/tests/test_scihub.py +105 -0
  513. paperful-1.1.0/tests/test_scope.py +69 -0
  514. paperful-1.1.0/tests/test_screen.py +147 -0
  515. paperful-1.1.0/tests/test_sections.py +257 -0
  516. paperful-1.1.0/tests/test_serve.py +103 -0
  517. paperful-1.1.0/tests/test_session.py +885 -0
  518. paperful-1.1.0/tests/test_snapshot.py +483 -0
  519. paperful-1.1.0/tests/test_snowball.py +4031 -0
  520. paperful-1.1.0/tests/test_snowball_briefing.py +162 -0
  521. paperful-1.1.0/tests/test_snowball_digest.py +333 -0
  522. paperful-1.1.0/tests/test_snowball_europepmc.py +250 -0
  523. paperful-1.1.0/tests/test_snowball_hops.py +138 -0
  524. paperful-1.1.0/tests/test_snowball_phase7.py +531 -0
  525. paperful-1.1.0/tests/test_snowball_resume.py +197 -0
  526. paperful-1.1.0/tests/test_snowball_trends.py +66 -0
  527. paperful-1.1.0/tests/test_sources.py +817 -0
  528. paperful-1.1.0/tests/test_sphinx_docs.py +148 -0
  529. paperful-1.1.0/tests/test_ste.py +241 -0
  530. paperful-1.1.0/tests/test_store.py +352 -0
  531. paperful-1.1.0/tests/test_sync.py +669 -0
  532. paperful-1.1.0/tests/test_twenty.py +664 -0
  533. paperful-1.1.0/tests/test_ui_ask.py +518 -0
  534. paperful-1.1.0/tests/test_ui_authorwatch.py +254 -0
  535. paperful-1.1.0/tests/test_ui_briefs.py +569 -0
  536. paperful-1.1.0/tests/test_ui_commands.py +136 -0
  537. paperful-1.1.0/tests/test_ui_discover.py +316 -0
  538. paperful-1.1.0/tests/test_ui_grab.py +526 -0
  539. paperful-1.1.0/tests/test_ui_index_jobs.py +503 -0
  540. paperful-1.1.0/tests/test_ui_rag_form.py +85 -0
  541. paperful-1.1.0/tests/test_ui_repair.py +232 -0
  542. paperful-1.1.0/tests/test_ui_repair_mirror_jobs.py +465 -0
  543. paperful-1.1.0/tests/test_ui_routes.py +110 -0
  544. paperful-1.1.0/tests/test_ui_rows.py +370 -0
  545. paperful-1.1.0/tests/test_ui_settings.py +118 -0
  546. paperful-1.1.0/tests/test_ui_shell.py +459 -0
  547. paperful-1.1.0/tests/test_ui_snowball_form.py +39 -0
  548. paperful-1.1.0/tests/test_ui_status_icons.py +16 -0
  549. paperful-1.1.0/tests/test_ui_wanted_jobs.py +193 -0
  550. paperful-1.1.0/tests/test_urls_probe.py +64 -0
  551. paperful-1.1.0/tests/test_versions.py +284 -0
  552. paperful-1.1.0/tests/test_wave2.py +271 -0
  553. paperful-1.1.0/tests/test_witness.py +79 -0
  554. paperful-1.1.0/tests/test_write_through.py +406 -0
  555. paperful-1.1.0/tests/test_zot.py +187 -0
  556. paperful-1.1.0/tests/test_zot_local.py +261 -0
  557. paperful-1.1.0/tests/textutil.py +14 -0
  558. paperful-1.1.0/uv.lock +10297 -0
  559. paperful-1.1.0/website/CNAME +1 -0
  560. paperful-1.1.0/website/README.md +23 -0
  561. paperful-1.1.0/website/chrome/site_chrome.css +127 -0
  562. paperful-1.1.0/website/chrome/site_nav.js +10 -0
  563. paperful-1.1.0/website/cleaning-service.html +140 -0
  564. paperful-1.1.0/website/images/cleaning-service-og.png +0 -0
  565. paperful-1.1.0/website/images/favicon-32.png +0 -0
  566. paperful-1.1.0/website/images/favicon.ico +0 -0
  567. paperful-1.1.0/website/images/logo-dark.png +0 -0
  568. paperful-1.1.0/website/images/logo.png +0 -0
  569. paperful-1.1.0/website/images/og.png +0 -0
  570. paperful-1.1.0/website/images/workbench-discover.png +0 -0
  571. paperful-1.1.0/website/images/workbench-index.png +0 -0
  572. paperful-1.1.0/website/images/workbench-repair.png +0 -0
  573. paperful-1.1.0/website/images/workbench-wanted.png +0 -0
  574. paperful-1.1.0/website/index.html +308 -0
  575. paperful-1.1.0/website/sitemap.xml +18 -0
  576. paperful-1.1.0/website/styles.css +497 -0
@@ -0,0 +1,35 @@
1
+ .git
2
+ .github
3
+ .venv
4
+ .cursor
5
+ .pytest_cache
6
+ .coverage
7
+ htmlcov
8
+ __pycache__
9
+ *.pyc
10
+ *.pyo
11
+ .DS_Store
12
+ .env
13
+ compose.override.yaml
14
+ docker-compose.override.yml
15
+
16
+ # Personal / runtime — never bake into the image
17
+ config.toml
18
+ out/
19
+ state/
20
+ packs/
21
+ /data/
22
+
23
+ # Docs site / build noise
24
+ docs/_build/
25
+ _site/
26
+ website/
27
+ *.md
28
+ !README.md
29
+ tests/
30
+ Makefile
31
+ scripts/
32
+ CONTRIBUTING.md
33
+ CHANGELOG.md
34
+ LICENSE
35
+ .readthedocs.yml
@@ -0,0 +1,49 @@
1
+ # Copy to .env (gitignored). Compose reads this for variable substitution.
2
+ #
3
+ # cp .env.example .env
4
+ # Host PAPERFUL_DATA → /data (config.toml, packs/, state/).
5
+ # Host PAPERFUL_OUT → /data/out (PDF mirror). Separate mounts by default.
6
+ # Zotero Storage is not a Compose volume.
7
+
8
+ # Durable data directory mounted at /data (config.toml, packs/, state/).
9
+ # Preferred (outside the git root):
10
+ PAPERFUL_DATA=../paperful-data
11
+ # Keep your current repo-local config/state without moving files:
12
+ # PAPERFUL_DATA=.
13
+
14
+ # PDF mirror mounted at /data/out (separate from PAPERFUL_DATA).
15
+ PAPERFUL_OUT=../paperful-out
16
+ # Repo-local out/ (only when PAPERFUL_DATA=.):
17
+ # PAPERFUL_OUT=./out
18
+
19
+ # Docker image pack (build arg). Rebuild after changing:
20
+ # docker compose build --no-cache
21
+ # light — core + [serve] (Compose default when unset; CI uses this)
22
+ # heavy — also [llm] [rag] [browser-agent] for a full local env
23
+ PAPERFUL_IMAGE_MODE=heavy
24
+
25
+ # Host where Zotero's local API listens (Docker Desktop → host.docker.internal).
26
+ # On Linux with network_mode: host you can use localhost instead.
27
+ PAPERFUL_ZOTERO_HOST=host.docker.internal
28
+
29
+ # Host Ollama for Compose (same gateway). Outside Docker, Paperful falls back to
30
+ # 127.0.0.1 when this is host.docker.internal. Docker Desktop: default Ollama
31
+ # loopback is enough. Linux Engine: OLLAMA_HOST=0.0.0.0. See docs/llm.md#docker.
32
+ PAPERFUL_OLLAMA_HOST=host.docker.internal
33
+
34
+ # Free key from https://openalex.org/settings/api — never commit the real value.
35
+ # OPENALEX_API_KEY=
36
+
37
+ # Optional. Semantic Scholar works without a key. Request one for heavy use
38
+ # (it arrives by email): https://www.semanticscholar.org/product/api#api-key-form
39
+ # SEMANTIC_SCHOLAR_API_KEY=
40
+
41
+ # Optional. Google Scholar link discovery via SerpApi. Also set [serpapi].enabled
42
+ # and [serpapi].max_calls (default 20; 0 = unlimited). See docs/serpapi.md.
43
+ # SERPAPI_API_KEY=
44
+
45
+ # Optional. Self-hosted or cloud Twenty CRM. Also set [twenty].enabled and
46
+ # [twenty].base_url in config.toml. Used by twenty lookup and reachout --lookup.
47
+ # See docs/config.md.
48
+ # TWENTY_API_KEY=
49
+ # TWENTY_BASE_URL=
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: astral-sh/setup-uv@v5
13
+ - run: uv sync --group dev --extra serve
14
+ - run: uv run pytest -m "not docs" --cov=paperful --cov-report=term-missing --cov-report=json:coverage.json
15
+ - name: Upload coverage report
16
+ if: success()
17
+ uses: actions/upload-artifact@v4
18
+ with:
19
+ name: coverage-json
20
+ path: coverage.json
21
+ if-no-files-found: error
22
+ - name: Workbench API smoke (preview token path)
23
+ run: |
24
+ uv run pytest tests/test_ui_grab.py tests/test_ui_commands.py -q
25
+
26
+ docker:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - name: Build local image
31
+ run: docker compose build
32
+ - name: Compose config
33
+ run: docker compose config >/dev/null
34
+ - name: Smoke help and doctor without Zotero
35
+ # Compose-first claim: this job is the proof, not pytest-only.
36
+ # No live Zotero on the runner → doctor exit 2 (Zotero row red).
37
+ # Must not fail the workflow solely because the API is missing.
38
+ run: |
39
+ data="$(mktemp -d)"
40
+ out="$(mktemp -d)"
41
+ # Image runs as uid 1000; mktemp is 0700 for the runner uid — open the mounts.
42
+ chmod 0777 "$data" "$out"
43
+ cp config.example.toml "$data/config.toml"
44
+ export PAPERFUL_DATA="$data"
45
+ export PAPERFUL_OUT="$out"
46
+ docker compose run --rm -T paperful --help
47
+ set +e
48
+ docker compose run --rm -T paperful doctor --no-guide
49
+ code=$?
50
+ set -e
51
+ test "$code" -eq 2
@@ -0,0 +1,40 @@
1
+ # Refresh badges/coverage.json after a green CI run on main.
2
+ # The commit message skips CI so this cannot loop.
3
+ name: Coverage badge
4
+
5
+ on:
6
+ workflow_run:
7
+ workflows: ["CI"]
8
+ types: [completed]
9
+
10
+ permissions:
11
+ contents: write
12
+ actions: read
13
+
14
+ jobs:
15
+ badge:
16
+ if: >-
17
+ github.event.workflow_run.conclusion == 'success' &&
18
+ github.event.workflow_run.head_branch == 'main' &&
19
+ github.event.workflow_run.event == 'push' &&
20
+ github.repository == 'glen-w/Paperful'
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ ref: main
26
+ - uses: actions/download-artifact@v4
27
+ with:
28
+ name: coverage-json
29
+ github-token: ${{ secrets.GITHUB_TOKEN }}
30
+ run-id: ${{ github.event.workflow_run.id }}
31
+ - name: Write Shields endpoint
32
+ run: python3 scripts/coverage_badge.py coverage.json badges/coverage.json
33
+ - name: Commit badge when the percentage changes
34
+ run: |
35
+ git add badges/coverage.json
36
+ git diff --cached --quiet && exit 0
37
+ git -c user.name="github-actions[bot]" \
38
+ -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
39
+ commit -m "chore: refresh coverage badge [skip ci]"
40
+ git push
@@ -0,0 +1,36 @@
1
+ # Advisory docs build — does not gate merges (see continue-on-error).
2
+ # Merge blockers live in ci.yml (pytest + Docker). Maintainers: DOCS_STRICT=1 make docs locally.
3
+ name: Docs
4
+
5
+ on:
6
+ push:
7
+ branches: [main, master]
8
+ pull_request:
9
+
10
+ concurrency:
11
+ group: docs-${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ docs:
19
+ runs-on: ubuntu-latest
20
+ timeout-minutes: 15
21
+ continue-on-error: true
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: astral-sh/setup-uv@v5
25
+ - run: uv sync --extra docs --group dev
26
+ - name: Guide corpus + Sphinx build (warnings OK)
27
+ run: |
28
+ uv run pytest tests/test_sphinx_docs.py -m docs -q
29
+ make docs
30
+ - name: Upload docs HTML
31
+ if: always()
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: docs-html
35
+ path: docs/_build/html/
36
+ if-no-files-found: warn
@@ -0,0 +1,48 @@
1
+ name: Deploy website + Sphinx docs to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "website/**"
8
+ - "docs/**"
9
+ - "scripts/release/build_docs.sh"
10
+ - "scripts/release/assemble_pages_site.sh"
11
+ - "scripts/release/build_docs.sh"
12
+ - "tests/test_sphinx_docs.py"
13
+ - "pyproject.toml"
14
+ - "Makefile"
15
+ - ".github/workflows/pages.yml"
16
+ - "website/CNAME"
17
+ workflow_dispatch:
18
+
19
+ permissions:
20
+ contents: read
21
+ pages: write
22
+ id-token: write
23
+
24
+ concurrency:
25
+ group: pages
26
+ cancel-in-progress: true
27
+
28
+ jobs:
29
+ deploy:
30
+ environment:
31
+ name: github-pages
32
+ url: ${{ steps.deployment.outputs.page_url }}
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ - uses: astral-sh/setup-uv@v5
37
+ - run: uv sync --extra docs --group dev
38
+ - name: Guide corpus check (advisory)
39
+ continue-on-error: true
40
+ run: uv run pytest tests/test_sphinx_docs.py -m docs -q
41
+ - name: Assemble site (Sphinx warnings do not fail deploy)
42
+ run: bash scripts/release/assemble_pages_site.sh
43
+ - uses: actions/configure-pages@v5
44
+ - uses: actions/upload-pages-artifact@v3
45
+ with:
46
+ path: _site
47
+ - id: deployment
48
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,33 @@
1
+ # Upload release wheels to PyPI (trusted publishing).
2
+ # One-time setup: https://docs.pypi.org/trusted-publishers/
3
+ # Owner: glen-w Repo: Paperful Workflow: publish.yml Environment: pypi
4
+ name: Publish to PyPI
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+ push:
10
+ tags:
11
+ - "v*"
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ id-token: write
16
+
17
+ jobs:
18
+ publish:
19
+ runs-on: ubuntu-latest
20
+ environment: pypi
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: astral-sh/setup-uv@v5
24
+ - name: Pre-release checks
25
+ run: bash scripts/release/pre_release.sh
26
+ - name: Build packages
27
+ run: uv build
28
+ - name: Verify dist artifacts
29
+ run: bash scripts/release/pre_release.sh --dist-only
30
+ - name: Publish to PyPI
31
+ uses: pypa/gh-action-pypi-publish@release/v1
32
+ with:
33
+ skip-existing: true
@@ -0,0 +1,24 @@
1
+ config.toml
2
+ .venv/
3
+ out/
4
+ state/
5
+ packs/
6
+ # repo-root scratch (tool state, one-off exports). Not paperful/data/.
7
+ /data/
8
+ docs/_build/
9
+ _site/
10
+ __pycache__/
11
+ *.pyc
12
+ .pytest_cache/
13
+ .coverage
14
+ htmlcov/
15
+ /coverage.json
16
+ dist/
17
+ .DS_Store
18
+ .cursor/commands/
19
+ *cookies*.txt
20
+ ezproxy-cookies.txt
21
+ .env
22
+ compose.override.yaml
23
+ docker-compose.override.yml
24
+ assessments/
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,19 @@
1
+ # Optional RTD mirror; production guide ships on GitHub Pages (paperful.app/guide/).
2
+
3
+ version: 2
4
+
5
+ build:
6
+ os: ubuntu-22.04
7
+ tools:
8
+ python: "3.11"
9
+
10
+ sphinx:
11
+ configuration: docs/conf.py
12
+ fail_on_warning: true
13
+
14
+ python:
15
+ install:
16
+ - method: pip
17
+ path: .
18
+ extra_requirements:
19
+ - docs