Skip to content

Commit 33417f0

Browse files
Release/v0.6.5
Release v0.6.5
2 parents 6adcff3 + b916539 commit 33417f0

16 files changed

Lines changed: 144 additions & 204 deletions

.blackboxrules

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<!-- BEGIN_PIPELEX_RULES -->
2+
# Pipelex Coding Rules
3+
24
## Guide to write or edit pipelines using the Pipelex language in .plx files
35

46
- Always first write your "plan" in natural language, then transcribe it in pipelex.
@@ -39,10 +41,10 @@ ConceptName = "Description of the concept"
3941
- Use PascalCase for concept names
4042
- Never use plurals (no "Stories", use "Story") - lists are handled implicitly by Pipelex
4143
- Avoid circumstantial adjectives (no "LargeText", use "Text") - focus on the essence of what the concept represents
42-
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page)
44+
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page, JSON)
4345

4446
**Native Concepts:**
45-
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`. Use these directly or refine them when appropriate.
47+
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`, `JSON`. Use these directly or refine them when appropriate.
4648

4749
**Refining Native Concepts:**
4850
To create a concept that specializes a native concept without adding fields:
@@ -70,7 +72,7 @@ output = "ConceptName"
7072
The pipes will all have at least this base definition.
7173
- `inputs`: Dictionary of key being the variable used in the prompts, and the value being the ConceptName. It should ALSO LIST THE INPUTS OF THE INTERMEDIATE STEPS (if PipeSequence) or of the conditional pipes (if PipeCondition).
7274
So If you have this error:
73-
`StaticValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
75+
`PipeValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
7476
variable='['invoice']'``
7577
That means that the pipe validate_expense is missing the input `invoice` because one of the subpipe is needing it.
7678

@@ -857,21 +859,6 @@ But don't write documentation unless asked explicitly to.
857859

858860
## Guide to execute a pipeline and write example code
859861

860-
### Prerequisites: Virtual Environment
861-
862-
**CRITICAL**: Before running any `pipelex` commands or `pytest`, you MUST activate the appropriate Python virtual environment. Without proper venv activation, these commands will not work.
863-
864-
For standard installations, the virtual environment is named `.venv`. Always check this first:
865-
866-
```bash
867-
## Activate the virtual environment (standard installation)
868-
source .venv/bin/activate # On macOS/Linux
869-
## or
870-
.venv\Scripts\activate # On Windows
871-
```
872-
873-
If your installation uses a different venv name or location, activate that one instead. All subsequent `pipelex` and `pytest` commands assume the venv is active.
874-
875862
### Example to execute a pipeline with text output
876863

877864
```python
@@ -1146,7 +1133,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp
11461133
Examples:
11471134
```toml
11481135
llm_to_engineer = { model = "base-claude", temperature = 1 }
1149-
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
1136+
llm_to_extract_invoice = { model = "claude-4.5-sonnet", temperature = 0.1, max_tokens = "auto" }
11501137
```
11511138

11521139
The interest is that these presets can be used to set the LLM choice in a PipeLLM, like this:

.cursor/rules/llms.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp
5656
Examples:
5757
```toml
5858
llm_to_engineer = { model = "base-claude", temperature = 1 }
59-
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
59+
llm_to_extract_invoice = { model = "claude-4.5-sonnet", temperature = 0.1, max_tokens = "auto" }
6060
```
6161

6262
The interest is that these presets can be used to set the LLM choice in a PipeLLM, like this:

.cursor/rules/run_pipelex.mdc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ globs:
66
---
77
# Guide to execute a pipeline and write example code
88

9-
## Prerequisites: Virtual Environment
10-
11-
**CRITICAL**: Before running any `pipelex` commands or `pytest`, you MUST activate the appropriate Python virtual environment. Without proper venv activation, these commands will not work.
12-
13-
For standard installations, the virtual environment is named `.venv`. Always check this first:
14-
15-
```bash
16-
# Activate the virtual environment (standard installation)
17-
source .venv/bin/activate # On macOS/Linux
18-
# or
19-
.venv\Scripts\activate # On Windows
20-
```
21-
22-
If your installation uses a different venv name or location, activate that one instead. All subsequent `pipelex` and `pytest` commands assume the venv is active.
23-
249
## Example to execute a pipeline with text output
2510

2611
```python

