Skip to content

Commit aadc799

Browse files
dev to release/v0.4.2 (Pipelex#95)
* fix/codex-tests-makefile * feature/allow-codex-branch-names (Pipelex#82) * Fix/mistral ocr image file type handling (Pipelex#84) ### 📝 Description - mistral ocr image file type handling ### 🔄 Type of Change - [ ] 🐛 Bug fix - [ ] ✨ New feature - [ ] 💥 Breaking change - [ ] 📚 Documentation update - [ ] 🧹 Code refactor - [ ] ⚡ Performance improvement - [X] ✅ Test update ### 🧪 Tests - test_ocr to test both png and jpeg * Feature/pipelex get instance (Pipelex#85) - Make it safer and more tolerant to add domains from toml - Pipelex.get_instance() * Feature/epic docs and examples (Pipelex#87) ### 🔗 Related Issues ### 📝 Description - Docs - Rules - Polish - Breaking change: StuffFactory.make_stuff() arg `concept_code` renamed to `concept_str` because it bow tolerates concepts not fully formed, i.e. without domain, e.g. Text of PDF (implicit prefix is **_native_**) ### 🔄 Type of Change - [X] 🐛 Bug fix - [X] ✨ New feature - [X] 💥 Breaking change - [XXX] 📚 Documentation update - [X] 🧹 Code refactor - [ ] ⚡ Performance improvement - [X] ✅ Test update ### 🧪 Tests - For concept refines: TestConceptRefinesValidationFunction and TestConceptPydanticFieldValidation * bump release/v0.4.0 * Changelog 0.4.0 and flow chart on one more example * Addition to changelog * fix gha docs * fix/discord-link (Pipelex#90) * Fix/typo and hello world code (Pipelex#91) * Typo fix * Added Hello-World-Code to docs * Changelog + bump version * changed changelog version * fix/doc-gha (Pipelex#94) * bump version * feature/load_inheritance_config_package (Pipelex#97) * add changelog --------- Co-authored-by: Louis Choquel <lchoquel@users.noreply.github.com> Co-authored-by: Louis Choquel <louis@pipelex.com>
2 parents f730730 + 4377d63 commit aadc799

6 files changed

Lines changed: 56 additions & 48 deletions

File tree

.github/workflows/deploy-doc.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
# .github/workflows/docs-preview.yml
21
name: Preview MkDocs on GitHub Pages
32

43
on:
54
push:
6-
branches: [main]
5+
branches: main
6+
7+
permissions:
8+
contents: write
9+
pages: write
710

811
jobs:
912
preview:
1013
runs-on: ubuntu-latest
14+
env:
15+
VIRTUAL_ENV: ${{ github.workspace }}/.venv
1116
steps:
1217
- uses: actions/checkout@v4
1318

1419
- uses: actions/setup-python@v5
1520
with:
1621
python-version: '3.x'
1722

18-
- name: Build docs
19-
run: |
20-
pip install mkdocs==1.6.1 mkdocs-material==9.6.14 mkdocs-glightbox==0.4.0 mkdocs-meta-manager==1.1.0
21-
mkdocs build --strict # generates ./site
23+
- name: Check UV installation
24+
run: make check-uv
2225

23-
- name: Publish to *gh-pages-preview*
24-
uses: peaceiris/actions-gh-pages@v4
25-
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
publish_dir: ./site
28-
publish_branch: gh-pages-preview # <─ test branch
29-
# put each branch in its own folder so multiple previews can coexist
30-
destination_dir: ${{ github.ref_name }}
31-
force_orphan: true
26+
- name: Verify UV installation
27+
run: uv --version
28+
29+
- name: Install dependencies
30+
run: make install
31+
32+
- name: Install docs dependencies
33+
run: uv pip install -e ".[docs]"
34+
35+
- name: Deploy documentation
36+
run: make doc-deploy

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v0.4.2] - 2025-06-17
4+
5+
- Fixed the inheritance config manager method (Undocumented feature, soon to be removed)
6+
- Fixed the `deploy-doc.yml` GitHub Action
7+
- Grouped the mkdocs dependencies in a single group `docs` in the `pyproject.toml` file
8+
39
## [v0.4.1] - 2025-06-16
410

511
- Changed discord link to the new one: https://go.pipelex.com/discord

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,5 +401,5 @@ doc-check: env
401401

402402
doc-deploy: env
403403
$(call PRINT_TITLE,"Deploying documentation with mkdocs")
404-
$(VENV_MKDOCS) gh-deploy
404+
$(VENV_MKDOCS) gh-deploy --force --clean
405405

pipelex/tools/config/manager.py

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import importlib
12
import os
23
from configparser import ConfigParser
34
from typing import Any, Dict, Optional
@@ -71,32 +72,24 @@ def load_inheritance_config(self, the_pipelex_config: Dict[str, Any]):
7172
print(f"pyproject.toml not found in {self.local_root_dir}")
7273
return
7374

75+
def _find_package_path(package_name: str) -> Optional[str]:
76+
"""Find package path by importing it"""
77+
try:
78+
module = importlib.import_module(package_name)
79+
if hasattr(module, "__file__") and module.__file__:
80+
return os.path.dirname(module.__file__)
81+
except ImportError:
82+
pass
83+
84+
return None
85+
7486
pyproject = toml.load(pyproject_path)
7587
if "tool" in pyproject and "pipelex" in pyproject["tool"] and "config_inheritance" in pyproject["tool"]["pipelex"]:
7688
for config_name in pyproject["tool"]["pipelex"]["config_inheritance"]:
77-
print(f"Loading config inheritance for {config_name}")
78-
# First check if it's a local dependency in poetry
79-
package_path: Optional[str] = None
80-
if "tool" in pyproject and "poetry" in pyproject["tool"] and "dependencies" in pyproject["tool"]["poetry"]:
81-
dep_config: Dict[str, Any] = pyproject["tool"]["poetry"]["dependencies"].get(config_name, {})
82-
if "path" in dep_config:
83-
# It's a local path
84-
local_path: str = str(dep_config["path"])
85-
package_path = os.path.abspath(os.path.join(self.local_root_dir, local_path))
86-
87-
if not package_path:
88-
# Try to find in .venv
89-
venv_path = os.path.join(self.local_root_dir, ".venv")
90-
if os.path.exists(venv_path):
91-
site_packages = os.path.join(venv_path, "lib", "python3.11", "site-packages", config_name)
92-
if os.path.exists(site_packages):
93-
package_path = site_packages
94-
89+
package_path = _find_package_path(config_name)
9590
if package_path:
9691
config_path = os.path.join(package_path, "pipelex.toml")
97-
print(f"Loading config inheritance for {config_name} from {config_path}")
9892
if os.path.exists(config_path):
99-
print(f"Found config inheritance for {config_name} from {config_path}")
10093
config = failable_load_toml_from_path(config_path)
10194
if config:
10295
deep_update(the_pipelex_config, config)

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pipelex"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
description = "Pipelex is an open-source dev tool based on a simple declarative language that lets you define replicable, structured, composable LLM pipelines."
55
authors = [{ name = "Evotis S.A.S.", email = "evotis@pipelex.com" }]
66
maintainers = [{ name = "Pipelex staff", email = "oss@pipelex.com" }]
@@ -57,11 +57,13 @@ fal = ["fal-client>=0.4.1"]
5757
google = ["google-auth-oauthlib>=1.2.1"]
5858
mistralai = ["mistralai==1.5.2"]
5959
compat = ["backports.strenum>=1.3.0 ; python_version < '3.11'"]
60-
dev = [
60+
docs = [
6161
"mkdocs==1.6.1",
6262
"mkdocs-glightbox==0.4.0",
6363
"mkdocs-material==9.6.14",
6464
"mkdocs-meta-manager==1.1.0",
65+
]
66+
dev = [
6567
"boto3-stubs>=1.35.24",
6668
"mypy>=1.11.2",
6769
"pyright==1.1.398",

uv.lock

Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)