Repository navigation
fix: Fix the Python entrypoint detection - #14
Merged
Merged
Conversation
The apify/actor-python base image ships a placeholder src/ package (its default CMD is `python -m src`) that prints "replace this file with your actual application code" - it exists in every derived image, so an Actor whose code lives elsewhere made auto-detection pick and debug the dummy. Detection now recognizes the placeholder by its marker text and skips it (falling through to main.py etc., or failing with guidance to pass the entry explicitly), and the CLI always logs which entrypoint it resolved so a wrong pick is visible in the run log. Version bumped to 0.1.1. Verified: unit scenarios for placeholder-only, placeholder-plus-real-code and real-src layouts, plus the full DAP bridge suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194oFPjsTxztgsPhyB4Wq7G
Auto-detection now scans for runnable packages by shape (any top-level directory with __main__.py) instead of assuming src/. This covers the current Apify templates (my_actor/, CMD python -m my_actor - including python-uv), the older src/ layout, and Crawlee-generated projects, whose package is named after the project (their Dockerfiles always end with CMD python -m <package>). The base-image placeholder src/ is still recognized by content and skipped; with several real candidates, src and my_actor are preferred, otherwise the log lists them and asks for an explicit -m. Ten layout scenarios covered by tests; bridge suite re-passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194oFPjsTxztgsPhyB4Wq7G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.