Skip to content

Commit 48a9bb6

Browse files
Merge pull request #243 from Pipelex/release/v0.8.1
Release/v0.8.1
2 parents a1a519e + 522549f commit 48a9bb6

6 files changed

Lines changed: 69 additions & 4 deletions

File tree

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.8.1] - 2025-08-27
4+
5+
### Bugfix
6+
7+
- Bugfix: Fixed the `PipeFunc` output concept code and structure class name in the dry run.
8+
39
## [v0.8.0] - 2025-08-27
410

511
### Refactor

pipelex/pipe_operators/func/pipe_func.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ async def _dry_run_operator_pipe(
113113
requirement = TypedNamedInputRequirement(
114114
variable_name="mock_output",
115115
concept=ConceptFactory.make(
116-
concept_code=f"{return_type.__name__}",
116+
concept_code=self.output.code,
117117
domain="generic",
118118
definition="Lorem Ipsum",
119-
structure_class_name=return_type.__name__,
119+
structure_class_name=self.output.structure_class_name,
120120
),
121121
structure_class=return_type,
122122
multiplicity=False,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pipelex"
3-
version = "0.8.0"
3+
version = "0.8.1"
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" }]

tests/test_pipelines/test.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
domain = "test"
3+
4+
[pipe.read_doc_file]
5+
type = "PipeFunc"
6+
definition = "Read the content of related codebase files"
7+
inputs = { related_file_paths = "FilePath" }
8+
output = "CodebaseFileContent"
9+
function_name = "read_file_content"
10+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
from typing import List
2+
3+
from pydantic import Field
4+
5+
from pipelex.core.memory.working_memory import WorkingMemory
6+
from pipelex.core.stuffs.stuff_content import ListContent, StructuredContent
7+
from pipelex.tools.func_registry import func_registry
8+
9+
10+
class FilePath(StructuredContent):
11+
"""A path to a file in the codebase."""
12+
13+
path: str = Field(description="Path to the file")
14+
15+
16+
class CodebaseFileContent(StructuredContent):
17+
"""Content of a codebase file."""
18+
19+
file_path: str = Field(description="Path to the codebase file")
20+
file_content: str = Field(description="Content of the codebase file")
21+
22+
23+
def read_file_content(working_memory: WorkingMemory) -> ListContent[CodebaseFileContent]:
24+
"""Read the content of related codebase files.
25+
26+
Args:
27+
working_memory: Working memory containing related_file_paths
28+
29+
Returns:
30+
ListContent of CodebaseFileContent objects
31+
"""
32+
33+
file_paths_list = working_memory.get_stuff_as_list("related_file_paths", item_type=FilePath)
34+
35+
codebase_files: List[CodebaseFileContent] = []
36+
for file_path in file_paths_list.items:
37+
try:
38+
with open(file_path.path, "r", encoding="utf-8") as file:
39+
content = file.read()
40+
codebase_files.append(CodebaseFileContent(file_path=file_path.path, file_content=content))
41+
except Exception as e:
42+
codebase_files.append(
43+
CodebaseFileContent(file_path=file_path.path, file_content=f"# File not found or unreadable: {file_path.path}\n# Error: {str(e)}")
44+
)
45+
46+
return ListContent[CodebaseFileContent](items=codebase_files)
47+
48+
49+
func_registry.register_function(read_file_content, name="read_file_content")

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)