-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into OPIK-653
- Loading branch information
Showing
133 changed files
with
3,204 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "Backend Formatting Check" | ||
run-name: "Backend Formatting Check on ${{ github.ref_name }} by @${{ github.actor }}" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "apps/opik-backend/**/*.java" | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "apps/opik-backend/**/*.java" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
run-backend-formatting-check: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: apps/opik-backend/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "21" | ||
distribution: "corretto" | ||
cache: maven | ||
|
||
- name: Run Formatting Check for backend | ||
run: mvn clean spotless:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Documentation - Test codeblocks | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
install_opik: | ||
description: 'Enable opik installation from source files' | ||
required: false | ||
default: 'false' | ||
type: choice | ||
options: | ||
- 'false' | ||
- 'true' | ||
pull_request: | ||
paths: | ||
- 'apps/opik-documentation/documentation/docs/*.md' | ||
- 'apps/opik-documentation/documentation/docs/*.mdx' | ||
- 'apps/opik-documentation/documentation/docs/**/*.md' | ||
- 'apps/opik-documentation/documentation/docs/**/*.mdx' | ||
|
||
jobs: | ||
collect_test_paths: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
test_paths: ${{ steps.paths.outputs.paths }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for git diff | ||
|
||
- id: paths | ||
working-directory: apps/opik-documentation/documentation | ||
run: | | ||
# Get list of changed files in docs directory | ||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
# For pull requests, compare with base branch | ||
echo "paths=$( | ||
git diff --name-only origin/${{ github.base_ref }} | | ||
grep -E '^apps/opik-documentation/documentation/docs/.*\.(md|mdx)$' | | ||
sed 's|apps/opik-documentation/documentation/||' | | ||
jq -R -s -c 'split("\n")[:-1]' | ||
)" >> $GITHUB_OUTPUT | ||
else | ||
# For manual runs and scheduled runs, check all files | ||
echo "paths=$( | ||
( | ||
ls -d docs/*/ 2>/dev/null; | ||
find docs -maxdepth 1 -type f -name "*.md" -o -name "*.mdx" | ||
) | jq -R -s -c 'split("\n")[:-1]' | ||
)" >> $GITHUB_OUTPUT | ||
fi | ||
test: | ||
needs: collect_test_paths | ||
runs-on: ubuntu-latest | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.DOCS_OPENAI_API_KEY }} | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
OPIK_WORKSPACE: ${{ secrets.COMET_WORKSPACE }} | ||
OPIK_API_KEY: ${{ secrets.COMET_API_KEY }} | ||
strategy: | ||
matrix: | ||
path: ${{ fromJson(needs.collect_test_paths.outputs.test_paths) }} | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
working-directory: apps/opik-documentation/documentation | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r requirements.txt | ||
if [ "${{ github.event.inputs.install_opik }}" = "true" ]; then | ||
pip install -e . | ||
fi | ||
- name: Run tests | ||
working-directory: apps/opik-documentation/documentation | ||
run: | | ||
if [ -n "${{ matrix.path }}" ]; then | ||
pytest ${{ matrix.path }} -v --suppress-no-test-exit-code | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
apps/opik-backend/src/main/java/com/comet/opik/api/AutomationRuleEvaluatorCriteria.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.comet.opik.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.Builder; | ||
|
||
import java.util.Set; | ||
import java.util.UUID; | ||
|
||
@Builder(toBuilder = true) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public record AutomationRuleEvaluatorCriteria( | ||
AutomationRuleEvaluatorType type, | ||
String name, | ||
Set<UUID> ids) { | ||
|
||
public AutomationRule.AutomationRuleAction action() { | ||
return AutomationRule.AutomationRuleAction.EVALUATOR; | ||
} | ||
} |
Oops, something went wrong.