actor-templates icon indicating copy to clipboard operation
actor-templates copied to clipboard

Update python templates to use package folder instead of src folder

Open Pijukatel opened this issue 9 months ago • 6 comments

Do not have src fodler in the templates, but rather use package name like it is done in crawlee templates.

Will be done instead of this: https://github.com/apify/crawlee-python/issues/1113 after cli issue is resolved.

Pijukatel avatar Mar 24 '25 11:03 Pijukatel

Please update the make's type-check command once this is done -> Makefile#L15:L26.

vdusek avatar Mar 24 '25 11:03 vdusek

should be unblocked today

B4nan avatar Apr 22 '25 09:04 B4nan

There are still some unresolved issues with apify run that will manifest when not using src folder. Those should be resolved before we change templates https://github.com/apify/apify-cli/issues/766 https://github.com/apify/apify-cli/issues/796

Pijukatel avatar May 06 '25 08:05 Pijukatel

cc @vladfrangu

B4nan avatar May 06 '25 08:05 B4nan

FWIW, some (many?) Python project layouts have a src directory: https://www.youtube.com/watch?v=mFyE9xgeKcA But that directory is not a package and src is never a package name. It's a technicality in how the files are structured, but in Python, the filesystem != the package structure.

honzajavorek avatar May 14 '25 14:05 honzajavorek

Well, I am not myself in rush to do this issue. Main concern was to make apify cli work correctly both for crawlee based templates and the template repo templates. That is already done and this story was not even needed. I would wait with this story unless more benefits are clear. Currently I can't think of any serious advantage.

Pijukatel avatar Jun 19 '25 13:06 Pijukatel