MCPcopy Index your code
hub / github.com/MolSSI-Education/python-package-best-practices

github.com/MolSSI-Education/python-package-best-practices @2023.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2023.12.0 ↗ · + Follow
79 symbols 252 edges 10 files 65 documented · 82% updated 3mo ago2023.12.0 · 2024-01-09★ 44

Browse by type

Functions 70 Types & classes 9
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Python Package Best Practices

This repository contains lessons for the MolSSI Workshop "Best Practices in Python Package Development". To complete the lessons, navigate to the website. Make sure to visit setup first to obtain lesson materials and install required software.

This workshop is designed to take place in one and a half to two days. Students begin the workshop with python code stored in a Jupyter notebook. During the workshop, we refactor and format the code into a Python package. At the end, all participants should have a repository on GitHub which implements MolSSI's Best Practices for a Python package. Depending on the level of students taking this course, all lessons may not be accomplished in two days. Workshops should cover at least lessons 1-6 (outlined below), with more potentially being added for more advanced groups.

Workshop Topics

This workshop walks students through setting up, writing code, and setting up multiple services (continuous integration, codecov, etc) for a Python package. When finished, this repo will include the following topics. Items which have a checkbox are (mostly) finished, and can be followed online.

  • [x] Setting up a python package using the MolSSI Computational Molecular Sciences (CMS) CookieCutter
  • [x] Basic use of git and GitHub.
  • [x] Python coding style, docstrings.
  • [x] Code collaboration on GitHub (Fork-PR workflow)
  • [x] Unit testing using pytest.
  • [x] Continuous integration using [travis-ci].
  • [x] Documentation using sphinx and readthedocs
  • [x] Distributing packages on PyPI and conda-forge

Contributing to these lessons

To contribute to this lesson, fork this repository and make changes on your local clone. Once you have changes you would like incorporated, create a pull request, and we will review your contributions.

All edits to lessons should be done under _episodes in the appropriate markdown file. We use Sphinx with a variation of the PyData Sphinx Theme and MyST parser for lessons. There are custom admonitions for overviews, key points, and exercises. You can see examples of custom admonitions in the lesson files.

Core symbols most depended-on inside this repo

Shape

Function 39
Method 31
Class 9

Languages

Python100%

Modules by API surface

bin/lesson_check.py34 symbols
bin/workshop_check.py21 symbols
bin/util.py13 symbols
bin/repo_check.py5 symbols
bin/test_lesson_check.py3 symbols
_episodes/lexerpatch.py2 symbols
bin/lesson_initialize.py1 symbols

For agents

$ claude mcp add python-package-best-practices \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page