𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Python Packages (Chapman & Hall/CRC The Python Series)

✍ Scribed by Tomas Beuzen, Tiffany Timbers


Publisher
Chapman and Hall/CRC
Year
2022
Tongue
English
Leaves
243
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Python Packages introduces Python packaging at an introductory and practical level that’s suitable for those with no previous packaging experience. Despite this, the text builds up to advanced topics such as automated testing, creating documentation, versioning and updating a package, and implementing continuous integration and deployment. Covering the entire Python packaging life cycle, this essential guide takes readers from package creation all the way to effective maintenance and updating.

Python Packages focuses on the use of current and best-practice packaging tools and services like poetry, cookiecutter, pytest, sphinx, GitHub, and GitHub Actions.

Features:

  • The book’s source code is available online as a GitHub repository where it is collaborated on, automatically tested, and built in real time as changes are made; demonstrating the use of good reproducible and clear project workflows.
  • Covers not just the process of creating a package, but also how to document it, test it, publish it to the Python Package Index (PyPI), and how to properly version and update it.
  • All concepts in the book are demonstrated using examples. Readers can follow along, creating their own Python packages using the reproducible code provided in the text.
  • Focuses on a modern approach to Python packaging with emphasis on automating and streamlining the packaging process using new and emerging tools such as poetry and GitHub Actions.

✦ Table of Contents


Cover
Half Title
Series Page
Title Page
Copyright Page
Dedication
Contents
List of Figures
List of Tables
Preface
About the authors
1. Introduction
1.1. Why you should create packages
2. System setup
2.1. The command-line interface
2.2. Installing software
2.2.1. Installing Python
2.2.2. Install packaging software
2.3. Register for a PyPI account
2.4. Set up Git and GitHub
2.5. Python integrated development environments
2.5.1. Visual Studio Code
2.5.2. JupyterLab
2.5.3. RStudio
2.6. Developing with Docker
2.6.1. Docker with Visual Studio Code
2.6.2. Docker with JupyterLab
3. How to package a Python
3.1. Counting words in a text file
3.1.1. Developing our code
3.1.2. Turning our code into functions
3.2. Package structure
3.2.1. A brief introduction
3.2.2. Creating a package structure
3.3. Put your package under version control
3.3.1. Set up local version control
3.3.2. Set up remote version control
3.4. Packaging your code
3.5. Test drive your package code
3.5.1. Create a virtual environment
3.5.2. Installing your package
3.6. Adding dependencies to your package
3.6.1. Dependency version constraints
3.7. Testing your package
3.7.1. Writing tests
3.7.2. Running tests
3.7.3. Code coverage
3.8. Package documentation
3.8.1. Writing documentation
3.8.2. Writing docstrings
3.8.3. Creating usage examples
3.8.4. Building documentation
3.8.5. Hosting documentation online
3.9. Tagging a package release with version control
3.10. Building and distributing your package
3.10.1. Building your package
3.10.2. Publishing to TestPyPI
3.10.3. Publishing to PyPI
3.11. Summary and next steps
4. Package structure and distribution
4.1. Packaging fundamentals
4.2. Package structure
4.2.1. Package contents
4.2.2. Package and module names
4.2.3. Intra-package references
4.2.4. The init file
4.2.5. Including non-code files in a package
4.2.6. Including data in a package
4.2.7. The source layout
4.3. Package distribution and installation
4.3.1. Package installation
4.3.2. Building sdists and wheels
4.3.3. Packaging tools
4.3.4. Package repositories
4.4. Version control
5. Testing
5.1. Testing workflow
5.2. Test structure
5.3. Writing tests
5.3.1. Unit tests
5.3.2. Test that a specific error is raised
5.3.3. Integration tests
5.3.4. Regression tests
5.3.5. How many tests should you write
5.4. Advanced testing methods
5.4.1. Fixtures
5.4.2. Parameterizations
5.5. Code coverage
5.5.1. Line coverage
5.5.2. Branch coverage
5.5.3. Calculating coverage
5.5.4. Coverage reports
5.6. Version control
6. Documentation
6.1. Documentation content and workflow
6.2. Writing documentation
6.2.1. README
6.2.2. License
6.2.3. Contributing guidelines
6.2.4. Code of conduct
6.2.5. Changelog
6.2.6. Examples
6.2.7. Docstrings
6.2.8. Application programming interface (API) reference
6.2.9. Other package documentation
6.3. Building documentation
6.4. Hosting documentation online
7. Releasing and versioning
7.1. Version numbering
7.2. Version bumping
7.2.1. Manual version bumping
7.2.2. Automatic version bumping
7.3. Checklist for releasing a new package version
7.3.1. Step 1: make changes to package source files
7.3.2. Step 2: document your changes
7.3.3. Step 3: bump version number
7.3.4. Step 4: run tests and build documentation
7.3.5. Step 5: tag a release with version control
7.3.6. Step 6: build and release package to PyPI
7.4. Automating releases
7.5. Breaking changes and deprecating package functionality
7.6. Updating dependency versions
8. Continuous integration and deployment
8.1. An introduction to CI/CD
8.2. CI/CD tools
8.3. Introduction to GitHub Actions
8.3.1. Key concepts
8.3.2. A toy example
8.3.3. Actions and commands
8.4. Setting up continuous integration
8.4.1. Setup
8.4.2. Running tests
8.4.3. Recording code coverage
8.4.4. Build documentation
8.4.5. Testing continuous integration
8.5. Setting up continuous deployment
8.5.1. Setup
8.5.2. Automatically creating a new package version
8.5.3. Uploading to TestPyPI and PyPI
8.5.4. Testing continuous deployment
8.6. Summary
Bibliography
Index


