-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add: Tutorial for migrating from setup.py to pyproject.toml using Hatch #229
Conversation
…'s existing setup.py can be migrated to a pyproject.toml using Hatch. Update tutorials/installable-code.md to add a note about this specific use case for Hatch. Update tutorials/intro.md to add setup-py-to-pyproject-toml.md to toctree.
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.
Looking good. Thanks @miguelalizo
…his guide instead of pip install
…and running any preexisting tests.
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.
Looking really good!
```bash | ||
rm setup.py | ||
``` |
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.
IMO we don't need to add bash examples for every step. Especially as some readers won't want to do everything in the terminal.
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 agree. I removed some of these and left only a couple of hatch specific ones.
@@ -88,3 +95,25 @@ Now, let's walk through the steps to use Hatch to create a `pyproject.toml` file | |||
3. **Review and Customize**: After running the previous command, Hatch will automatically generate a `pyproject.toml` file based on your existing project configuration. Take some time to review the contents of the generated `pyproject.toml` file. You may want to customize certain settings or dependencies based on your project's requirements (see [pyproject.toml tutorial](pyproject-toml.md) for more information about the `pyproject.toml`). | |||
|
|||
4. **Verify**: Verify that the `pyproject.toml` file accurately reflects your project configuration and dependencies. You can manually edit the file if needed, but be cautious and ensure that the syntax is correct. | |||
|
|||
### Step 5: Delete setup.py |
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 guide switches from an ordered list to numbered headers. Let's stick to one style.
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 catch! Thanks for pointing it out. Just fixed it to be consistent
… the step-by-step guide and remove some of the more simple bash commands, only leaving the necessary ones.
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.
Thanks for the edit
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.
Two approvals. we can merge this as well! in the future maybe we can have a demo repo with a setup.py file that people can play with. but for now let's get this merged!! many many thanks everyone for your effort on this!!
Addresses #210 by creating the tutorial for migrating from setup.py to pyproject.toml using Hatch.