Skip to content

Fix entry point format to use standard module.path:attribute convention #262

@FernandoCelmer

Description

@FernandoCelmer

Problem

The Module.import_module() method in dotflow/core/module.py uses rpartition(".") to split the entry point string:

module_path, _, attr_name = value.rpartition(".")

This forces the format module.path.attribute (all dots), which diverges from the Python packaging standard used by every major Python tool (Gunicorn, Uvicorn, Celery, setuptools, pyproject.toml).

Standard format

The Python ecosystem standard is module.path:attribute — dots for the module path, colon as separator before the attribute:

Tool Example
Gunicorn main:app
Uvicorn package.module:app
Celery proj.celery:app
setuptools mymodule:main
Python spec importable.module:object.attr

Reference: https://packaging.python.org/specifications/entry-points/

Fix

Change rpartition(".") to rpartition(":") in dotflow/core/module.py:

module_path, _, attr_name = value.rpartition(":")

Impact

  • CLI usage changes from dotflow start --step my_module.my_step to dotflow start --step my_module:my_step
  • Breaking change — requires updating all examples and docs

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions