Skip to content

Commit 849ad54

Browse files
feat: initial public release v0.1.0
0 parents  commit 849ad54

58 files changed

Lines changed: 19584 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Python
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
*.egg-info/
7+
dist/
8+
build/
9+
10+
# Citation Guard (installed from GitHub, not copied)
11+
citation-guard/
12+
13+
# Virtual environments (including nested ones like citation-guard/.venv)
14+
.venv/
15+
*/.venv/
16+
**/.venv/
17+
18+
# Environment / secrets
19+
.env
20+
21+
# Git
22+
.git/
23+
.github/
24+
25+
# Caches
26+
.cache/
27+
.mypy_cache/
28+
.pytest_cache/
29+
.ruff_cache/
30+
31+
# Test documents (not needed at runtime)
32+
test documents/
33+
34+
# Runtime data (mounted as volumes, not baked into image)
35+
uploads/
36+
models/
37+
chroma_data/
38+
mongo_data/
39+
documents/
40+
41+
# Logs
42+
*.log
43+
44+
# Tesseract data
45+
tessdata/
46+
47+
# Misc
48+
*.egg
49+
*.tar.gz
50+
output*/
51+
.gemini/

.env.example

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ============================================================
2+
# LongParser Environment Configuration
3+
# Copy this file to .env and fill in your values.
4+
# NEVER commit .env to version control.
5+
# ============================================================
6+
7+
# ── Database ─────────────────────────────────────────────────
8+
LONGPARSER_MONGO_URL=mongodb://localhost:27017
9+
LONGPARSER_DB_NAME=longparser
10+
11+
# ── Job Queue (Redis / ARQ) ───────────────────────────────────
12+
LONGPARSER_REDIS_URL=redis://localhost:6379
13+
14+
# ── File Storage ──────────────────────────────────────────────
15+
LONGPARSER_UPLOAD_DIR=./uploads
16+
17+
# ── LLM Provider ─────────────────────────────────────────────
18+
# One of: openai | gemini | groq | openrouter
19+
LONGPARSER_LLM_PROVIDER=openai
20+
LONGPARSER_LLM_MODEL=gpt-4o
21+
22+
# ── API Keys ──────────────────────────────────────────────────
23+
OPENAI_API_KEY=sk-...
24+
GOOGLE_API_KEY= # Required for gemini provider
25+
GROQ_API_KEY= # Required for groq provider
26+
OPENROUTER_API_KEY= # Required for openrouter provider
27+
28+
# ── Embedding ─────────────────────────────────────────────────
29+
# Provider: huggingface | openai
30+
LONGPARSER_EMBED_PROVIDER=huggingface
31+
LONGPARSER_EMBED_MODEL=BAAI/bge-base-en-v1.5
32+
33+
# ── Vector Store ──────────────────────────────────────────────
34+
# One of: chroma | faiss | qdrant
35+
LONGPARSER_VECTOR_DB=chroma
36+
QDRANT_URL=http://localhost:6333 # Required only for qdrant
37+
QDRANT_API_KEY= # Required only for Qdrant Cloud
38+
39+
# ── OCR & Extraction ─────────────────────────────────────────
40+
# OCR backend: easyocr | tesseract | rapidocr
41+
LONGPARSER_OCR_BACKEND=easyocr
42+
LONGPARSER_OCR_USE_GPU=false
43+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior in LongParser
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to report a bug. Please fill out the sections below.
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: A clear description of what the bug is.
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: reproduce
20+
attributes:
21+
label: Steps to Reproduce
22+
description: Minimal code to reproduce the issue.
23+
placeholder: |
24+
```python
25+
from longparser import PipelineOrchestrator
26+
pipeline = PipelineOrchestrator()
27+
result = pipeline.process_file("document.pdf")
28+
# ...
29+
```
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: Expected Behavior
37+
description: What did you expect to happen?
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual Behavior
45+
description: What actually happened? Include the full traceback if applicable.
46+
validations:
47+
required: true
48+
49+
- type: input
50+
id: version
51+
attributes:
52+
label: LongParser Version
53+
placeholder: "e.g. 0.1.0"
54+
validations:
55+
required: true
56+
57+
- type: input
58+
id: python
59+
attributes:
60+
label: Python Version
61+
placeholder: "e.g. 3.11"
62+
validations:
63+
required: true
64+
65+
- type: dropdown
66+
id: os
67+
attributes:
68+
label: Operating System
69+
options:
70+
- Linux
71+
- macOS
72+
- Windows
73+
validations:
74+
required: true
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement for LongParser
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for suggesting an improvement to LongParser.
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem / Motivation
14+
description: What problem does this feature solve? What's the use case?
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Proposed Solution
22+
description: Describe the feature you'd like to see.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: alternatives
28+
attributes:
29+
label: Alternatives Considered
30+
description: Any alternative approaches you've considered?
31+
32+
- type: dropdown
33+
id: priority
34+
attributes:
35+
label: Priority
36+
options:
37+
- Nice to have
38+
- Important
39+
- Critical / blocking my use case
40+
validations:
41+
required: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Integration Request
2+
description: Request support for a new framework, vector store, or LLM backend
3+
labels: ["enhancement", "integration"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Request a new framework adapter (Haystack, CrewAI, etc.), vector store backend, or LLM provider for LongParser.
9+
10+
- type: input
11+
id: framework
12+
attributes:
13+
label: Framework / Library Name
14+
placeholder: "e.g. Haystack, CrewAI, AutoGen, Weaviate"
15+
validations:
16+
required: true
17+
18+
- type: input
19+
id: version
20+
attributes:
21+
label: Framework Version
22+
placeholder: "e.g. 2.0"
23+
24+
- type: textarea
25+
id: usecase
26+
attributes:
27+
label: Use Case
28+
description: How would you use LongParser with this framework or backend?
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: docs
34+
attributes:
35+
label: Relevant Documentation
36+
description: Links to the framework's API or callback/event system docs.

.github/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- dependabot
7+
categories:
8+
- title: "🚀 New Features"
9+
labels:
10+
- feature
11+
- enhancement
12+
- title: "🐛 Bug Fixes"
13+
labels:
14+
- bug
15+
- fix
16+
- title: "📚 Documentation"
17+
labels:
18+
- documentation
19+
- docs
20+
- title: "⚡ Performance"
21+
labels:
22+
- performance
23+
- optimization
24+
- title: "🔧 Maintenance"
25+
labels:
26+
- chore
27+
- ci
28+
- refactor
29+
- title: "🔒 Security"
30+
labels:
31+
- security

.github/workflows/auto-tag.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Auto Tag on Merge
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
tag:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Read version from pyproject.toml
19+
id: version
20+
run: |
21+
VERSION=$(python3 -c "
22+
import tomllib
23+
with open('pyproject.toml', 'rb') as f:
24+
data = tomllib.load(f)
25+
print(data['project']['version'])
26+
")
27+
echo "version=v$VERSION" >> "$GITHUB_OUTPUT"
28+
29+
- name: Check if tag already exists
30+
id: check_tag
31+
run: |
32+
if git rev-parse "${{ steps.version.outputs.version }}" > /dev/null 2>&1; then
33+
echo "exists=true" >> "$GITHUB_OUTPUT"
34+
else
35+
echo "exists=false" >> "$GITHUB_OUTPUT"
36+
fi
37+
38+
- name: Create and push tag
39+
if: steps.check_tag.outputs.exists == 'false'
40+
run: |
41+
git config user.name "github-actions[bot]"
42+
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
git tag "${{ steps.version.outputs.version }}"
44+
git push origin "${{ steps.version.outputs.version }}"
45+
46+
- name: Extract changelog for this version
47+
if: steps.check_tag.outputs.exists == 'false'
48+
id: changelog
49+
run: |
50+
VERSION="${{ steps.version.outputs.version }}"
51+
NOTES=$(python3 -c "
52+
import re, sys
53+
version = sys.argv[1].lstrip('v')
54+
with open('CHANGELOG.md') as f:
55+
content = f.read()
56+
pattern = rf'## \[{re.escape(version)}\].*?\n(.*?)(?=\n## \[|\Z)'
57+
match = re.search(pattern, content, re.DOTALL)
58+
print(match.group(1).strip() if match else '')
59+
" "$VERSION")
60+
echo "$NOTES" > /tmp/release_notes.md
61+
62+
- name: Create GitHub Release
63+
if: steps.check_tag.outputs.exists == 'false'
64+
env:
65+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
run: |
67+
gh release create "${{ steps.version.outputs.version }}" \
68+
--title "${{ steps.version.outputs.version }}" \
69+
--notes-file /tmp/release_notes.md

0 commit comments

Comments
 (0)