πŸ“œ SIMILAR VOLUMES


Python Packages (Chapman & Hall/CRC The
✍ Tomas Beuzen, Tiffany Timbers πŸ“‚ Library πŸ“… 2022 πŸ› Chapman and Hall/CRC 🌐 English

<p><span>Python Packages</span><span> introduces Python packaging at an introductory and practical level that’s suitable for those with no previous packaging experience. Despite this, the text builds up to advanced topics such as automated testing, creating documentation, versioning and updating a p

Image Processing and Acquisition using P
✍ Ravishankar Chityala, Sridevi Pudipeddi πŸ“‚ Library πŸ“… 2020 πŸ› Chapman and Hall/CRC 🌐 English

Image Processing and Acquisition using Python provides readers with a sound foundation in both image acquisition and image processing―one of the first books to integrate these topics together. By improving readers’ knowledge of image acquisition techniques and corresponding image processing, the boo

Statistics and Data Visualisation with P
✍ Jesus Rogel-Salazar πŸ“‚ Library πŸ› Chapman and Hall/CRC 🌐 English

<p><span>This book is intended to serve as a bridge in statistics for graduates and business practitioners interested in using their skills in the area of data science and analytics as well as statistical analysis in general. On the one hand, the book is intended to be a refresher for readers who ha

Learning Professional Python: Volume 1:
✍ Usharani Bhimavarapu, Jude D. Hemanth πŸ“‚ Library πŸ“… 2024 πŸ› CRC Press LLC 🌐 English

Volume 1 of Learning Professional Python is a resource for students who want to learn Python even if they don’t have any programming knowledge and for teachers who want a comprehensive introduction to Python to use with their students. This book helps the students achieve their dream job in the IT I

Python for Bioinformatics (Chapman & Hal
✍ Sebastian Bassi πŸ“‚ Library πŸ“… 2009 πŸ› Chapman and Hall/CRC 🌐 English

Programming knowledge is often necessary for finding a solution to a biological problem. Based on the author’s experience working for an agricultural biotechnology company, Python for Bioinformatics helps scientists solve their biological problems by helping them understand the basics of programming