python-packaging

Creates and configures scientific Python projects with pyproject.toml, Hatchling, src-layouts, licenses, and PyPI publishing workflows.

25|10|Updated Nov 6, 2025
One-click install
npx skills add https://github.com/uw-ssec/rse-plugins --skill python-packaging-uw-ssec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-packaging
Source: https://github.com/uw-ssec/rse-plugins/tree/main/plugins/scientific-python-development/skills/python-packaging
Command: npx skills add https://github.com/uw-ssec/rse-plugins --skill python-packaging-uw-ssec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires click, numpy, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Packaging scientific Python projects can be error-prone without consistent structures and modern tools. This guide consolidates best practices for pyproject.toml configuration, src-layout, hatchling, licensing, and publishing workflows.

Core Features & Use Cases

  • Modern packaging standards with pyproject.toml and PEP 621 metadata
  • Source layout guidance for isolated testing and reliable builds using the src/ layout
  • Build and publishing workflows with Hatchling, build, and PyPI publishing templates
  • Versioning and metadata practices including license, classifiers, dependencies, and extras

Quick Start

Follow the guide to initialize a new scientific package with pyproject.toml, configure Hatchling, and publish to PyPI.

Frequently Asked Questions about python-packaging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure pyproject.toml for a scientific Python package?

Configure pyproject.toml for scientific Python packaging by defining PEP 621 metadata, including project name, version, license declarations, classifiers, and dependencies. This Skill guides you through structuring modern packaging standards and optional dependency groups for reproducible builds.

What is the src-layout and why use it for Python packaging?

The src-layout isolates package source code from test files to prevent path conflicts during testing and ensure reliable builds. Using a src/ directory guarantees that imports resolve from the installed package rather than the local directory.

How do I build and publish a Python package to PyPI using Hatchling?

Build and publish a Python package to PyPI by integrating the Hatchling build system in your pyproject.toml, executing the build process, and uploading the resulting distributions. This Skill provides workflows and templates for standard PyPI publishing.

Can I manage optional dependencies and extras in pyproject.toml?

You can manage optional dependencies in pyproject.toml by defining extras groups within the PEP 621 metadata. This Skill covers configuring optional dependency groups to separate core requirements from testing or documentation tools.

Does this packaging workflow support scientific Python community guidelines?

This packaging workflow directly supports scientific Python community guidelines by standardizing pyproject.toml metadata, src-layout adoption, and reproducible build configurations tailored for scientific projects.