Skip to content

Commit 067f711

Browse files
Project Setup with Codespace
1 parent 5f3bd10 commit 067f711

14 files changed

Lines changed: 1495 additions & 10 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "docprocessor Library Development",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11",
4+
5+
"features": {
6+
"ghcr.io/devcontainers/features/python:1": {
7+
"version": "3.11"
8+
}
9+
},
10+
11+
"postCreateCommand": "chmod +x .devcontainer/setup.sh && .devcontainer/setup.sh",
12+
13+
"containerEnv": {
14+
"PYTHONPATH": "${containerWorkspaceFolder}"
15+
},
16+
17+
"customizations": {
18+
"vscode": {
19+
"extensions": [
20+
"ms-python.python",
21+
"ms-python.black-formatter",
22+
"ms-python.isort",
23+
"ms-python.flake8",
24+
"eamodio.gitlens",
25+
"mhutchie.git-graph",
26+
"davidanson.vscode-markdownlint",
27+
"redhat.vscode-yaml"
28+
],
29+
30+
"settings": {
31+
// Python interpreter
32+
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python",
33+
34+
// Type checking
35+
"python.analysis.typeCheckingMode": "basic",
36+
37+
// Testing setup
38+
"python.testing.pytestEnabled": true,
39+
"python.testing.unittestEnabled": false,
40+
"python.testing.pytestArgs": ["tests"],
41+
"python.testing.cwd": "${containerWorkspaceFolder}",
42+
43+
// Code formatting on save
44+
"editor.formatOnSave": true,
45+
"editor.codeActionsOnSave": {
46+
"source.organizeImports": "always"
47+
},
48+
49+
"[python]": {
50+
"editor.defaultFormatter": "ms-python.black-formatter",
51+
"editor.formatOnSave": true
52+
},
53+
54+
// Black formatter
55+
"black-formatter.args": ["--line-length", "100"],
56+
57+
// isort
58+
"isort.args": ["--profile", "black", "--line-length", "100"],
59+
60+
// flake8
61+
"flake8.args": [
62+
"--max-line-length=100",
63+
"--extend-ignore=E203,W503"
64+
]
65+
}
66+
}
67+
},
68+
69+
"remoteEnv": {
70+
"PYTHONPATH": "${containerWorkspaceFolder}"
71+
}
72+
}

