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

removed class and spellchecked #71

Merged

Conversation

callumrollo
Copy link
Contributor

Closes #65

Summary of changes:

  • Simplified example code
  • Squashed some typos
  • Added more explanation, including a tree diagram of the package we make
  • Added an exercise

Still quite a bit of work to do on this lesson, but I'll try to break further work upit into multiple PRs.

@brownsarahm
Copy link
Collaborator

This is great! I am going to make some minor revisions before accepting, but I want to let you know that the overall direction is wonderful.

thank you for planning to split contiributions over multiple prs.

@callumrollo
Copy link
Contributor Author

No worries! Sorry it's so scruffy. Haven't figured out how to build it locally to preview the webpages yet. I'll wait for revisions on this one before building the next PR

@tobyhodges
Copy link
Member

@callumrollo the Setup page of the Lesson Example includes instructions for configuring your system for local builds. If you run into trouble following those, feel free to reach out on The Carpentries Slack or by email (tobyhodges at carpentries dot org).

@callumrollo
Copy link
Contributor Author

Thanks @tobyhodges got Ruby installed and serving. Will check webpages renders before future PRs

@callumrollo
Copy link
Contributor Author

After rendering the page locally, I've caught some more typos/phrasing and brought the formatting more in line with other carpentries lessons. Hopefully less revisions for you @brownsarahm

My edits end at section Command Line Tools. Further work for future PRs.

Copy link
Collaborator

@brownsarahm brownsarahm left a comment

Choose a reason for hiding this comment

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

This is great! I made a few minor edits and had a few questions.

_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
_episodes/03-packaging-installing.md Outdated Show resolved Hide resolved
folder a module, but by adding code, we can make our package easier to use.
The init file is the map that tells python what our package looks like. It is
also what tells Python a directory is a module. An empty init file marks a
directory as a module. By adding import code, we can make our package easier to use.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to demonstrate what init does by trying to use it without? and then add it and use with?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would be take some explaining. I'm pretty sure Python 3.3 + can import from folders without an init. The init file only really becomes essential once we make a package and ship to PyPI. In this case it may be simpler to just always include the init.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was thinking an example of how imports can change with the init, like, reducing the levels of the imports eg how you can use the package.module once you have init or even package.function() if the depending on the contents of the init file? In pilots of this workshop (and in working with students in research ) they tend to struggle with what to put in the init file, other than pattern matching what's already there.

@callumrollo
Copy link
Contributor Author

Other than the discussion about init I hope I've addressed all the issues. Sorry for making such a big PR! I'll work in smaller steps next time

@brownsarahm
Copy link
Collaborator

brownsarahm commented Mar 16, 2021

I think I want to merge this and continue the init discussion separately, so I created a new issue(#72 ) with my last comment above. Thanks so much for this great improvement.

I will merge after the docstrings are all numpydoc style.

@callumrollo
Copy link
Contributor Author

Thanks, I've updated to numpy docstrings. Should be ready to roll

@brownsarahm
Copy link
Collaborator

🎉 thanks so much!

@brownsarahm brownsarahm merged commit 8ed7383 into carpentries-incubator:gh-pages Mar 17, 2021
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.

Improve example code in 03-packaging-installing
3 participants