Skip to content

Commit ee06444

Browse files
Merge pull request Pipelex#50 from Pipelex/release/v0.2.12
Release/v0.2.12
2 parents b873d0e + 2f563e8 commit ee06444

88 files changed

Lines changed: 596 additions & 377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Thumbs.db
4040
reports/
4141
results/
4242

43-
# Pipelex libraries, duplicated from pipelex/libraries/ by `pipelex init`
43+
# Pipelex libraries, duplicated from pipelex/libraries/ by `pipelex init-libraries`
4444
pipelex_libraries/
4545

4646
# personnal pipelex config file that overrides the default one

CHANGELOG.md

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

3+
## [v0.2.12] - 2025-06-03
4+
5+
- pipelex cli: Split `pipelex init` into 2 separate functions: `pipelex init-libraries` and `pipelex init-config`
6+
- Fixed the inheritance config manager method
7+
- Rename Mission to Pipeline
8+
- Enable to start a pipeline and let in run in the background, getting it's run id, but not waiting for the output
9+
- `Makefile`: avoid defaulting pytest to verbose. Setup target `make test-xdist` = Run unit tests with `xdist`, make it the default for shorthand `make t`. The old `make t` is now `make tp` (test-with-prints)
10+
- Added `mistral-small-3.1` and `qwen3:8b`
11+
- Fix template pre-processor: don't try and substitute a dollar numerical like $10 or @25
12+
- Refactor with less "OpenAI" naming for non-openai stuff that just uses the OpenAI SDK
13+
314
## [v0.2.11] - 2025-06-02
415