.cursor/rules/write_pipelex.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ ConceptName = "Description of the concept"
4545
- Use PascalCase for concept names
4646
- Never use plurals (no "Stories", use "Story") - lists are handled implicitly by Pipelex
4747
- Avoid circumstantial adjectives (no "LargeText", use "Text") - focus on the essence of what the concept represents
48-
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page)
48+
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page, JSON)
4949

5050
**Native Concepts:**
51-
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`. Use these directly or refine them when appropriate.
51+
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`, `JSON`. Use these directly or refine them when appropriate.
5252

5353
**Refining Native Concepts:**
5454
To create a concept that specializes a native concept without adding fields:
@@ -76,7 +76,7 @@ output = "ConceptName"
7676
The pipes will all have at least this base definition.
7777
- `inputs`: Dictionary of key being the variable used in the prompts, and the value being the ConceptName. It should ALSO LIST THE INPUTS OF THE INTERMEDIATE STEPS (if PipeSequence) or of the conditional pipes (if PipeCondition).
7878
So If you have this error:
79-
`StaticValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
79+
`PipeValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
8080
variable='['invoice']'``
8181
That means that the pipe validate_expense is missing the input `invoice` because one of the subpipe is needing it.
8282

.github/copilot-instructions.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<!-- BEGIN_PIPELEX_RULES -->
2+
# Pipelex Coding Rules
3+
24
## Guide to write or edit pipelines using the Pipelex language in .plx files
35

46
- Always first write your "plan" in natural language, then transcribe it in pipelex.
@@ -39,10 +41,10 @@ ConceptName = "Description of the concept"
3941
- Use PascalCase for concept names
4042
- Never use plurals (no "Stories", use "Story") - lists are handled implicitly by Pipelex
4143
- Avoid circumstantial adjectives (no "LargeText", use "Text") - focus on the essence of what the concept represents
42-
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page)
44+
- Don't redefine native concepts (Text, Image, PDF, TextAndImages, Number, Page, JSON)
4345

4446
**Native Concepts:**
45-
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`. Use these directly or refine them when appropriate.
47+
Pipelex provides built-in native concepts: `Text`, `Image`, `PDF`, `TextAndImages`, `Number`, `Page`, `JSON`. Use these directly or refine them when appropriate.
4648

4749
**Refining Native Concepts:**
4850
To create a concept that specializes a native concept without adding fields:
@@ -70,7 +72,7 @@ output = "ConceptName"
7072
The pipes will all have at least this base definition.
7173
- `inputs`: Dictionary of key being the variable used in the prompts, and the value being the ConceptName. It should ALSO LIST THE INPUTS OF THE INTERMEDIATE STEPS (if PipeSequence) or of the conditional pipes (if PipeCondition).
7274
So If you have this error:
73-
`StaticValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
75+
`PipeValidationError: missing_input_variable • domain='expense_validator' • pipe='validate_expense' •
7476
variable='['invoice']'``
7577
That means that the pipe validate_expense is missing the input `invoice` because one of the subpipe is needing it.
7678

@@ -857,21 +859,6 @@ But don't write documentation unless asked explicitly to.
857859

858860
## Guide to execute a pipeline and write example code
859861

860-
### Prerequisites: Virtual Environment
861-
862-
**CRITICAL**: Before running any `pipelex` commands or `pytest`, you MUST activate the appropriate Python virtual environment. Without proper venv activation, these commands will not work.
863-
864-
For standard installations, the virtual environment is named `.venv`. Always check this first:
865-
866-
```bash
867-
## Activate the virtual environment (standard installation)
868-
source .venv/bin/activate # On macOS/Linux
869-
## or
870-
.venv\Scripts\activate # On Windows
871-
```
872-
873-
If your installation uses a different venv name or location, activate that one instead. All subsequent `pipelex` and `pytest` commands assume the venv is active.
874-
875862
### Example to execute a pipeline with text output
876863

877864
```python
@@ -1146,7 +1133,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp
11461133
Examples:
11471134
```toml
11481135
llm_to_engineer = { model = "base-claude", temperature = 1 }
1149-
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
1136+
llm_to_extract_invoice = { model = "claude-4.5-sonnet", temperature = 0.1, max_tokens = "auto" }
11501137
```
11511138

