diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml new file mode 100644 index 000000000..90a9fac19 --- /dev/null +++ b/.github/workflows/dependency-check.yml @@ -0,0 +1,53 @@ +name: Dependency Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + dependency-check: + name: Dependency Vulnerability Check + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Run Dependency Review + uses: actions/dependency-review-action@v4 + with: + fail-on-severity: low + allow-licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC + + dependency-graph: + name: Dependency Graph Validation + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Generate dependency summary + run: | + echo "## Dependency Summary" >> $GITHUB_STEP_SUMMARY + echo "Checking dependency files..." >> $GITHUB_STEP_SUMMARY + + if [ -f "package.json" ]; then + echo "### npm dependencies" >> $GITHUB_STEP_SUMMARY + npm list --depth=0 --json 2>/dev/null | jq -r '.dependencies | to_entries[] | "- \(.key)@\(.value.version)"' >> $GITHUB_STEP_SUMMARY || echo "No npm dependencies" >> $GITHUB_STEP_SUMMARY + fi + + if [ -f "requirements.txt" ]; then + echo "### Python dependencies" >> $GITHUB_STEP_SUMMARY + cat requirements.txt >> $GITHUB_STEP_SUMMARY + fi + + if [ -f "pyproject.toml" ]; then + echo "### Python project dependencies" >> $GITHUB_STEP_SUMMARY + grep -A 50 '\[tool.poetry.dependencies\]' pyproject.toml 2>/dev/null || echo "No poetry dependencies" >> $GITHUB_STEP_SUMMARY + fi \ No newline at end of file diff --git a/README.md b/README.md index ddc80314e..c9d30a857 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,57 @@ To address this, we introduced PageIndex OCR — the first long-context OCR mode --- +# 🛠️ Development Guide + +Contributions are welcome! To set up a local development environment: + +### 1. Clone the repository + +```bash +git clone https://github.com/VectifyAI/PageIndex.git +cd PageIndex +``` + +### 2. Create a feature branch + +```bash +git checkout -b docs/add-development-guide +``` + +### 3. Install dependencies + +```bash +pip3 install --upgrade -r requirements.txt +``` + +### 4. Set up environment variables + +Create a `.env` file in the root directory: + +```bash +OPENAI_API_KEY=your_openai_key_here +``` + +### 5. Run tests (if available) + +```bash +pytest tests/ +``` + +### 6. Make your changes and commit + +```bash +git add . +git commit -m "your descriptive commit message" +git push origin docs/add-development-guide +``` + +### 7. Open a pull request + +Submit a PR against the `main` branch of `VectifyAI/PageIndex`. + +--- + # 📈 Case Study: PageIndex Leads Finance QA Benchmark [Mafin 2.5](https://vectify.ai/mafin) is a reasoning-based RAG system for financial document analysis, powered by **PageIndex**. It achieved a state-of-the-art [**98.7% accuracy**](https://vectify.ai/blog/Mafin2.5) on the [FinanceBench](https://arxiv.org/abs/2311.11944) benchmark, significantly outperforming traditional vector-based RAG systems.