-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Improve project bootstrapping #538
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request is neither linked to an issue or epic nor labeled as adhoc!
okay, this could use some testing now... plus there's a bunch of stuff to consider
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just a few comments
@@ -0,0 +1,12 @@ | |||
{ | |||
"project_name": "crawlee-python-beautifulsoup-project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll probably just change it to my-crawler or something.
@@ -0,0 +1,37 @@ | |||
# {{cookiecutter.project_name}} | |||
|
|||
Project skeleton generated by Crawlee (Beautifulsoup template). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it always BS?
Thanks for the review @vdusek! Do you have anything to add regarding those points for consideration? |
That is generally how pip works. I wouldn't add additional overhead here. Simply dumping the dependencies into
IMO the current setup is fine. Also, all options have default values.
That would be a nice feature, but I wouldn't prioritize it at this moment. We have a guide covering that, which should be sufficient for now.
I would suggest throwing an error. If a user wants to use Poetry, the option should be conditionally on Poetry being installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is copied, but I suggest using Hadolint and improving it according to their suggestions.
We should also pin (or at least limit to < 2) the Poetry (mostly because of python-poetry/poetry#3332).
|
||
## Usage | ||
|
||
{% if cookiecutter.package_manager == 'poetry' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this leads to 2 empty lines
## Usage | ||
|
||
{% if cookiecutter.package_manager == 'poetry' %} | ||
To get started, ensure you have [Poetry](https://python-poetry.org/), a package and dependency management system, installed on your machine. We recommend installing it with the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we wrap it to 120 line width?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Pip versions does not work
I generally agree. But how would you ensure that
It's a 15-minute adventure, the only problem is that it'd make the dialog longer. |
This adds a unified
crawler
template. The originalplaywright
andbeautifulsoup
templates are kept for compatibility with older versions of the CLI.The user is now prompted for package manager type (pip, poetry), crawler type, start URL and whether or not Apify integration should be set up.