Skip to content

πŸͺ² BUG-#262: Fix entry point separator to use standard module.path:attribute format#263

Merged
FernandoCelmer merged 21 commits intodevelopfrom
feature/262
Apr 14, 2026
Merged

πŸͺ² BUG-#262: Fix entry point separator to use standard module.path:attribute format#263
FernandoCelmer merged 21 commits intodevelopfrom
feature/262

Conversation

@FernandoCelmer
Copy link
Copy Markdown
Member

@FernandoCelmer FernandoCelmer commented Apr 14, 2026

Description

Changes the entry point separator in from to to align with Python's standard packaging convention for module entry points. This change affects how the CLI parses and executes module attributes.

Modified files:

    • Updated partition logic
  • Test files - Updated to use new format

Motivation and Context

This change standardizes dotflow's entry point format to match Python's industry-standard module entry point specification (PEP 440 and setuptools conventions). The colon separator () is the standard delimiter used by Python packaging tools, making dotflow more aligned with ecosystem conventions.

Closes #262

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change

Breaking Change Notice

CLI usage changes:

  • Old format: dotflow start --step my_module.my_step
  • New format: dotflow start --step my_module:my_step

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly (open issue)

Copy link
Copy Markdown
Member Author

@FernandoCelmer FernandoCelmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ” Code Review

Code issues found: 3

# Severity Comment
1 [Blocking] Docs and examples use stale dot format
2 [Blocking] ImportModuleError gives misleading message
3 [Suggestion] Test does not distinguish separator error from attribute error

Comment thread dotflow/core/module.py
Comment thread tests/core/test_task.py
@FernandoCelmer
Copy link
Copy Markdown
Member Author

[Blocking]

Problem β€” This PR changes the entry point separator from . to : in Module.import_module(), but all documentation and runnable example files still use the old dot-only format. After this PR merges, every documented example will immediately fail with ImportModuleError.

Files not updated:

Runnable examples (docs_src/):

  • docs_src/basic/simple_cli.py β€” calls os.system("dotflow start --step docs_src.basic.simple_cli.simple_step")
  • docs_src/cli/cli_with_callback.py β€” os.system("dotflow start --step docs_src.cli.cli_with_callback.simple_step --callback docs_src.cli.cli_with_callback.callback")
  • docs_src/cli/cli_with_initial_context.py, cli_with_mode.py, cli_with_output_context.py, cli_with_workflow.py

Documentation guides (docs/):

  • docs/nav/how-to/cli/simple-start.md
  • docs/nav/how-to/cli/with-callback.md
  • docs/nav/how-to/cli/with-initial-context.md
  • docs/nav/how-to/cli/with-custom-path.md
  • docs/nav/how-to/cli/with-workflow.md
  • docs/nav/examples/cli.md

Failure scenario β€” A new user opens the docs, copies the first example, and runs:

dotflow start --step docs_src.basic.simple_cli.simple_step

They get:

ImportModuleError: Error importing Python module 'docs_src.basic.simple_cli.simple_step'.

No hint that they need to change it to docs_src.basic.simple_cli:simple_step.

Fix β€” Update all affected files to use the colon separator. Each os.system() call and every CLI snippet in the docs needs to change from:

# Before (broken after this PR)
dotflow start --step my.module.my_function

# After (correct)
dotflow start --step my.module:my_function

This is a blocking issue because the docs and runnable examples are the primary onboarding path for new users.

@FernandoCelmer FernandoCelmer added bug Something isn't working significant Significant severity labels Apr 14, 2026
@FernandoCelmer FernandoCelmer merged commit 5cd40cf into develop Apr 14, 2026
10 checks passed
@FernandoCelmer FernandoCelmer deleted the feature/262 branch April 14, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working significant Significant severity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant