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

Content on "How to create a Python package" #63

Open
brian-rose opened this issue May 28, 2021 · 6 comments
Open

Content on "How to create a Python package" #63

brian-rose opened this issue May 28, 2021 · 6 comments
Assignees
Labels
content Content related issue

Comments

@brian-rose
Copy link
Member

Migrating an interesting discussion over from ProjectPythia/projectpythia.github.io#43.

I think that the Foundations book could have an entirely new top-level section (after Core Scientific Packages) devoted to best practices for developing Python packages.

Tentatively, the chapter could be entitled "Building Python Packages", and have sections like:

  • tutorial on tests and testing
  • Good package structure (i.e., the structure of the files and folders in the repository)
  • Building documentation
  • CI services like GitHub Action (for testing, linting, etc.) and ReadTheDocs (for building and hosting documentation)
  • Using pre-commit hooks and other enforcing tools (including various pre-commit checks like black/prettier, flake8, isort, talisman, etc.)

I'm not 100% sure if this is in-scope for the Foundations book, but it could be really useful to have self-contained tutorials on all this material cross-referenced with our tutorials on conda, git, GitHub pull requests, etc.

@brian-rose brian-rose added the content Content related issue label May 28, 2021
@brian-rose
Copy link
Member Author

It bears repeating here, @jbusecke has already done much of this work over at https://github.com/jbusecke/cookiecutter-science-project
and we could easily adapt many of the instructions from his README.

@jbusecke
Copy link

jbusecke commented Jun 8, 2021

Is there already a skeleton for this kind of documentation? I was just wondering if I should add more info to my readme (which should really be a full docs page at this point) or already move over to a more general space.

@brian-rose
Copy link
Member Author

Is there already a skeleton for this kind of documentation? I was just wondering if I should add more info to my readme (which should really be a full docs page at this point) or already move over to a more general space.

We now have a template notebook for new contributions to the Pythia Foundations book: https://foundations.projectpythia.org/preamble/template.html

What I proposed above was to add an entirely new top-level section to the book, with individual sections delivering content in line with our template. I could quickly rough this out in a PR with some tentative section headings if that will help get things rolling.

@dopplershift
Copy link
Contributor

I think this material is really valuable, but I think calling it "Foundations" is a stretch.

@brian-rose
Copy link
Member Author

I think this material is really valuable, but I think calling it "Foundations" is a stretch.

True enough... this material could exist in a separate repo and be hosted as a separate piece of content on the main Pythia portal.

@brian-rose
Copy link
Member Author

At the EWG meeting today (9/30/2021) we batted around the idea of getting started with a separate gallery or "cookbook" section of the Pythia Portal that could house material that doesn't belong in Foundations for whatever reason. That could be the right place for this content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Content related issue
Projects
Status: Backlog
Development

No branches or pull requests

8 participants