Michele Dolfi commited on
Commit
dd60608
·
unverified ·
1 Parent(s): 963369f

fix: submodules in wheels (#85)

Browse files

Signed-off-by: Michele Dolfi <[email protected]>

.github/workflows/job-build.yml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Run checks
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ build-package:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python-version: ['3.12']
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Install uv and set the python version
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ enable-cache: true
19
+ - name: Install dependencies
20
+ run: uv sync --all-extras --no-extra cu124
21
+ - name: Build package
22
+ run: uv build
23
+ - name: Check content of wheel
24
+ run: unzip -l dist/*.whl
25
+ - name: Store the distribution packages
26
+ uses: actions/upload-artifact@v4
27
+ with:
28
+ name: python-package-distributions
29
+ path: dist/
.github/workflows/job-checks.yml CHANGED
@@ -21,6 +21,32 @@ jobs:
21
  - name: Run styling check
22
  run: uv run --no-sync pre-commit run --all-files
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  markdown-lint:
25
  runs-on: ubuntu-latest
26
  steps:
 
21
  - name: Run styling check
22
  run: uv run --no-sync pre-commit run --all-files
23
 
24
+ build-package:
25
+ uses: ./.github/workflows/job-build.yml
26
+
27
+ test-package:
28
+ needs:
29
+ - build-package
30
+ runs-on: ubuntu-latest
31
+ strategy:
32
+ matrix:
33
+ python-version: ['3.12']
34
+ steps:
35
+ - name: Download all the dists
36
+ uses: actions/download-artifact@v4
37
+ with:
38
+ name: python-package-distributions
39
+ path: dist/
40
+ - name: Install uv and set the python version
41
+ uses: astral-sh/setup-uv@v5
42
+ with:
43
+ python-version: ${{ matrix.python-version }}
44
+ enable-cache: true
45
+ - name: Install package
46
+ run: uv pip install dist/*.whl
47
+ - name: Create the server
48
+ run: python -c 'from docling_serve.app import create_app; create_app()'
49
+
50
  markdown-lint:
51
  runs-on: ubuntu-latest
52
  steps:
.github/workflows/pypi.yml CHANGED
@@ -8,7 +8,13 @@ permissions:
8
  contents: read
9
 
10
  jobs:
 
 
 
 
11
  build-and-publish:
 
 
12
  runs-on: ubuntu-latest
13
  environment:
14
  name: pypi
@@ -16,15 +22,11 @@ jobs:
16
  permissions:
17
  id-token: write # IMPORTANT: mandatory for trusted publishing
18
  steps:
19
- - uses: actions/checkout@v4
20
- - name: Install uv and set the python version
21
- uses: astral-sh/setup-uv@v5
22
  with:
23
- enable-cache: true
24
- - name: Install dependencies
25
- run: uv sync --all-extras --no-extra cu124
26
- - name: Build
27
- run: uv build
28
  - name: Publish distribution 📦 to PyPI
29
  uses: pypa/gh-action-pypi-publish@release/v1
30
  with:
 
8
  contents: read
9
 
10
  jobs:
11
+
12
+ build-package:
13
+ uses: ./.github/workflows/job-build.yml
14
+
15
  build-and-publish:
16
+ needs:
17
+ - build-package
18
  runs-on: ubuntu-latest
19
  environment:
20
  name: pypi
 
22
  permissions:
23
  id-token: write # IMPORTANT: mandatory for trusted publishing
24
  steps:
25
+ - name: Download all the dists
26
+ uses: actions/download-artifact@v4
 
27
  with:
28
+ name: python-package-distributions
29
+ path: dist/
 
 
 
30
  - name: Publish distribution 📦 to PyPI
31
  uses: pypa/gh-action-pypi-publish@release/v1
32
  with:
pyproject.toml CHANGED
@@ -102,7 +102,8 @@ url = "https://download.pytorch.org/whl/cu124"
102
  explicit = true
103
 
104
  [tool.setuptools.packages.find]
105
- include = ["docling_serve"]
 
106
 
107
  [project.scripts]
108
  docling-serve = "docling_serve.__main__:main"
 
102
  explicit = true
103
 
104
  [tool.setuptools.packages.find]
105
+ include = ["docling_serve*"]
106
+ namespaces = true
107
 
108
  [project.scripts]
109
  docling-serve = "docling_serve.__main__:main"