phd-deepread-workflow 0.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.
- phd_deepread_workflow-0.1.0/.gitignore +167 -0
- phd_deepread_workflow-0.1.0/.pre-commit-config.yaml +58 -0
- phd_deepread_workflow-0.1.0/LICENSE +21 -0
- phd_deepread_workflow-0.1.0/MANIFEST.in +15 -0
- phd_deepread_workflow-0.1.0/Makefile +94 -0
- phd_deepread_workflow-0.1.0/PKG-INFO +475 -0
- phd_deepread_workflow-0.1.0/README.md +439 -0
- phd_deepread_workflow-0.1.0/config/config.yaml +89 -0
- phd_deepread_workflow-0.1.0/docs/decision-tree.md +184 -0
- phd_deepread_workflow-0.1.0/docs/index.md +56 -0
- phd_deepread_workflow-0.1.0/docs/workflow-guide.md +225 -0
- phd_deepread_workflow-0.1.0/examples/example-canvas.canvas +166 -0
- phd_deepread_workflow-0.1.0/examples/example-output.md +130 -0
- phd_deepread_workflow-0.1.0/install.sh +93 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/PKG-INFO +475 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/SOURCES.txt +43 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/dependency_links.txt +1 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/entry_points.txt +2 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/requires.txt +14 -0
- phd_deepread_workflow-0.1.0/phd_deepread_workflow.egg-info/top_level.txt +1 -0
- phd_deepread_workflow-0.1.0/pyproject.toml +83 -0
- phd_deepread_workflow-0.1.0/requirements-dev.txt +31 -0
- phd_deepread_workflow-0.1.0/requirements.txt +9 -0
- phd_deepread_workflow-0.1.0/scripts/__init__.py +32 -0
- phd_deepread_workflow-0.1.0/scripts/batch.sh +284 -0
- phd_deepread_workflow-0.1.0/scripts/canvas.py +235 -0
- phd_deepread_workflow-0.1.0/scripts/extract.py +537 -0
- phd_deepread_workflow-0.1.0/scripts/generate.py +262 -0
- phd_deepread_workflow-0.1.0/scripts/phd_deepread.py +121 -0
- phd_deepread_workflow-0.1.0/scripts/setup.sh +173 -0
- phd_deepread_workflow-0.1.0/scripts/verify.py +262 -0
- phd_deepread_workflow-0.1.0/setup.cfg +4 -0
- phd_deepread_workflow-0.1.0/templates/.clauderules +179 -0
- phd_deepread_workflow-0.1.0/templates/critical-thinking.canvas +166 -0
- phd_deepread_workflow-0.1.0/tests/conftest.py +273 -0
- phd_deepread_workflow-0.1.0/tests/test_canvas.py +206 -0
- phd_deepread_workflow-0.1.0/tests/test_extract.py +150 -0
- phd_deepread_workflow-0.1.0/tests/test_generate.py +191 -0
- phd_deepread_workflow-0.1.0/tests/test_verify.py +278 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
.pybuilder/
|
|
74
|
+
target/
|
|
75
|
+
|
|
76
|
+
# Jupyter Notebook
|
|
77
|
+
.ipynb_checkpoints
|
|
78
|
+
|
|
79
|
+
# IPython
|
|
80
|
+
profile_default/
|
|
81
|
+
ipython_config.py
|
|
82
|
+
|
|
83
|
+
# pyenv
|
|
84
|
+
.python-version
|
|
85
|
+
|
|
86
|
+
# pipenv
|
|
87
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
88
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
89
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
90
|
+
# install all needed dependencies.
|
|
91
|
+
#Pipfile.lock
|
|
92
|
+
|
|
93
|
+
# poetry
|
|
94
|
+
#poetry.lock
|
|
95
|
+
|
|
96
|
+
# pdm
|
|
97
|
+
.pdm.toml
|
|
98
|
+
|
|
99
|
+
# PEP 582; used by e.g. github.com/pdm-project/pdm
|
|
100
|
+
__pypackages__/
|
|
101
|
+
|
|
102
|
+
# Celery stuff
|
|
103
|
+
celerybeat-schedule
|
|
104
|
+
celerybeat.pid
|
|
105
|
+
|
|
106
|
+
# SageMath parsed files
|
|
107
|
+
*.sage.py
|
|
108
|
+
|
|
109
|
+
# Environments
|
|
110
|
+
.env
|
|
111
|
+
.venv
|
|
112
|
+
env/
|
|
113
|
+
venv/
|
|
114
|
+
ENV/
|
|
115
|
+
env.bak/
|
|
116
|
+
venv.bak/
|
|
117
|
+
|
|
118
|
+
# Spyder project settings
|
|
119
|
+
.spyderproject
|
|
120
|
+
.spyproject
|
|
121
|
+
|
|
122
|
+
# Rope project settings
|
|
123
|
+
.ropeproject
|
|
124
|
+
|
|
125
|
+
# mkdocs documentation
|
|
126
|
+
/site
|
|
127
|
+
|
|
128
|
+
# mypy
|
|
129
|
+
.mypy_cache/
|
|
130
|
+
.dmypy.json
|
|
131
|
+
dmypy.json
|
|
132
|
+
|
|
133
|
+
# Pyre type checker
|
|
134
|
+
.pyre/
|
|
135
|
+
|
|
136
|
+
# pytype static type analyzer
|
|
137
|
+
.pytype/
|
|
138
|
+
|
|
139
|
+
# Cython debug symbols
|
|
140
|
+
cython_debug/
|
|
141
|
+
|
|
142
|
+
# PhD Deep Read specific
|
|
143
|
+
markdown_output/
|
|
144
|
+
structured_literature_notes/
|
|
145
|
+
generation_prompts/
|
|
146
|
+
canvas_templates/
|
|
147
|
+
logs/
|
|
148
|
+
batch_test_output/
|
|
149
|
+
test_output*
|
|
150
|
+
*.pdf
|
|
151
|
+
!examples/test_paper.pdf
|
|
152
|
+
|
|
153
|
+
# OS generated files
|
|
154
|
+
.DS_Store
|
|
155
|
+
.DS_Store?
|
|
156
|
+
._*
|
|
157
|
+
.Spotlight-V100
|
|
158
|
+
.Trashes
|
|
159
|
+
ehthumbs.db
|
|
160
|
+
Thumbs.db
|
|
161
|
+
|
|
162
|
+
# Editor directories and files
|
|
163
|
+
.vscode/
|
|
164
|
+
.idea/
|
|
165
|
+
*.swp
|
|
166
|
+
*.swo
|
|
167
|
+
*~
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
args: ['--maxkb=5000']
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: check-toml
|
|
12
|
+
- id: check-json
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/psf/black
|
|
15
|
+
rev: 23.12.1
|
|
16
|
+
hooks:
|
|
17
|
+
- id: black
|
|
18
|
+
args: [--line-length=88]
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/pycqa/isort
|
|
21
|
+
rev: 5.13.2
|
|
22
|
+
hooks:
|
|
23
|
+
- id: isort
|
|
24
|
+
args: ["--profile", "black"]
|
|
25
|
+
|
|
26
|
+
- repo: https://github.com/pycqa/flake8
|
|
27
|
+
rev: 7.0.0
|
|
28
|
+
hooks:
|
|
29
|
+
- id: flake8
|
|
30
|
+
args: [--max-line-length=88, --extend-ignore=E203,W503]
|
|
31
|
+
additional_dependencies: [flake8-pyproject]
|
|
32
|
+
|
|
33
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
34
|
+
rev: v1.8.0
|
|
35
|
+
hooks:
|
|
36
|
+
- id: mypy
|
|
37
|
+
additional_dependencies: [types-PyYAML, types-Pillow]
|
|
38
|
+
args: [--strict, --ignore-missing-imports]
|
|
39
|
+
|
|
40
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
41
|
+
rev: v3.0.3
|
|
42
|
+
hooks:
|
|
43
|
+
- id: prettier
|
|
44
|
+
types_or: [markdown, yaml, json]
|
|
45
|
+
exclude: ^(templates/|examples/) # Don't format templates
|
|
46
|
+
|
|
47
|
+
- repo: https://github.com/codespell-project/codespell
|
|
48
|
+
rev: v2.2.6
|
|
49
|
+
hooks:
|
|
50
|
+
- id: codespell
|
|
51
|
+
args: [--skip=*.pdf,*.png,*.jpg,*.jpeg,*.gif,*.svg,*.ico]
|
|
52
|
+
exclude_types: [binary]
|
|
53
|
+
|
|
54
|
+
ci:
|
|
55
|
+
autofix_commit_msg: 🎨 style: pre-commit fixes
|
|
56
|
+
autofix_prs: true
|
|
57
|
+
skip: []
|
|
58
|
+
submodules: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Helen Insights
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include requirements.txt
|
|
4
|
+
include requirements-dev.txt
|
|
5
|
+
include install.sh
|
|
6
|
+
include Makefile
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
include .gitignore
|
|
9
|
+
include .pre-commit-config.yaml
|
|
10
|
+
include config/*.yaml
|
|
11
|
+
include templates/*
|
|
12
|
+
include docs/*.md
|
|
13
|
+
include examples/*
|
|
14
|
+
recursive-include scripts *.py *.sh
|
|
15
|
+
recursive-include tests *.py
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# PhD Deep Read Workflow Makefile
|
|
2
|
+
|
|
3
|
+
.PHONY: help install install-dev test test-cov lint format type-check clean setup
|
|
4
|
+
|
|
5
|
+
# Default target
|
|
6
|
+
help:
|
|
7
|
+
@echo "PhD Deep Read Workflow - Available targets:"
|
|
8
|
+
@echo ""
|
|
9
|
+
@echo " install - Install core dependencies"
|
|
10
|
+
@echo " install-dev - Install development dependencies"
|
|
11
|
+
@echo " test - Run tests"
|
|
12
|
+
@echo " test-cov - Run tests with coverage report"
|
|
13
|
+
@echo " lint - Run linters (flake8)"
|
|
14
|
+
@echo " format - Format code (black, isort)"
|
|
15
|
+
@echo " type-check - Run type checking (mypy)"
|
|
16
|
+
@echo " check - Run all checks (lint, format, type-check, test)"
|
|
17
|
+
@echo " clean - Clean build artifacts and caches"
|
|
18
|
+
@echo " setup - Full setup (install, install-dev, format)"
|
|
19
|
+
@echo ""
|
|
20
|
+
|
|
21
|
+
# Installation
|
|
22
|
+
install:
|
|
23
|
+
pip install -r requirements.txt
|
|
24
|
+
|
|
25
|
+
install-dev:
|
|
26
|
+
pip install -r requirements-dev.txt
|
|
27
|
+
|
|
28
|
+
# Testing
|
|
29
|
+
test:
|
|
30
|
+
pytest tests/ -v
|
|
31
|
+
|
|
32
|
+
test-cov:
|
|
33
|
+
pytest tests/ --cov=scripts --cov-report=html --cov-report=term
|
|
34
|
+
|
|
35
|
+
# Code quality
|
|
36
|
+
lint:
|
|
37
|
+
flake8 scripts/ tests/ --max-line-length=88 --extend-ignore=E203,W503
|
|
38
|
+
|
|
39
|
+
format:
|
|
40
|
+
black scripts/ tests/
|
|
41
|
+
isort scripts/ tests/
|
|
42
|
+
|
|
43
|
+
type-check:
|
|
44
|
+
mypy scripts/
|
|
45
|
+
|
|
46
|
+
check: lint format type-check test
|
|
47
|
+
|
|
48
|
+
# Setup
|
|
49
|
+
setup: install install-dev format
|
|
50
|
+
@echo "✅ Setup complete! Next steps:"
|
|
51
|
+
@echo " 1. Install Tesseract OCR: brew install tesseract (macOS) or sudo apt install tesseract-ocr (Linux)"
|
|
52
|
+
@echo " 2. Test the workflow: python scripts/extract.py --help"
|
|
53
|
+
|
|
54
|
+
# Cleanup
|
|
55
|
+
clean:
|
|
56
|
+
rm -rf .pytest_cache/ .mypy_cache/ .coverage htmlcov/ build/ dist/ *.egg-info/
|
|
57
|
+
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
58
|
+
find . -type f -name "*.pyc" -delete
|
|
59
|
+
|
|
60
|
+
# Development shortcuts
|
|
61
|
+
dev: install-dev
|
|
62
|
+
@echo "Development dependencies installed"
|
|
63
|
+
|
|
64
|
+
run-test:
|
|
65
|
+
python -m pytest tests/test_extract.py -v
|
|
66
|
+
|
|
67
|
+
run-extract:
|
|
68
|
+
python scripts/extract.py --help
|
|
69
|
+
|
|
70
|
+
run-generate:
|
|
71
|
+
python scripts/generate.py --help
|
|
72
|
+
|
|
73
|
+
run-canvas:
|
|
74
|
+
python scripts/canvas.py --help
|
|
75
|
+
|
|
76
|
+
run-verify:
|
|
77
|
+
python scripts/verify.py --help
|
|
78
|
+
|
|
79
|
+
# Documentation
|
|
80
|
+
docs-serve:
|
|
81
|
+
mkdocs serve
|
|
82
|
+
|
|
83
|
+
docs-build:
|
|
84
|
+
mkdocs build
|
|
85
|
+
|
|
86
|
+
# Package building
|
|
87
|
+
build:
|
|
88
|
+
python -m build
|
|
89
|
+
|
|
90
|
+
publish-test:
|
|
91
|
+
twine upload --repository testpypi dist/*
|
|
92
|
+
|
|
93
|
+
publish:
|
|
94
|
+
twine upload dist/*
|