feat: Project templates by janbuchar · Pull Request #237 · apify/crawlee-python
Conversation
- closes Project bootstrapping #215
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
label
Jun 26, 2024Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
janbuchar
marked this pull request as ready for review
| 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.
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.
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
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