-
Notifications
You must be signed in to change notification settings - Fork 72
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
Conversation
@@ -1,63 +1,32 @@ | |||
--- |
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 is where the actual lesson content is updated.
tutorials/create-python-package.md
Outdated
|
||
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: |
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.
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. |
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.
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`. |
>>> from pyospackage.example import add_numbers | ||
>>> add_numbers(1, 2) |
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 call
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.
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.
Co-authored-by: Jonny Saunders <sneakers-the-rat@protonmail.com>
Co-authored-by: Jonny Saunders <sneakers-the-rat@protonmail.com>
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! |
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.