Skip to content

Add pure Python package tutorial in _tutoriels/python1 - #31

Merged
sdpython merged 2 commits into
mainfrom
copilot/create-python-package-with-tests
Nov 4, 2026
Merged

sdpython merged 2 commits into
mainfrom
copilot/create-python-package-with-tests

Conversation

Copilot AI commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Adds a new standalone tutorial demonstrating how to structure a pure Python package — filling a gap alongside the existing C++/Cython/PyBind11/Numba extension tutorials.

New: _tutoriels/python1/

  • python1/operations.py — running_mean(data) function with type hints, docstring, and inline example
  • python1/__init__.py — package init exporting the public API
  • test_python1.py — 7 unittest.TestCase tests (integers, floats, negatives, empty-list error, length invariant, last-value equals mean)
  • setup.py — minimal find_packages() setup for a pure Python package
  • README.rst — installation, usage, and test instructions
from python1 import running_mean

running_mean([1, 2, 3, 4])
# [1.0, 1.5, 2.0, 2.5]

Copilot AI changed the title [WIP] Create un package Python dans _tutoriels avec tests unitaires et documentation Add pure Python package tutorial in _tutoriels/python1 Apr 1, 2026
Copilot AI requested a review from xadupre April 1, 2026 16:08
@@ -0,0 +1,7 @@
"""
Package python1 — exemples de fonctions Python pures avec documentation.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot renomme python1 autrechose

@sdpython
sdpython marked this pull request as ready for review November 4, 2026 08:11
@sdpython
sdpython merged commit 1752790 into main Nov 4, 2026
3 of 5 checks passed
@sdpython
sdpython deleted the copilot/create-python-package-with-tests branch November 4, 2026 10:00
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.

create un package package python dans _tutoriels, avec tests unitaires, documentation et une fonction

3 participants