Skip to content

Commit

Permalink
Harmonize all packages to have sema4ai-actions 1.3.0 (#109)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Ovidiu Rusu <[email protected]>
Co-authored-by: Vlad <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2025
1 parent 3072396 commit 1c30e0c
Show file tree
Hide file tree
Showing 174 changed files with 994 additions and 519 deletions.
6 changes: 6 additions & 0 deletions actions/actions-bootstrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.0.3] - 2025-01-09

### Changed

- Dependency versions updated

## [1.0.2] - 2024-10-07

### Changed
Expand Down
11 changes: 7 additions & 4 deletions actions/actions-bootstrapper/package.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
dependencies:
conda-forge:
- python=3.10.14
- python=3.10.16
- uv=0.4.17
pypi:
- sema4ai-actions=1.0.1
- sema4ai-actions=1.3.0
- requests=2.32.3
- black=24.4.2
- black=24.10.0

name: Actions Bootstrapper

description: Actions for setting up and managing other action packages.

# Package version number, recommend using semver.org
version: 1.0.2
version: 1.0.3

# The version of the `package.yaml` format.
spec-version: v2

packaging:
exclude:
Expand Down
4 changes: 4 additions & 0 deletions actions/agent-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [2.0.1] - 2025-01-09

- Update dependencies

## [2.0.0]

- Support new version of Agent API
Expand Down
9 changes: 6 additions & 3 deletions actions/agent-connector/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ name: Agent Connector
description: Actions to connect agents with each other

# Package version number, recommend using semver.org
version: 2.0.0
version: 2.0.1

# The version of the `package.yaml` format.
spec-version: v2

# Required: A link to where the documentation on the package lives.
documentation: https://sema4.ai/

dependencies:
conda-forge:
- python=3.10.14
- python=3.10.16
- uv=0.4.17
pypi:
- sema4ai-actions=1.0.1
- sema4ai-actions=1.3.0
- requests=2.32.3

packaging:
Expand Down
6 changes: 3 additions & 3 deletions actions/bin/package-aligner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
RE_DIRECTIVE = re.compile(r"^\s*\w+:")
EXPECTED_DEPS = {
# Conda-forge deps:
"python": ("3.10.14", 1),
"python": ("3.10.16", 1),
"python-dotenv": ("1.0.1", 2),
"uv": ("0.4.17", 3),
# PyPI deps:
"sema4ai-actions": ("1.0.1", 1),
"pydantic": ("2.9.2", 2),
"sema4ai-actions": ("1.3.0", 1),
"pydantic": ("2.10.4", 2),
}
LOWEST_PRIO = sys.maxsize

Expand Down
1 change: 1 addition & 0 deletions actions/browsing/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.virtual_documents/
.vscode
.~lock*
devdata/data.csv
metadata.json
output/
temp/
Expand Down
10 changes: 10 additions & 0 deletions actions/browsing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.1.1] - 2025-01-09

### Changed

- Dependency versions updated

### Fixed

- Return type for `fill_elements` action

## [1.1.0] - 2024-11-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion actions/browsing/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def download_file(
@action(is_consequential=True)
def fill_elements(
web_page: WebPage,
) -> Response[str]:
) -> str:
"""
Fill form elements according to input values given in the Form object.
Expand Down
4 changes: 0 additions & 4 deletions actions/browsing/devdata/data.csv

This file was deleted.

13 changes: 11 additions & 2 deletions actions/browsing/devdata/input_download_file.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"inputs": [
{
"inputName": "Download CSV file",
"inputName": "Download CSV file - will be over max filesize",
"inputValue": {
"file_url": "https://mikahanninen.dev/data.csv",
"max_filesize_in_megabytes": 0,
"target_folder": ""
}
},
{
"inputName": "Download CSV file",
"inputValue": {
"file_url": "https://mikahanninen.dev/data.csv",
"target_folder": "./devdata"
}
}
],
"metadata": {
Expand All @@ -18,6 +25,8 @@
"target_folder: string: folder to download the file"
],
"managedParamsSchemaDescription": {},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: \"file_url: str, max_filesize_in_megabytes: int=100, target_folder: str=''\""
}
}
4 changes: 3 additions & 1 deletion actions/browsing/devdata/input_fill_elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
"web_page.links.links.0.text: string: The text of the link"
],
"managedParamsSchemaDescription": {},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: 'web_page: WebPage'"
}
}
4 changes: 3 additions & 1 deletion actions/browsing/devdata/input_get_website_content.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"user_agent.name: string: The user agent to use for browsing"
],
"managedParamsSchemaDescription": {},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: 'url: str, user_agent: UserAgent={}'"
}
}
11 changes: 7 additions & 4 deletions actions/browsing/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ name: Browsing
description: Get information from websites, and interact with them.

# Package version number, recommend using semver.org
version: 1.1.0
version: 1.1.1

# The version of the `package.yaml` format.
spec-version: v2

dependencies:
conda-forge:
- python=3.10.14
- python=3.10.16
- python-dotenv=1.0.1
- uv=0.4.17
pypi:
- sema4ai-actions=1.0.1
- pydantic=2.9.2
- sema4ai-actions=1.3.0
- pydantic=2.10.4
- robocorp-browser=2.3.4
- requests=2.32.3

Expand Down
10 changes: 10 additions & 0 deletions actions/email/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.0.1] - 2025-01-09

### Changed

- Dependency versions updated

### Fixed

- Argument handling for `send_email` action

## [1.0.0] - 2024-10-08

### Changed
Expand Down
35 changes: 18 additions & 17 deletions actions/email/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@

from dotenv import load_dotenv
import os
from pathlib import Path
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

load_dotenv()
load_dotenv(Path(__file__).absolute().parent / "devdata" / ".env")

DEFAULT_SMTP_PORT = "587"

@action(is_consequential=False)

@action(is_consequential=True)
def send_email(
sender: str,
to: str,
subject: str,
body: str,
smtp_host: Secret,
smtp_port: Secret,
smtp_username: Secret,
smtp_password: Secret,
cc: str = "",
bcc: str = "",
smtp_host: Secret = Secret.model_validate(os.getenv("SEMA4_SMTP_HOST", "")),
smtp_port: Secret = Secret.model_validate(os.getenv("SEMA4_SMTP_PORT", "587")),
smtp_username: Secret = Secret.model_validate(os.getenv("SEMA4_SMTP_USERNAME", "")),
smtp_password: Secret = Secret.model_validate(os.getenv("SEMA4_SMTP_PASSWORD", "")),
) -> Response[str]:
"""Send email to set recipients with subject and body using SMTP server.
Expand All @@ -47,19 +50,17 @@ def send_email(
Returns:
Text "Email sent successfully!" or error message if email sending fails
"""
if (
not smtp_host.value
or not smtp_port.value
or not smtp_username.value
or not smtp_password.value
):
host = smtp_host.value or os.getenv("SEMA4_SMTP_HOST")
smtp_port_value = (
smtp_port.value or os.getenv("SEMA4_SMTP_PORT") or DEFAULT_SMTP_PORT
)
username = smtp_username.value or os.getenv("SEMA4_SMTP_USERNAME")
password = smtp_password.value or os.getenv("SEMA4_SMTP_PASSWORD")

if not host or not smtp_port_value or not username or not password:
raise ActionError("SMTP server details are missing.")
# Email server details
host = smtp_host.value
port = int(smtp_port.value)
username = smtp_username.value
password = smtp_password.value

port = int(smtp_port_value)
# Create list of all recipients (including BCC)
recipients = to.split(",")

Expand Down
17 changes: 10 additions & 7 deletions actions/email/devdata/input_send_email.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
{
"inputName": "input-1",
"inputValue": {
"to": "TARGET_EMAIL_ADDRESS",
"sender": "[email protected]",
"to": "[email protected]",
"subject": "Email subject",
"body": "Email body message",
"cc": "",
"bcc": "",
"smtp_host": "<specify-secret>",
"smtp_port": "<specify-secret>",
"smtp_username": "<specify-secret>",
"smtp_password": "<specify-secret>"
"smtp_host": "",
"smtp_port": "",
"smtp_username": "",
"smtp_password": ""
}
}
],
Expand Down Expand Up @@ -44,6 +45,8 @@
"description": "SMTP server password"
}
},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: \"sender: str, to: str, subject: str, body: str, smtp_host: Secret, smtp_port: Secret, smtp_username: Secret, smtp_password: Secret, cc: str='', bcc: str=''\""
}
}
}
11 changes: 7 additions & 4 deletions actions/email/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ name: Email sending
description: Base actions needed to send emails using any SMTP service.

# Package version number, recommend using semver.org
version: 1.0.0
version: 1.0.1

# The version of the `package.yaml` format.
spec-version: v2

dependencies:
conda-forge:
- python=3.10.14
- python=3.10.16
- python-dotenv=1.0.1
- uv=0.4.17
pypi:
- sema4ai-actions=1.0.1
- pydantic=2.9.2
- sema4ai-actions=1.3.0
- pydantic=2.10.4

packaging:
# By default, all files and folders in this directory are packaged when uploaded.
Expand Down
6 changes: 6 additions & 0 deletions actions/excel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/).

## [3.1.1] - 2025-01-09

### Changed

- Dependency versions updated

## [3.1.0] - 2024-12-12

### Added
Expand Down
9 changes: 6 additions & 3 deletions actions/excel/devdata/input_add_rows.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"rows": [
{
"cells": [
"1", "Japan"
"1",
"Japan"
]
}
]
Expand All @@ -28,6 +29,8 @@
"data_table.rows.0.cells.0: string: Row cells"
],
"managedParamsSchemaDescription": {},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: 'file_path: str, sheet_name: str, data_table: Table'"
}
}
}
6 changes: 4 additions & 2 deletions actions/excel/devdata/input_create_workbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"sheet_name: string: The name of the initial sheet in the workbook. Leave it blank for\nrelying on the default name (\"Sheet\")."
],
"managedParamsSchemaDescription": {},
"inputFileVersion": "v2"
"inputFileVersion": "v3",
"kind": "action",
"actionSignature": "action/args: \"file_path: str, sheet_name: str=''\""
}
}
}
Loading

0 comments on commit 1c30e0c

Please sign in to comment.