.devcontainer/setup.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "🚀 Setting up docprocessor development environment..."
5+
6+
# Update package lists
7+
echo "📦 Updating package lists..."
8+
sudo apt-get update
9+
10+
# Install system dependencies for document processing
11+
echo "🔧 Installing system dependencies..."
12+
sudo apt-get install -y \
13+
tesseract-ocr \
14+
tesseract-ocr-eng \
15+
poppler-utils \
16+
libgl1-mesa-glx \
17+
libglib2.0-0
18+
19+
# Upgrade pip
20+
echo "⬆️ Upgrading pip..."
21+
python -m pip install --upgrade pip
22+
23+
# Install package in editable mode with dev dependencies
24+
echo "📚 Installing docprocessor with dev dependencies..."
25+
pip install -e ".[dev]"
26+
27+
# Install pre-commit hooks
28+
echo "🪝 Installing pre-commit hooks..."
29+
if [ -f ".pre-commit-config.yaml" ]; then
30+
pip install pre-commit
31+
pre-commit install
32+
echo "✅ Pre-commit hooks installed"
33+
else
34+
echo "⚠️ No .pre-commit-config.yaml found, skipping pre-commit setup"
35+
fi
36+
37+
# Run tests to verify setup
38+
echo "🧪 Running tests to verify setup..."
39+
if pytest --version > /dev/null 2>&1; then
40+
pytest tests/ -v || echo "⚠️ Some tests failed, but setup is complete"
41+
else
42+
echo "⚠️ pytest not found, skipping test verification"
43+
fi
44+
45+
echo ""
46+
echo "✅ Setup complete!"
47+
echo ""
48+
echo "Next steps:"
49+
echo " • Run tests: pytest"
50+
echo " • Run tests with coverage: pytest --cov=docprocessor"
51+
echo " • Format code: black docprocessor tests"
52+
echo " • Sort imports: isort docprocessor tests"
53+
echo " • Type check: mypy docprocessor"
54+
echo ""
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
<!-- A clear and concise description of what the bug is -->
12+
13+
## To Reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1.
18+
2.
19+
3.
20+
21+
**Minimal Code Example:**
22+
23+
```python
24+
from docprocessor import DocumentProcessor
25+
26+
# Your code here
27+
```
28+
29+
## Expected Behavior
30+
31+
<!-- A clear and concise description of what you expected to happen -->
32+
33+
## Actual Behavior
34+
35+
<!-- What actually happened -->
36+
37+
## Error Message
38+
39+
```
40+
Paste the full error message and stack trace here
41+
```
42+
43+
## Environment
44+
45+
- **OS**: [e.g., Ubuntu 22.04, macOS 14, Windows 11]
46+
- **Python Version**: [e.g., 3.11.5]
47+
- **docprocessor Version**: [e.g., 1.0.0]
48+
- **Installation Method**: [pip, git, other]
49+
50+
**System Dependencies:**
51+
- Tesseract version: [run `tesseract --version`]
52+
- Poppler version: [run `pdfinfo -v`]
53+
54+
## Additional Context
55+
56+
<!-- Add any other context about the problem here -->
57+
58+
<!-- Include relevant files, screenshots, or logs if applicable -->
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
<!-- A clear and concise description of the feature you'd like to see -->
12+
13+
## Use Case
14+
15+
<!-- Describe the problem this feature would solve -->
16+
17+
**Is your feature request related to a problem?**
18+
19+
<!-- e.g., I'm always frustrated when... -->
20+
21+
## Proposed Solution
22+
23+
<!-- Describe the solution you'd like -->
24+
25+
**API Design (if applicable):**
26+
27+
```python
28+
# Example of how you envision using this feature
29+
from docprocessor import DocumentProcessor
30+
31+
processor = DocumentProcessor()
32+
result = processor.your_new_feature(...)
33+
```
34+
35+
## Alternatives Considered
36+
37+
<!-- Describe alternative solutions or features you've considered -->
38+
39+
## Additional Context
40+
41+
<!-- Add any other context, screenshots, or examples about the feature request here -->
42+
43+
## Implementation Willingness
44+
45+
<!-- Would you be willing to contribute the implementation? -->
46+
47+
- [ ] I'm willing to implement this feature
48+
- [ ] I can help with testing
49+
- [ ] I need help implementing this

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Description
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## Type of Change
6+
7+
<!-- Mark the relevant option with an 'x' -->
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Code quality improvement (refactoring, type hints, tests)
14+
- [ ] Performance improvement
15+
- [ ] Dependency update
16+
17+
## Related Issues
18+
19+
<!-- Link related issues here using #issue_number -->
20+
21+
Fixes #
22+
Relates to #
23+
24+
## Changes Made
25+
26+
<!-- Provide a detailed list of changes -->
27+
28+
-
29+
-
30+
-
31+
32+
## Testing
33+
34+
<!-- Describe the tests you ran and how to reproduce them -->
35+
36+
- [ ] All existing tests pass
37+
- [ ] Added new tests for changes
38+
- [ ] Manual testing performed
39+
40+
### Test Coverage
41+
42+
```bash
43+
# Include test coverage output
44+
pytest --cov=docprocessor
45+
```
46+
47+
## Checklist
48+
49+
<!-- Mark completed items with an 'x' -->
50+
51+
- [ ] My code follows the code style of this project (Black, isort, flake8)
52+
- [ ] I have performed a self-review of my own code
53+
- [ ] I have commented my code, particularly in hard-to-understand areas
54+
- [ ] I have made corresponding changes to the documentation
55+
- [ ] My changes generate no new warnings
56+
- [ ] I have added tests that prove my fix is effective or that my feature works
57+
- [ ] New and existing unit tests pass locally with my changes
58+
- [ ] Any dependent changes have been merged and published
59+
- [ ] I have updated the CHANGELOG.md
60+
61+
## Screenshots (if applicable)
62+
63+
<!-- Add screenshots to help explain your changes -->
64+
65+
## Additional Context
66+
67+
<!-- Add any other context about the PR here -->

0 commit comments

Comments
 (0)