Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/publish-extract-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish extra-core

on:
workflow_dispatch:
push:
tags:
- 'extract-python-*'

jobs:
create-release:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.12
ASTRAL_VERSION: 0.11.6
steps:
- uses: actions/checkout@v6
- name: Create GH release
run: gh release create "$tag" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}

publish-extra-python-to-pypi:
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/extract-python
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.10.8"
- name: Install Python 3.12
run: uv python install 3.12
- name: Build
run: cd extract-core && uv build
- name: Publish
run: cd extract-core && publish

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- '*'
- 'extract-python-*'

jobs:
create-release:
Expand Down Expand Up @@ -36,9 +36,9 @@ jobs:
- name: Install Python 3.12
run: uv python install 3.12
- name: Build
run: uv build
run: cd extract-python && uv build
- name: Publish
run: uv publish
run: cd extract-python && publish

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/tests-extract-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tests extract-core

on:
push:
branches: [ 'main' ]
pull_request:
paths:
- 'extract-core/**'

jobs:
lint-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
with:
args: "--version" # skips test by displaying the version
- name: Check formatting
run: ruff format --config qa/ruff.toml --check extract-core
- name: Lint test
run: ruff check --config qa/ruff.toml extract-core

tests-core:
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.12
ASTRAL_VERSION: 0.11.6
steps:
- uses: actions/checkout@v6
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: extract-core
- name: Run tests
run: |
cd extract-core
uv sync --verbose --frozen --dev --all-extras
uv run --frozen python -m pytest -vvv --cache-clear --show-capture=all -r A tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [ 'main' ]
pull_request:
paths:
- 'extract-core/**'
- 'extract-python/**'

jobs:
lint:
Expand All @@ -14,9 +17,9 @@ jobs:
with:
args: "--version" # skips test by displaying the version
- name: Check formatting
run: ruff format --config qa/ruff.toml --check extract_python tests
run: ruff format --config qa/ruff.toml --check extract-python
- name: Lint test
run: ruff check --config qa/ruff.toml extract_python tests
run: ruff check --config qa/ruff.toml extract-python

tests-no-miner-u:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,7 +54,9 @@ jobs:
echo "TESSDATA_PREFIX=$(sudo dpkg -L tesseract-ocr-eng | grep tessdata$)" >> $GITHUB_ENV
- name: Run tests
run: |
uv run --dev --extra docling --extra marker --frozen pytest -m "not miner_u" -vvv --cache-clear --show-capture=all -r A tests
cd extract-python
uv sync --dev --extra docling --extra marker --frozen
uv run --frozen pytest -m "not miner_u" -vvv --cache-clear --show-capture=all -r A tests

tests-miner-u:
runs-on: ubuntu-latest
Expand All @@ -70,9 +75,12 @@ jobs:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: extract-python
- name: Run tests
run: |
uv run --dev --extra mineru --frozen pytest -m "miner_u" -vvv --cache-clear --show-capture=all -r A tests
cd extract-python
uv sync --verbose --dev --extra mineru --frozen
uv run --frozen python -m pytest -m "miner_u" -vvv --cache-clear --show-capture=all -r A tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
76 changes: 0 additions & 76 deletions Dockerfile

This file was deleted.

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lock-all:
./scripts/lock.sh extract-core
./scripts/lock.sh extract-python

lock-dist:
./scripts/lock.sh ${project}
107 changes: 0 additions & 107 deletions docker-compose.yml

This file was deleted.

Loading
Loading