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

Package-template materials? #2

Open
kelle opened this issue Oct 31, 2019 · 1 comment
Open

Package-template materials? #2

kelle opened this issue Oct 31, 2019 · 1 comment

Comments

@kelle
Copy link
Contributor

kelle commented Oct 31, 2019

You mentioned that folks really liked the bit about releasing your own python package using the astropy package-template. Do you have any materials in this repo showing how you did that lesson?

@bmorris3
Copy link
Owner

I've given packaging tutorials three times at UW (2016), Exeter and Bern (2019). One resource I distribute while teaching is this little gist which contains some useful links on packaging.

Here's a rough outline of what I cover:

  1. Introduce the package-template as a concept, and clone the repository.
  2. Run live demo of cookiecutter to create an example package, explain each choice made during the interactive process. Highlight the importance of choosing a license, and the urgency of supporting only Python 3.
  3. Review the file/directory structure of the results from cookiecutter, noting the best practices in use by the template. Demonstrate installation via python setup.py install, import the new package in an interactive terminal, show that functions work.
  4. Spend a good ten minutes here explaining the importance of testing, test-driven development, and continuous integration. Show the glorious battery of tests within astropy, explain that it's the testing infrastructure and GitHub functionality that allows for parallel development by many contributors.
  5. Introduce travis-ci, explain that the tests get run whenever new commits are pushed (example: astropy's travis-ci page)
  6. Introduce ReadTheDocs, explain the concept of self-building documentation generated via sphinx (example: astroplan's docs). Highlight documentation as being the most useful way to teach your students/collaborators to use your code.
  7. Introduce the AJ (example: astropy) and the Journal of Open Source Software (exampe: aesop) as potential targets for publication of your newly built Python package.

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

No branches or pull requests

2 participants