Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
Moved migration and docs
Louis Choquel4f6731935117
diff --git a/Makefile b/Makefileindex 10e55ee16..938d01179 100644--- a/Makefile+++ b/Makefile@@ -419,10 +419,6 @@ docs-deploy: env### SHORTHANDS##########################################################################################-check-unused-imports: env- $(call PRINT_TITLE,"Checking for unused imports without fixing")- $(VENV_RUFF) check --select=F401 --no-fix .-c: format lint pyright mypy@echo "> done: c = check"diff --git a/docs/pages/tools/migration.md b/docs/pages/migration/index.mdsimilarity index 89%rename from docs/pages/tools/migration.mdrename to docs/pages/migration/index.mdindex 1aa32ef52..53f686a34 100644--- a/docs/pages/tools/migration.md+++ b/docs/pages/migration/index.md@@ -2,22 +2,22 @@This document provides guidance for migrating between different versions of Pipelex that introduce breaking changes.-## Version 0.6.11: Concept Definition Syntax Change+## Concepts Migration### Breaking Change-In version 0.6.11, we changed the syntax for defining concepts in TOML library files. The key name for concept definitions has changed from `Concept` to `definition`.+We changed the syntax for defining concepts in TOML library files. The key name for concept definitions has changed from `Concept` to `definition`.### What Changed-**Old syntax (before v0.6.11):**+**Old syntax:**```toml[concept.MyConceptName]Concept = "Description of the concept"refines = "BaseConceptName"```-**New syntax (v0.6.11+):**+**New syntax:**```toml[concept.MyConceptName]definition = "Description of the concept"@@ -27,6 +27,7 @@ refines = "BaseConceptName"### Why This ChangeThis change improves consistency in our TOML schema by:+- Using more descriptive field names (`definition` instead of `Concept`)- Aligning with the internal `ConceptBlueprint` data structure- Making the TOML files more self-documenting and intuitive@@ -46,6 +47,7 @@ pipelex migrate```The migration command will:+- Find all `.toml` files in your configured pipelines directory- Replace `Concept =` with `definition =` in concept definitions- Preserve all other formatting and comments@@ -110,11 +112,13 @@ pipelex run your-pipeline-name### Troubleshooting**Error: "ConceptBlueprint validation failed"**+- Check that all `Concept =` entries have been changed to `definition =`- Ensure no typos were introduced during migration- Verify TOML syntax is still valid**Error: "Failed to load TOML file"**+- Check file permissions- Ensure TOML syntax is valid (no missing quotes, brackets, etc.)- Review any custom modifications that might conflict@@ -122,25 +126,26 @@ pipelex run your-pipeline-name### RollbackIf you need to rollback the migration:+1. Stop using the new version of Pipelex2. Restore from the `.backup` files created during migration3. Or manually change `definition =` back to `Concept =`-## Version 0.3.0: Pipe Definition Syntax Change+## Pipes Migration### Breaking Change-Starting in version 0.3.0, we changed the syntax for defining pipes in TOML library files. The pipe definition format has been restructured to use explicit `type` and `definition` fields instead of the implicit `PipeClassName = "description"` format.+We changed the syntax for defining pipes in TOML library files. The pipe definition format has been restructured to use explicit `type` and `definition` fields instead of the implicit `PipeClassName = "description"` format.### What Changed-**Old syntax (before v0.3.0):**+**Old syntax:**```toml[pipe.my_pipe_name]SomePipeClass = "Description of what this pipe does"```-**New syntax (v0.3.0+):**+**New syntax:**```toml[pipe.my_pipe_name]type = "SomePipeClass"@@ -150,6 +155,7 @@ definition = "Description of what this pipe does"### Why This ChangeThis change improves consistency and clarity by:+- Making the pipe class type explicit and separate from its description- Aligning pipe definitions with concept definitions (both use `definition`)- Improving readability and maintainability of TOML files@@ -170,6 +176,7 @@ pipelex migrate```The migration command will:+- Find all `.toml` files in your configured pipelines directory- Convert `PipeClassName = "description"` to `type = "PipeClassName"` and `definition = "description"`- Preserve all other formatting and commentsdiff --git a/mkdocs.yml b/mkdocs.ymlindex 178c3ecb8..adaec90bc 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -146,7 +146,7 @@ nav:- Tools:- CLI: pages/tools/cli.md- Logging: pages/tools/logging.md- - Migration: pages/tools/migration.md+ - Migration: pages/migration/index.md- Advanced Customizations:- Overview: pages/advanced-customization/index.md- Secrets Provider: pages/advanced-customization/secrets-provider-injection.mddiff --git a/pipelex/cli/commands/migrate_cmd.py b/pipelex/cli/commands/migrate_cmd.pyindex ff395993d..3040101b5 100644--- a/pipelex/cli/commands/migrate_cmd.py+++ b/pipelex/cli/commands/migrate_cmd.py@@ -5,7 +5,8 @@ from typing import Annotatedimport typer-from pipelex.tools.migrate.migrate_v0_1_0_to_v0_2_0 import TomlMigrator, migrate_concept_syntax+from pipelex.migration.migrate_v0_1_0_to_v0_2_0 import TomlMigrator, migrate_concept_syntax+from pipelex.migration.migration_result import MigrationResultfrom .common import is_pipelex_libraries_folder@@ -34,7 +35,7 @@ def do_migrate(raise typer.Exit(1)try:- result = migrate_concept_syntax(+ result: MigrationResult = migrate_concept_syntax(directory=pipelines_dir_or_file,create_backups=backups and not dry_run,dry_run=dry_run,diff --git a/pipelex/tools/migrate/__init__.py b/pipelex/migration/__init__.pysimilarity index 100%rename from pipelex/tools/migrate/__init__.pyrename to pipelex/migration/__init__.pydiff --git a/pipelex/tools/migrate/migrate_v0_1_0_to_v0_2_0.py b/pipelex/migration/migrate_v0_1_0_to_v0_2_0.pysimilarity index 99%rename from pipelex/tools/migrate/migrate_v0_1_0_to_v0_2_0.pyrename to pipelex/migration/migrate_v0_1_0_to_v0_2_0.pyindex dc6ab0318..b11e84fd7 100644--- a/pipelex/tools/migrate/migrate_v0_1_0_to_v0_2_0.py+++ b/pipelex/migration/migrate_v0_1_0_to_v0_2_0.py@@ -5,7 +5,7 @@ import shutilfrom pathlib import Pathfrom typing import Any, ClassVar, Dict, List, Match-from pipelex.tools.migrate.migration_result import MigrationResult+from pipelex.migration.migration_result import MigrationResultclass TomlMigrator:diff --git a/pipelex/tools/migrate/migration_result.py b/pipelex/migration/migration_result.pysimilarity index 100%rename from pipelex/tools/migrate/migration_result.pyrename to pipelex/migration/migration_result.pydiff --git a/tests/e2e/pipelex/tools/migrate/__init__.py b/tests/e2e/pipelex/migration/__init__.pysimilarity index 100%rename from tests/e2e/pipelex/tools/migrate/__init__.pyrename to tests/e2e/pipelex/migration/__init__.pydiff --git a/tests/e2e/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0_e2e.py b/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.pysimilarity index 99%rename from tests/e2e/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0_e2e.pyrename to tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.pyindex a896b429a..635c55de3 100644--- a/tests/e2e/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0_e2e.py+++ b/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.py@@ -5,7 +5,7 @@ from typing import Any, List, Tupleimport pytest-from pipelex.tools.migrate.migrate_v0_1_0_to_v0_2_0 import migrate_concept_syntax+from pipelex.migration.migrate_v0_1_0_to_v0_2_0 import migrate_concept_syntaxclass TestMigrationE2E:@@ -336,7 +336,7 @@ Concept = "Test concept"import shutil# Copy the test data file to our temp directory- test_data_path = Path(__file__).parent.parent.parent.parent.parent / "data" / "test_migrate_v0_1_0_to_v0_2_0.toml"+ test_data_path = Path(__file__).parent.parent.parent.parent / "data" / "test_migrate_v0_1_0_to_v0_2_0.toml"test_file = tmp_path / "test_migrate.toml"shutil.copy2(test_data_path, test_file)diff --git a/tests/unit/pipelex/tools/migrate/__init__.py b/tests/unit/pipelex/migration/__init__.pysimilarity index 100%rename from tests/unit/pipelex/tools/migrate/__init__.pyrename to tests/unit/pipelex/migration/__init__.pydiff --git a/tests/unit/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0.py b/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.pysimilarity index 99%rename from tests/unit/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0.pyrename to tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.pyindex ae61ecfa0..747ecbaa7 100644--- a/tests/unit/pipelex/tools/migrate/test_migrate_v0_1_0_to_v0_2_0.py+++ b/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.py@@ -2,7 +2,7 @@ from pathlib import Pathimport pytest-from pipelex.tools.migrate.migrate_v0_1_0_to_v0_2_0 import MigrationResult, TomlMigrator, migrate_concept_syntax+from pipelex.migration.migrate_v0_1_0_to_v0_2_0 import MigrationResult, TomlMigrator, migrate_concept_syntaxclass TestTomlMigrator: