Skip to content
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

Merged
merged 9 commits into from
Apr 15, 2024

Conversation

miguelalizo
Copy link
Contributor

Addresses #210 by creating the tutorial for migrating from setup.py to pyproject.toml using Hatch.

…'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.
Copy link
Collaborator

@willingc willingc left a 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

tutorials/setup-py-to-pyproject-toml.md Outdated Show resolved Hide resolved
tutorials/setup-py-to-pyproject-toml.md Outdated Show resolved Hide resolved
tutorials/setup-py-to-pyproject-toml.md Show resolved Hide resolved
Copy link
Collaborator

@ucodery ucodery left a comment

Choose a reason for hiding this comment

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

Looking really good!

Comment on lines 103 to 105
```bash
rm setup.py
```
Copy link
Collaborator

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Collaborator

@ucodery ucodery left a 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

Copy link
Member

@lwasser lwasser left a 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!!

@lwasser lwasser merged commit 37a8d5e into pyOpenSci:main Apr 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants