feat: Project templates by janbuchar · Pull Request #237 · apify/crawlee-python

Conversation

@janbuchar

to test this:

cookiecutter gh:apify/crawlee-python --checkout project-templates --directory templates/beautifulsoup

or even better (the --spec ... part won't be necessary after merge)

pipx run --spec git+https://github.com/apify/crawlee-python.git@project-templates crawlee create

@janbuchar janbuchar added the t-tooling

Issues with this label are in the ownership of the tooling team.

label

Jun 26, 2024

github-actions[bot]

Choose a reason for hiding this comment

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

@janbuchar janbuchar marked this pull request as ready for review

June 26, 2024 18:00

janbuchar

playwright = ["playwright"]

[tool.poetry.scripts]
crawlee = "crawlee.cli:cli"

Choose a reason for hiding this comment

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

This should enable us to do pipx run crawlee create once this hits PyPI

inquirer.List(
'template',
message='Please select the template for your new Crawlee project',
choices=[(choice[0].upper() + choice[1:], choice) for choice in template_choices],

Choose a reason for hiding this comment

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

This is not as pretty as a handwritten description, but we don't have to maintain a manifest. It sounds like an OK tradeoff to me, but I'm willing to discuss this.

inquirer.Text(
'project_name',
message='Name of the new project folder',
validate=lambda _, it: len(it) > 0,

Choose a reason for hiding this comment

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

This prevents us from using the defaults in cookiecutter.json. Not sure if that's a problem.

@janbuchar

This is still pretty barebones (see my comments), but I'd prefer to get the CLI to PyPI as quickly as possible and iterate upon that.

B4nan

Choose a reason for hiding this comment

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

gave this a quick look and i would merge it asap, better have some templates than no templates at all, we can improve over time

Labels

t-tooling

Issues with this label are in the ownership of the tooling team.

2 participants

@janbuchar @B4nan