11521139
The interest is that these presets can be used to set the LLM choice in a PipeLLM, like this:
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
github-release:
10+
name: Create GitHub Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # IMPORTANT: mandatory for making GitHub Releases
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
- name: Extract version from pyproject.toml
20+
id: get_version
21+
run: |
22+
VERSION=$(grep -m 1 'version = ' pyproject.toml | cut -d '"' -f 2)
23+
echo "VERSION=$VERSION" >> $GITHUB_ENV
24+
- name: Extract changelog notes for current version
25+
id: get_changelog
26+
run: |
27+
VERSION=${{ env.VERSION }}
28+
echo "Extracting changelog for version v$VERSION"
29+
30+
# Find the start of the current version section
31+
START_LINE=$(grep -n "## \[v$VERSION\] - " CHANGELOG.md | cut -d: -f1)
32+
33+
if [ -z "$START_LINE" ]; then
34+
echo "Warning: No changelog entry found for version v$VERSION"
35+
echo "CHANGELOG_NOTES=" >> $GITHUB_ENV
36+
exit 0
37+
fi
38+
39+
# Find the start of the next version section (previous version)
40+
NEXT_VERSION_LINE=$(tail -n +$((START_LINE + 1)) CHANGELOG.md | grep -n "^## \[v.*\] - " | head -1 | cut -d: -f1)
41+
42+
if [ -z "$NEXT_VERSION_LINE" ]; then
43+
# No next version found, extract from current version till end of file
44+
CHANGELOG_CONTENT=$(tail -n +$START_LINE CHANGELOG.md)
45+
else
46+
# Extract content from current version header to before next version
47+
END_LINE=$((START_LINE + NEXT_VERSION_LINE - 1))
48+
CHANGELOG_CONTENT=$(sed -n "$START_LINE,$((END_LINE - 1))p" CHANGELOG.md)
49+
fi
50+
51+
# Clean up the content but preserve the blank line after the header
52+
# First, get the header line and add a blank line after it
53+
HEADER_LINE=$(echo "$CHANGELOG_CONTENT" | head -1)
54+
CONTENT_LINES=$(echo "$CHANGELOG_CONTENT" | tail -n +2 | sed '/^$/d' | sed 's/^[[:space:]]*//' | sed 's/[[:space:]]*$//')
55+
56+
# Combine header + blank line + content
57+
CHANGELOG_CONTENT=$(printf "%s\n\n%s" "$HEADER_LINE" "$CONTENT_LINES")
58+
59+
# Escape for GitHub Actions
60+
echo "CHANGELOG_NOTES<<EOF" >> $GITHUB_ENV
61+
echo "$CHANGELOG_CONTENT" >> $GITHUB_ENV
62+
echo "EOF" >> $GITHUB_ENV
63+
- name: Create GitHub Release
64+
env:
65+
GITHUB_TOKEN: ${{ github.token }}
66+
run: |
67+
if [ -n "$CHANGELOG_NOTES" ]; then
68+
gh release create "v$VERSION" \
69+
--repo "$GITHUB_REPOSITORY" \
70+
--title "v$VERSION" \
71+
--notes "$CHANGELOG_NOTES"
72+
else
73+
gh release create "v$VERSION" \
74+
--repo "$GITHUB_REPOSITORY" \
75+
--title "v$VERSION" \
76+
--notes "Release v$VERSION"
77+
fi
78+

.github/workflows/version-check.yml

Lines changed: 11 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
pull_request:
55
branches:
66
- main
7-
- "release/v[0-9]+.[0-9]+.[0-9]+"
87
jobs:
98
version-check:
109
runs-on: ubuntu-latest
@@ -24,26 +23,17 @@ jobs:
2423
echo "base_branch=$BASE_BRANCH" >> $GITHUB_OUTPUT
2524
echo "source_branch=$SOURCE_BRANCH" >> $GITHUB_OUTPUT
2625
27-
# Check if target is a release branch
28-
if [[ "$BASE_BRANCH" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
29-
echo "Target is a release branch"
30-
echo "is_release_target=true" >> $GITHUB_OUTPUT
31-
echo "target_release_version=${BASE_BRANCH#release/v}" >> $GITHUB_OUTPUT
32-
echo "Extracted target release version: ${BASE_BRANCH#release/v}"
33-
else
34-
echo "Target is NOT a release branch"
35-
echo "is_release_target=false" >> $GITHUB_OUTPUT
36-
fi
37-
3826
# Check if source is a release branch
3927
if [[ "$SOURCE_BRANCH" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
4028
echo "Source is a release branch"
4129
echo "is_release_source=true" >> $GITHUB_OUTPUT
4230
echo "source_release_version=${SOURCE_BRANCH#release/v}" >> $GITHUB_OUTPUT
4331
echo "Extracted source release version: ${SOURCE_BRANCH#release/v}"
4432
else
45-
echo "Source is NOT a release branch"
33+
echo "Source is NOT a release branch - skipping version check"
4634
echo "is_release_source=false" >> $GITHUB_OUTPUT
35+
echo "This workflow only runs for PRs from release branches to main"
36+
exit 0
4737
fi
4838
echo "======================================="
4939
@@ -61,74 +51,24 @@ jobs:
6151
echo "version=$VERSION" >> $GITHUB_OUTPUT
6252
echo "======================================="
6353
64-
# MAIN BRANCH CASE - Check that version is bumped
65-
- name: Check version bump for main branch
66-
if: steps.branch_info.outputs.base_branch == 'main'
54+
# Check that version in pyproject.toml matches the source release branch name
55+
- name: Check version matches release branch
6756
run: |
68-
echo "====== CHECKING VERSION BUMP FOR MAIN ======"
69-
# Get version from main branch
70-
git checkout ${{ github.event.pull_request.base.ref }}
71-
MAIN_VERSION=$(grep '^version' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
72-
73-
# Get version from PR branch
74-
git checkout ${{ github.event.pull_request.head.sha }}
75-
PR_VERSION="${{ steps.current_version.outputs.version }}"
76-
77-
echo "Main version: $MAIN_VERSION"
78-
echo "PR version: $PR_VERSION"
79-
80-
# Check that PR version is greater than main version
81-
if dpkg --compare-versions "$PR_VERSION" le "$MAIN_VERSION"; then
82-
echo "❌ ERROR: PR version ($PR_VERSION) is not greater than main version ($MAIN_VERSION)."
83-
echo "Please bump the version."
84-
exit 1
85-
else
86-
echo "✅ Version was properly bumped from $MAIN_VERSION to $PR_VERSION"
87-
fi
88-
echo "======================================="
89-
90-
# TARGET RELEASE BRANCH CASE - Check that version matches release branch name
91-
- name: Check version matches target release branch
92-
if: steps.branch_info.outputs.is_release_target == 'true'
93-
run: |
94-
echo "====== CHECKING VERSION MATCH FOR TARGET RELEASE BRANCH ======"
95-
# Extract version from branch name
96-
RELEASE_VERSION="${{ steps.branch_info.outputs.target_release_version }}"
97-
98-
# Get version from PR branch
99-
PR_VERSION="${{ steps.current_version.outputs.version }}"
100-
101-
echo "Target release branch version: $RELEASE_VERSION"
102-
echo "PR version: $PR_VERSION"
103-
104-
# Check if versions match
105-
if [[ "$PR_VERSION" != "$RELEASE_VERSION" ]]; then
106-
echo "❌ ERROR: Version in pyproject.toml ($PR_VERSION) does not match target release branch version ($RELEASE_VERSION)"
107-
exit 1
108-
else
109-
echo "✅ Version in pyproject.toml matches target release branch version"
110-
fi
111-
echo "======================================="
112-
113-
# SOURCE RELEASE BRANCH CASE - Check that version matches release branch name
114-
- name: Check version matches source release branch
115-
if: steps.branch_info.outputs.is_release_source == 'true'
116-
run: |
117-
echo "====== CHECKING VERSION MATCH FOR SOURCE RELEASE BRANCH ======"
57+
echo "====== CHECKING VERSION MATCH FOR RELEASE BRANCH ======"
11858
# Extract version from branch name
11959
RELEASE_VERSION="${{ steps.branch_info.outputs.source_release_version }}"
12060
12161
# Get version from PR branch
12262
PR_VERSION="${{ steps.current_version.outputs.version }}"
12363
124-
echo "Source release branch version: $RELEASE_VERSION"
125-
echo "PR version: $PR_VERSION"
64+
echo "Release branch version: $RELEASE_VERSION"
65+
echo "pyproject.toml version: $PR_VERSION"
12666
12767
# Check if versions match
12868
if [[ "$PR_VERSION" != "$RELEASE_VERSION" ]]; then
129-
echo "❌ ERROR: Version in pyproject.toml ($PR_VERSION) does not match source release branch version ($RELEASE_VERSION)"
69+
echo "❌ ERROR: Version in pyproject.toml ($PR_VERSION) does not match release branch version ($RELEASE_VERSION)"
13070
exit 1
13171
else
132-
echo "✅ Version in pyproject.toml matches source release branch version"
72+
echo "✅ Version in pyproject.toml ($PR_VERSION) matches release branch version ($RELEASE_VERSION)"
13373
fi
134-
echo "======================================="
74+
echo "======================================="

0 commit comments

Comments
 (0)