516
- HotFix for v0.2.10 👇 regarding the new pipelex/pipelex_init.toml`
@@ -13,7 +24,7 @@
1324
**Major Model Additions** - Claude 4 (Opus & Sonnet), Grok-3, and GPT-4 image generation are now in the house.
1425

1526
### Pipeline Base Library update
16-
- **New pipe** - `extract_page_contents_and_views_from_pdf` transfered from cookbook to base library (congrats on the promotion!). This pipe extracts text, linked images, **AND** page_view images (rendered pages) - it's very useful if you want to use Vision in follow-up pipes
27+
- **New pipe** - `extract_page_contents_and_views_from_pdf` transferred from cookbook to base library (congrats on the promotion!). This pipe extracts text, linked images, **AND** page_view images (rendered pages) - it's very useful if you want to use Vision in follow-up pipes
1728

1829
### Added
1930

@@ -56,16 +67,16 @@
5667

5768
- Include `pyproject.toml` inside the project build.
5869
- Fix `ImggEngineFactory`: image generation (imgg) handle required format is `platform/model_name`
59-
- pipelex cli: Added `list-pipes` method that can list all the availables pipes with descriptions.
70+
- pipelex cli: Added `list-pipes` method that can list all the available pipes along with their descriptions.
6071
- Use a minimum version for `uv` instead of a fixed version
6172
- Implement `AGENTS.md` for Codex
6273
- Add tests for some of the `tools.misc`
6374
- pipelex cli: Rename `pipelex run-setup` to `pipelex validate`
6475

6576
## [v0.2.8] - 2025-05-28
6677

67-
- Defaults to `uv`
68-
- Simplify llm provider config: All the API keys, urls, and regions are to be set in `.env`.
78+
- Replaced `poetry` by `uv` for dependency management.
79+
- Simplify llm provider config: All the API keys, urls, and regions now live in the `.env`.
6980
- Added logging level `OFF`, prevents any log from hitting the console
7081

7182
## [v0.2.7] - 2025-05-26

Makefile

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,16 @@ make merge-check-pyright - Run pyright merge check without updating files
6161

6262
make rl - Shorthand -> reinitlibraries
6363
make v - Shorthand -> validate
64-
make init - Run pipelex init
64+
make init - Run `pipelex init-libraries` and `pipelex init-config`
6565
make codex-tests - Run tests for Codex (exit on first failure) (no inference, no codex_disabled)
6666
make gha-tests - Run tests for github actions (exit on first failure) (no inference, no gha_disabled)
6767
make test - Run unit tests (no inference)
68+
make test-xdist - Run unit tests with xdist (no inference)
69+
make t - Shorthand -> test-xdist
6870
make test-quiet - Run unit tests without prints (no inference)
6971
make tq - Shorthand -> test-quiet
7072
make test-with-prints - Run tests with prints (no inference)
71-
make t - Shorthand -> test-with-prints
73+
make tp - Shorthand -> test-with-prints
7274
make test-inference - Run unit tests only for inference (with prints)
7375
make ti - Shorthand -> test-inference
7476
make test-ocr - Run unit tests only for ocr (with prints)
@@ -90,7 +92,7 @@ export HELP
9092
all help env lock install update build \
9193
format lint pyright mypy \
9294
cleanderived cleanenv cleanlibraries cleanall \
93-
test test-quiet tq test-with-prints t test-inference ti \
95+
test test-xdist t test-quiet tq test-with-prints tp test-inference ti \
9496
test-imgg tg test-ocr to codex-tests gha-tests \
9597
run-all-tests run-manual-trigger-gha-tests run-gha_disabled-tests \
9698
validate v check c cc \
@@ -125,14 +127,16 @@ env: check-uv
125127
@echo "Using Python: $$($(VENV_PYTHON) --version) from $$(which $$(readlink -f $(VENV_PYTHON)))"
126128

127129
init: env
128-
$(call PRINT_TITLE,"Running pipelex init")
129-
$(VENV_PIPELEX) init
130+
$(call PRINT_TITLE,"Running pipelex init-libraries and init-config")
131+
$(VENV_PIPELEX) init-libraries
132+
$(VENV_PIPELEX) init-config
130133

131134
install: env
132135
$(call PRINT_TITLE,"Installing dependencies")
133136
@. $(VIRTUAL_ENV)/bin/activate && \
134137
uv sync --all-extras && \
135-
$(VENV_PIPELEX) init && \
138+
$(VENV_PIPELEX) init-libraries && \
139+
$(VENV_PIPELEX) init-config && \
136140
echo "Installed Pipelex dependencies in ${VIRTUAL_ENV} with all extras and initialized Pipelex";
137141

138142
lock: env
@@ -225,18 +229,30 @@ test: env
225229
$(call PRINT_TITLE,"Unit testing without prints but displaying logs via pytest for WARNING level and above")
226230
@echo "• Running unit tests"
227231
@if [ -n "$(TEST)" ]; then \
228-
$(VENV_PYTEST) -s -o log_cli=true -o log_level=WARNING -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
232+
$(VENV_PYTEST) -s -o log_cli=true -o log_level=WARNING -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
229233
else \
230-
$(VENV_PYTEST) -s -o log_cli=true -o log_level=WARNING $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
234+
$(VENV_PYTEST) -s -o log_cli=true -o log_level=WARNING $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
231235
fi
232236

237+
test-xdist: env
238+
$(call PRINT_TITLE,"Unit testing without prints but displaying logs via pytest for WARNING level and above")
239+
@echo "• Running unit tests"
240+
@if [ -n "$(TEST)" ]; then \
241+
$(VENV_PYTEST) -n auto -o log_level=WARNING -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
242+
else \
243+
$(VENV_PYTEST) -n auto -o log_level=WARNING $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
244+
fi
245+
246+
t: test-xdist
247+
@echo "> done: t = test-xdist"
248+
233249
test-quiet: env
234250
$(call PRINT_TITLE,"Unit testing without prints but displaying logs via pytest for WARNING level and above")
235251
@echo "• Running unit tests"
236252
@if [ -n "$(TEST)" ]; then \
237-
$(VENV_PYTEST) -o log_cli=true -o log_level=WARNING -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
253+
$(VENV_PYTEST) -o log_cli=true -o log_level=WARNING -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
238254
else \
239-
$(VENV_PYTEST) -o log_cli=true -o log_level=WARNING $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
255+
$(VENV_PYTEST) -o log_cli=true -o log_level=WARNING $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
240256
fi
241257

242258
tq: test-quiet
@@ -246,20 +262,20 @@ test-with-prints: env
246262
$(call PRINT_TITLE,"Unit testing with prints and our rich logs")
247263
@echo "• Running unit tests"
248264
@if [ -n "$(TEST)" ]; then \
249-
$(VENV_PYTEST) -s -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
265+
$(VENV_PYTEST) -s -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
250266
else \
251-
$(VENV_PYTEST) -s $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
267+
$(VENV_PYTEST) -s $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
252268
fi
253269

254-
t: test-with-prints
255-
@echo "> done: t = test-with-prints"
270+
tp: test-with-prints
271+
@echo "> done: tp = test-with-prints"
256272

257273
test-inference: env
258274
$(call PRINT_TITLE,"Unit testing")
259275
@if [ -n "$(TEST)" ]; then \
260-
$(VENV_PYTEST) --exitfirst -m "inference and not imgg" -s -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
276+
$(VENV_PYTEST) --exitfirst -m "inference and not imgg" -s -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
261277
else \
262-
$(VENV_PYTEST) --exitfirst -m "inference and not imgg" -s $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
278+
$(VENV_PYTEST) --exitfirst -m "inference and not imgg" -s $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
263279
fi
264280

265281
ti: test-inference
@@ -268,9 +284,9 @@ ti: test-inference
268284
test-ocr: env
269285
$(call PRINT_TITLE,"Unit testing ocr")
270286
@if [ -n "$(TEST)" ]; then \
271-
$(VENV_PYTEST) --exitfirst -m "ocr" -s -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
287+
$(VENV_PYTEST) --exitfirst -m "ocr" -s -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
272288
else \
273-
$(VENV_PYTEST) --exitfirst -m "ocr" -s $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
289+
$(VENV_PYTEST) --exitfirst -m "ocr" -s $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
274290
fi
275291

276292
to: test-ocr
@@ -279,9 +295,9 @@ to: test-ocr
279295
test-imgg: env
280296
$(call PRINT_TITLE,"Unit testing")
281297
@if [ -n "$(TEST)" ]; then \
282-
$(VENV_PYTEST) --exitfirst -m "imgg" -s -k "$(TEST)" $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
298+
$(VENV_PYTEST) --exitfirst -m "imgg" -s -k "$(TEST)" $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
283299
else \
284-
$(VENV_PYTEST) --exitfirst -m "imgg" -s $(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,-v)); \
300+
$(VENV_PYTEST) --exitfirst -m "imgg" -s $(if $(filter 1,$(VERBOSE)),-v,$(if $(filter 2,$(VERBOSE)),-vv,$(if $(filter 3,$(VERBOSE)),-vvv,))); \
285301
fi
286302

287303
tg: test-imgg

pipelex/_bootstrap_user_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def activate() -> None:
1616
# 2) If a pipelex_libraries folder already exists, also touch __init__.py
1717
# (helps IDE & static type-checkers) and ensure the *exact* folder is
1818
# on sys.path. When it does **not** exist yet, nothing else to do —
19-
# as soon as the user runs `pipelex init`, the directory will be
19+
# as soon as the user runs `pipelex init-libraries`, the directory will be
2020
# created *inside* <root>, which is already import-able thanks to (1).
2121
for parent in (root, *root.parents):
2222
lib_dir = parent / "pipelex_libraries"

pipelex/cli/_cli.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class PipelexCLI(TyperGroup):
2323
def get_command(self, ctx: Context, cmd_name: str) -> Optional[Command]:
2424
cmd = super().get_command(ctx, cmd_name)
2525
if cmd is None:
26+
typer.echo(f"Unknown command: {cmd_name}")
2627
typer.echo(ctx.get_help())
2728
ctx.exit(1)
2829
return cmd
@@ -36,22 +37,40 @@ def get_command(self, ctx: Context, cmd_name: str) -> Optional[Command]:
3637
)
3738

3839

39-
@app.command()
40-
def init(
40+
@app.command("init-libraries")
41+
def init_libraries(
4142
overwrite: Annotated[bool, typer.Option("--overwrite", "-o", help="Warning: If set, existing files will be overwritten.")] = False,
4243
) -> None:
43-
"""Initialize pipelex configuration in the current directory."""
44-
LibraryConfig.export_libraries(overwrite=overwrite)
44+
"""Initialize pipelex libraries in the current directory.
45+
46+
If overwrite is False, only create files that don't exist yet.
47+
If overwrite is True, all files will be overwritten even if they exist.
48+
"""
49+
try:
50+
# TODO: Have a more proper print message regarding the overwrited files (e.g. list of files that were overwritten or not)
51+
LibraryConfig.export_libraries(overwrite=overwrite)
52+
if overwrite:
53+
typer.echo("Successfully initialized pipelex libraries (all files overwritten)")
54+
else:
55+
typer.echo("Successfully initialized pipelex libraries (only created non-existing files)")
56+
except Exception as e:
57+
raise PipelexCLIError(f"Failed to initialize libraries: {e}")
58+
4559

46-
pipelex_init_path = os.path.join(config_manager.pipelex_root_dir, "pipelex_init.toml")
60+
@app.command("init-config")
61+
def init_config(
62+
reset: Annotated[bool, typer.Option("--reset", "-r", help="Warning: If set, existing files will be overwritten.")] = False,
63+
) -> None:
64+
"""Initialize pipelex configuration in the current directory."""
65+
pipelex_template_path = os.path.join(config_manager.pipelex_root_dir, "pipelex_template.toml")
4766
target_config_path = os.path.join(config_manager.local_root_dir, "pipelex.toml")
4867

49-
if os.path.exists(target_config_path) and not overwrite:
50-
typer.echo("Warning: pipelex.toml already exists. Use --overwrite to force creation.")
68+
if os.path.exists(target_config_path) and not reset:
69+
typer.echo("Warning: pipelex.toml already exists. Use --reset to force creation.")
5170
return
5271

5372
try:
54-
shutil.copy2(pipelex_init_path, target_config_path)
73+
shutil.copy2(pipelex_template_path, target_config_path)
5574
typer.echo(f"Created pipelex.toml at {target_config_path}")
5675
except Exception as e:
5776
raise PipelexCLIError(f"Failed to create pipelex.toml: {e}")

pipelex/cogt/content_generation/assignment_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from pipelex.cogt.ocr.ocr_handle import OcrHandle
1717
from pipelex.cogt.ocr.ocr_input import OcrInput
1818
from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParams
19-
from pipelex.mission.job_metadata import JobMetadata
19+
from pipelex.pipeline.job_metadata import JobMetadata
2020
from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory
2121
from pipelex.tools.templating.templating_models import PromptingStyle
2222

pipelex/cogt/content_generation/content_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParams
3131
from pipelex.cogt.ocr.ocr_output import OcrOutput
3232
from pipelex.config import get_config
33-
from pipelex.mission.job_metadata import JobMetadata
33+
from pipelex.pipeline.job_metadata import JobMetadata
3434
from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory
3535
from pipelex.tools.templating.templating_models import PromptingStyle
3636
from pipelex.tools.typing.pydantic_utils import BaseModelTypeVar

pipelex/cogt/content_generation/content_generator_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pipelex.cogt.ocr.ocr_input import OcrInput
1313
from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParams
1414
from pipelex.cogt.ocr.ocr_output import OcrOutput
15-
from pipelex.mission.job_metadata import JobMetadata
15+
from pipelex.pipeline.job_metadata import JobMetadata
1616
from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory
1717
from pipelex.tools.templating.templating_models import PromptingStyle
1818
from pipelex.tools.typing.pydantic_utils import BaseModelTypeVar

pipelex/cogt/imgg/imgg_job_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pipelex.cogt.imgg.imgg_job_components import ImggJobConfig, ImggJobParams, ImggJobReport
55
from pipelex.cogt.imgg.imgg_prompt import ImggPrompt
66
from pipelex.config import get_config
7-
from pipelex.mission.job_metadata import JobCategory, JobMetadata
7+
from pipelex.pipeline.job_metadata import JobCategory, JobMetadata
88

99

1010
class ImggJobFactory:

pipelex/cogt/imgg/imgg_worker_abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pipelex.cogt.imgg.imgg_job import ImggJob
1111
from pipelex.cogt.inference.inference_report_delegate import InferenceReportDelegate
1212
from pipelex.cogt.inference.inference_worker_abstract import InferenceWorkerAbstract
13-
from pipelex.mission.job_metadata import UnitJobId
13+
from pipelex.pipeline.job_metadata import UnitJobId
1414

1515
F = TypeVar("F", bound=Callable[..., Awaitable[Any]])
1616

0 commit comments

Comments
 (0)