Skip to content

Commit

Permalink
chore: enhance configuration descriptions (#8624)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn authored Sep 22, 2024
1 parent 97895ec commit ddf6569
Show file tree
Hide file tree
Showing 30 changed files with 343 additions and 336 deletions.
12 changes: 6 additions & 6 deletions api/configs/deploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@

class DeploymentConfig(BaseSettings):
"""
Deployment configs
Configuration settings for application deployment
"""

APPLICATION_NAME: str = Field(
description="application name",
description="Name of the application, used for identification and logging purposes",
default="langgenius/dify",
)

DEBUG: bool = Field(
description="whether to enable debug mode.",
description="Enable debug mode for additional logging and development features",
default=False,
)

TESTING: bool = Field(
description="",
description="Enable testing mode for running automated tests",
default=False,
)

EDITION: str = Field(
description="deployment edition",
description="Deployment edition of the application (e.g., 'SELF_HOSTED', 'CLOUD')",
default="SELF_HOSTED",
)

DEPLOY_ENV: str = Field(
description="deployment environment, default to PRODUCTION.",
description="Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION",
default="PRODUCTION",
)
6 changes: 3 additions & 3 deletions api/configs/enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

class EnterpriseFeatureConfig(BaseSettings):
"""
Enterprise feature configs.
Configuration for enterprise-level features.
**Before using, please contact [email protected] by email to inquire about licensing matters.**
"""

ENTERPRISE_ENABLED: bool = Field(
description="whether to enable enterprise features."
description="Enable or disable enterprise-level features."
"Before using, please contact [email protected] by email to inquire about licensing matters.",
default=False,
)

CAN_REPLACE_LOGO: bool = Field(
description="whether to allow replacing enterprise logo.",
description="Allow customization of the enterprise logo.",
default=False,
)
13 changes: 7 additions & 6 deletions api/configs/extra/notion_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@

class NotionConfig(BaseSettings):
"""
Notion integration configs
Configuration settings for Notion integration
"""

NOTION_CLIENT_ID: Optional[str] = Field(
description="Notion client ID",
description="Client ID for Notion API authentication. Required for OAuth 2.0 flow.",
default=None,
)

NOTION_CLIENT_SECRET: Optional[str] = Field(
description="Notion client secret key",
description="Client secret for Notion API authentication. Required for OAuth 2.0 flow.",
default=None,
)

NOTION_INTEGRATION_TYPE: Optional[str] = Field(
description="Notion integration type, default to None, available values: internal.",
description="Type of Notion integration."
" Set to 'internal' for internal integrations, or None for public integrations.",
default=None,
)

NOTION_INTERNAL_SECRET: Optional[str] = Field(
description="Notion internal secret key",
description="Secret key for internal Notion integrations. Required when NOTION_INTEGRATION_TYPE is 'internal'.",
default=None,
)

NOTION_INTEGRATION_TOKEN: Optional[str] = Field(
description="Notion integration token",
description="Integration token for Notion API access. Used for direct API calls without OAuth flow.",
default=None,
)
11 changes: 7 additions & 4 deletions api/configs/extra/sentry_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@

class SentryConfig(BaseSettings):
"""
Sentry configs
Configuration settings for Sentry error tracking and performance monitoring
"""

SENTRY_DSN: Optional[str] = Field(
description="Sentry DSN",
description="Sentry Data Source Name (DSN)."
" This is the unique identifier of your Sentry project, used to send events to the correct project.",
default=None,
)

SENTRY_TRACES_SAMPLE_RATE: NonNegativeFloat = Field(
description="Sentry trace sample rate",
description="Sample rate for Sentry performance monitoring traces."
" Value between 0.0 and 1.0, where 1.0 means 100% of traces are sent to Sentry.",
default=1.0,
)

SENTRY_PROFILES_SAMPLE_RATE: NonNegativeFloat = Field(
description="Sentry profiles sample rate",
description="Sample rate for Sentry profiling."
" Value between 0.0 and 1.0, where 1.0 means 100% of profiles are sent to Sentry.",
default=1.0,
)
Loading

0 comments on commit ddf6569

Please sign in to comment.