Skip to content

fix: rename tutorial and update to use template #527

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

Merged
merged 6 commits into from
Jul 3, 2025

Conversation

lwasser
Copy link
Member

@lwasser lwasser commented Jul 1, 2025

I am making 1 bigg-ish change here and then updating the tutorial to use our packaging template.
the big change is a file rename which impacted links throughout.

@@ -1,63 +1,32 @@
---
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where the actual lesson content is updated.


If you are following along and making a Python package from scratch then you can add the code below to your `add_numbers.py` module. The function below adds two integers together and returns the result. Notice that the code below has a few features that we will review in future tutorials:
Notice that the code in the example.py modulf, has a few features:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Notice that the code in the example.py modulf, has a few features:
Notice that the code in the example.py module, has a few features:

@@ -547,15 +390,17 @@ mode) you can use:
Above, you use`python -m` to call the version of pip installed into your
current active environment. `python -m` is important to ensure that you are
calling the version of pip installed in your current environment.

IMPORTANT: pip can also be used to install packages from PyPI. However, in this case, you are telling pip to install your package from a local folder by using the `.`. You could also specify a path to the project directory on your computer instead of the `.` which tells pip to use the current working directory.
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat Jul 2, 2025

Choose a reason for hiding this comment

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

Suggested change
IMPORTANT: pip can also be used to install packages from PyPI. However, in this case, you are telling pip to install your package from a local folder by using the `.`. You could also specify a path to the project directory on your computer instead of the `.` which tells pip to use the current working directory.
IMPORTANT: pip can also be used to install packages from PyPI. However, in this case, you are telling pip to install your package from a local folder by using the `.`, which is a shorthand for the current directory. You could also specify a path to a package in a different directory on your computer like `python -m pip install /home/me/another_package`.

Comment on lines +442 to +443
>>> from pyospackage.example import add_numbers
>>> add_numbers(1, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

good call

Copy link
Member Author

Choose a reason for hiding this comment

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

Yay! glad you like that. I thought it would be awesome to give folks a ready-to-go package that they can then customize. I learn better that way. Then, in the workshop, we will have a huge win in the first 30 minutes! People who didn't get the package running until the end last year, will be able to keep up even if they don't customize too much.

lwasser and others added 4 commits July 3, 2025 15:18
Co-authored-by: Jonny Saunders <sneakers-the-rat@protonmail.com>
Co-authored-by: Jonny Saunders <sneakers-the-rat@protonmail.com>
@lwasser
Copy link
Member Author

lwasser commented Jul 3, 2025

The failure here is that create-python-package as a URL doesn't exist - yet. but it will once we merge this. So i am going to merge!

@lwasser lwasser merged commit 017c59c into pyOpenSci:main Jul 3, 2025
3 of 4 checks passed
@lwasser lwasser deleted the copier branch July 3, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants