Skip to content

Export File field #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "workflowai"
version = "0.3.3"
version = "0.3.4"
description = ""
authors = ["Guillaume Aquilina <[email protected]>"]
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions workflowai/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from workflowai.core.fields.chat_message import ChatMessage as ChatMessage
from workflowai.core.fields.email_address import EmailAddressStr as EmailAddressStr
from workflowai.core.fields.file import File as File
from workflowai.core.fields.html_string import HTMLString as HTMLString
from workflowai.core.fields.http_url import HttpUrl as HttpUrl
from workflowai.core.fields.image import Image as Image
Expand Down
18 changes: 18 additions & 0 deletions workflowai/fields_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os

from workflowai import fields


def test_exported_fields_match_core_fields():
# Get the number of exported fields in fields.py
exported_fields = {attr for attr in dir(fields) if not attr.startswith("_")}

# Get the number of files in workflowai/core/fields
core_fields_dir = os.path.join(os.path.dirname(__file__), "core", "fields")
core_field_files = {
"".join(word.capitalize() for word in f.removesuffix(".py").split("_"))
for f in os.listdir(core_fields_dir)
if f.endswith(".py") and f != "__init__.py" and not f.endswith("_test.py")
}

assert len(core_field_files) == len(exported_fields)
Loading