Skip to content

Commit

Permalink
Merge pull request #5 from theam/sync-opik-17-02-2025
Browse files Browse the repository at this point in the history
Sync Opik 17 02 2025
  • Loading branch information
alvaroloes authored Feb 17, 2025
2 parents 0a0e143 + cd415e5 commit f4fab66
Show file tree
Hide file tree
Showing 441 changed files with 12,065 additions and 28,516 deletions.
27 changes: 3 additions & 24 deletions .github_fork/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deploy Opik docs
run-name: Deploy docs ${{ github.ref_name }} to S3 ${{ inputs.environment }} by @${{ github.actor }}
name: Deploy Opik Python SDK docs
run-name: Deploy Python SDK docs ${{ github.ref_name }} to S3 ${{ inputs.environment }} by @${{ github.actor }}

on:
workflow_dispatch:
Expand All @@ -19,35 +19,14 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: Build docs
- name: Build Python SDK docs
run: |
echo "Build documentation"
cd apps/opik-documentation/documentation
pip install -r requirements.txt
npm install
npm run build
cd -
echo "Build sdk documentation"
cd apps/opik-documentation/python-sdk-docs
pip install -r requirements.txt
pip install ../../../sdks/python
make build
cd -
env:
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
- name: Upload docs to S3 ${{ inputs.environment }}
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '.git*'
env:
AWS_S3_BUCKET: site.comet.com
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
DEST_DIR: ${{ inputs.environment }}/docs-opik
SOURCE_DIR: apps/opik-documentation/documentation/build

- name: Upload sdk docs to S3 ${{ inputs.environment }}
uses: jakejarvis/s3-sync-action@master
with:
Expand Down
40 changes: 40 additions & 0 deletions .github_fork/workflows/deploy_python_sdk_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Opik Python SDK docs
run-name: Deploy Python SDK docs ${{ github.ref_name }} to S3 ${{ inputs.environment }} by @${{ github.actor }}

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Choose environment
options:
- staging
- production
- development
jobs:
upload:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: checkout
uses: actions/checkout@v4

- name: Build Python SDK docs
run: |
echo "Build sdk documentation"
cd apps/opik-documentation/python-sdk-docs
pip install -r requirements.txt
pip install ../../../sdks/python
make build
- name: Upload sdk docs to S3 ${{ inputs.environment }}
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '.git*'
env:
AWS_S3_BUCKET: site.comet.com
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
DEST_DIR: ${{ inputs.environment }}/docs-opik/python-sdk-reference
SOURCE_DIR: apps/opik-documentation/python-sdk-docs/build/html
10 changes: 5 additions & 5 deletions .github_fork/workflows/documentation_codeblock_tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Documentation - Test codeblocks
name: Docs - Test codeblocks
on:
workflow_dispatch:
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'
- 'apps/opik-documentation/documentation/fern/docs/*.md'
- 'apps/opik-documentation/documentation/fern/docs/*.mdx'
- 'apps/opik-documentation/documentation/fern/docs/**/*.md'
- 'apps/opik-documentation/documentation/fern/docs/**/*.mdx'

jobs:
collect_test_paths:
Expand Down
2 changes: 1 addition & 1 deletion .github_fork/workflows/documentation_cookbook_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Documentation - Test cookbooks
name: Docs - Test cookbooks
on:
workflow_dispatch:
inputs:
Expand Down
27 changes: 27 additions & 0 deletions .github_fork/workflows/documentation_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docs - Publish

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'apps/opik-documentation/documentation/**'

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for git diff

- name: Install Fern
run: npm install -g fern-api

- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
cd apps/opik-documentation/documentation
fern generate --docs
32 changes: 32 additions & 0 deletions .github_fork/workflows/documentation_image_optimizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docs - Compress Images
on:
workflow_dispatch:
pull_request:
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
paths:
[
"apps/opik-documentation/documentation/fern/img/**.jpg",
"apps/opik-documentation/documentation/fern/img/**.jpeg",
"apps/opik-documentation/documentation/fern/img/**.png",
"apps/opik-documentation/documentation/fern/img/**.webp",
]
jobs:
build:
# Only run on non-draft PRs within the same repository.
if:
github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.draft
== false
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/[email protected]

- name: Compress Images
uses: calibreapp/[email protected]
with:
# The `GITHUB_TOKEN` is automatically generated by GitHub and scoped only to the repository that is currently running the action. By default, the action can’t update Pull Requests initiated from forked repositories.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow and https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions
githubToken: ${{ secrets.GITHUB_TOKEN }}
ignorePaths: "apps/opik-frontend/**,apps/opik-backend/**,apps/opik-python-backend/**"
34 changes: 34 additions & 0 deletions .github_fork/workflows/documentation_preview_link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docs - Preview link

on:
pull_request:
paths:
- 'apps/opik-documentation/documentation/**'

jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Generate preview URL
id: generate-docs
working-directory: apps/opik-documentation/documentation
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
OUTPUT=$(fern generate --docs --preview 2>&1) || true
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "Preview URL: $URL"
echo "🌿 Preview your docs: $URL" > preview_url.txt
- name: Comment URL in PR
uses: thollander/[email protected]
with:
filePath: apps/opik-documentation/documentation/preview_url.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish TypeScript SDK
name: TypeScript SDK Publish
run-name: "TypeScript SDK Publish from ${{github.ref_name}} by @${{ github.actor }}"

on:
workflow_dispatch:
Expand All @@ -23,7 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: main
fetch-depth: 0
token: ${{ secrets.GH_PAT_TO_ACCESS_GITHUB_API }}

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -42,15 +45,19 @@ jobs:

- name: Commit version changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "github-actions@comet.com"
git config --local user.name "github-actions"
git add package.json package-lock.json
git commit -m "chore: bump typescript sdk version to $(node -p "require('./package.json').version")"
git commit -m "Update TypeScript SDK version to $(node -p "require('./package.json').version")"
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Push changes
run: git push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT_TO_ACCESS_GITHUB_API }}
branch: ${{ github.ref }}
force_with_lease: true
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ Please see instructions in `deployment/docker-compose/README.md`

### Contributing to the documentation

The documentation is made up of three main parts:
The documentation is made up of two main parts:

1. `apps/opik-documentation/documentation`: The Opik documentation website
2. `apps/opik-documentation/python-sdk-docs`: The Python reference documentation
3. `apps/opik-documentation/rest-api-docs`: The REST API reference documentation

#### Contributing to the documentation website

The documentation website is built using [Docusaurus](https://docusaurus.io/) and is located in `apps/opik-documentation/documentation`.
The documentation website is built using [Fern](https://www.buildwithfern.com/) and is located in `apps/opik-documentation/documentation`.

In order to run the documentation website locally, you need to have `npm` installed. Once installed, you can run the documentation locally using the following command:

Expand All @@ -78,6 +77,12 @@ npm run dev

You can then access the documentation website at `http://localhost:3000`. Any change you make to the documentation will be updated in real-time.

When updating the documentation, you will need to update either:

- `docs/cookbook`: This is where all our cookbooks are located.
- `fern/docs`: This is where all the markdown code is stored and where the majority of the documentation is located.


#### Contributing to the Python SDK reference documentation

The Python SDK reference documentation is built using [Sphinx](https://www.sphinx-doc.org/en/master/) and is located in `apps/opik-documentation/python-sdk-docs`.
Expand Down
39 changes: 22 additions & 17 deletions apps/opik-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<dropwizard.version>4.0.7</dropwizard.version>
<swagger.version>2.2.22</swagger.version>
<lombok.version>1.18.32</lombok.version>
<dropwizard.version>4.0.12</dropwizard.version>
<swagger.version>2.2.28</swagger.version>
<lombok.version>1.18.36</lombok.version>
<mysql.version>9.2.0</mysql.version>
<dropwizard-guicey.version>7.1.3</dropwizard-guicey.version>
<stringtemplate.version>3.47.0</stringtemplate.version>
<dropwizard-guicey.version>7.1.4</dropwizard-guicey.version>
<stringtemplate.version>3.48.0</stringtemplate.version>
<jakarta.annotation.version>3.0.0</jakarta.annotation.version>
<liquibase-clickhouse.version>0.7.2</liquibase-clickhouse.version>
<clickhouse-java.version>0.7.2</clickhouse-java.version>
<org.mapstruct.version>1.6.2</org.mapstruct.version>
<testcontainers.version>1.20.2</testcontainers.version>
<clickhouse-java.version>0.8.1</clickhouse-java.version>
<org.mapstruct.version>1.6.3</org.mapstruct.version>
<testcontainers.version>1.20.4</testcontainers.version>
<uuid.java.generator.version>5.1.0</uuid.java.generator.version>
<wiremock.version>3.10.0</wiremock.version>
<wiremock.version>3.12.0</wiremock.version>
<redisson.version>3.44.0</redisson.version>
<opentelmetry.version>2.12.0</opentelmetry.version>
<aws.java.sdk.version>2.30.2</aws.java.sdk.version>
<opentelmetry.version>2.13.0</opentelmetry.version>
<aws.java.sdk.version>2.30.21</aws.java.sdk.version>
<json-path.version>2.9.0</json-path.version>
<mainClass>com.comet.opik.OpikApplication</mainClass>
</properties>
Expand Down Expand Up @@ -92,7 +92,7 @@
<dependency>
<groupId>software.amazon.jdbc</groupId>
<artifactId>aws-advanced-jdbc-wrapper</artifactId>
<version>2.5.0</version>
<version>2.5.4</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
Expand Down Expand Up @@ -196,7 +196,12 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.3</version>
<version>5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>org.mvel</groupId>
Expand Down Expand Up @@ -300,7 +305,7 @@
<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse-java.version}</version>
<version>0.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -311,7 +316,7 @@
<dependency>
<groupId>com.redis</groupId>
<artifactId>testcontainers-redis</artifactId>
<version>2.2.2</version>
<version>2.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -353,12 +358,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.1</version>
<version>3.11.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Loading

0 comments on commit f4fab66

Please sign in to comment.