python-packaging
/python-packaging
Tworzy i publikuje naukowe pakiety Python zgodnie ze standardami społeczności Scientific Python: pyproject.toml, układ src, Hatchling, metadane, punkty wejścia CLI i PyPI.
- Autor
- uw-ssec ↗
- Repozytorium
- rse-plugins ↗
- Licencja
- BSD-3-Clause
- Ostatnia zmiana repozytorium
- 14.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 12
- Skrypty
- 2
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 3
Brak sygnałów. Repozytorium zmienione 14.10.2026, bez odwołań do wycofanych modeli i API.
BSD-3-Clause, otwarta.
- 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: assets/sphinx-conf.py, scripts/cli-example.py
Co robi i kiedy
Tworzy i publikuje naukowe pakiety Python zgodnie ze standardami społeczności Scientific Python: pyproject.toml, układ src, Hatchling, metadane, punkty wejścia CLI i PyPI.
Oryginalny opis (EN)
Create and publish distributable scientific Python packages following Scientific Python community best practices. Covers pyproject.toml, src layout, Hatchling, metadata, CLI entry points, and PyPI publishing. Use when the user wants to create a new Python package, set up pyproject.toml, configure Hatchling, publish to PyPI, or follow Scientific Python packaging standards.
Jak działa
- Package Structure
- Minimal pyproject.toml
- CLI Entry Point
- Publishing Workflow
- Key Rules
- Pre-Publish Checklist
- References
Podgląd SKILL.md
---
name: python-packaging
description: Create and publish distributable scientific Python packages following Scientific Python community best practices. Covers pyproject.toml, src layout, Hatchling, metadata, CLI entry points, and PyPI publishing. Use when the user wants to create a new Python package, set up pyproject.toml, configure Hatchling, publish to PyPI, or follow Scientific Python packaging standards.
metadata:
assets:
- assets/pyproject-minimal.toml
- assets/pyproject-full-featured.toml
- assets/readme-template.md
- assets/github-actions-publish.yml
- assets/sphinx-conf.py
- assets/.gitignore
references:
- references/common-issues.md
- references/docstrings.md
- references/metadata.md
- references/patterns.md
scripts:
- scripts/cli-example.py
---
# Scientific Python Packaging
## Package Structure
```
my-sci-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│ └── my_sci_package/
│ ├── __init__.py
│ └── analysis.py
└── tests/
└── test_analysis.py
```
Use `src/` layout — prevents accidental import of uninstalled code, required for Hatchling auto-discovery.
## Minimal pyproject.toml
```toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-sci-package"
version = "0.1.0"
description = "A scientific Python package"
readme = "README.md"
license = "BSD-3-Clause"
requires-python = ">=3.9"
authors = [
{name = "Your Name", email = "you@example.com"},
]
dependencies = [
"numpy>=1.20",
"scipy>=1.7",
]
[project.urls]
Homepage = "https://github.com/username/my-sci-package"
[dependency-groups]
dev = ["pytest>=7.0", "ruff>=0.1", "mypy>=1.0"]
```
Full template with classifiers, optional deps, and CI config: [assets/pyproject-minimal.toml](assets/pyproject-minimal.toml) and [assets/pyproject-full-featured.toml](assets/pyproject-full-featured.toml).
## CLI Entry Point
```toml
[project.scripts]
sci-analyze = "my_sci_package.cli:main"
```
See [scripts/cli-example.py](scripts/cli-example.py) for a Click-based CLI implementation.
## Publishing Workflow
```bash
# 1. Build
python -m build
# 2. Check metadata and distribution
twine check dist/*
# If check fails: fix metadata in [project] section of pyproject.toml and rebuild
# 3. Test on TestPyPI
twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ <my-sci-package>
# If install fails: check package name availability, verify dist/ contents with tar -tvf dist/*.tar.gz
# 4. Publish to PyPI
twine upload dist/*
```
For automated publishing on GitHub release: [assets/github-actions-publish.yml](assets/github-actions-publish.yml) (uses OIDC Trusted Publishers — no stored tokens needed).
## Key Rules
- Use `src/` layout — no `setup.py`, `setup.cfg`, or `MANIFEST.in`
- Use Hatchling as build backend (Scientific Python recommendation)
- Set `requires-python` with minimum only — no upper cap
- Use `>=` for dependency lower bounds — avoid upper caps unless absolutely necessary
- Test on TestPyPI before production publish
- Verify SDist contents: `tar -tvf dist/*.tar.gz`
## Pre-Publish Checklist
- [ ] `python -m build` succeeds
- [ ] `twine check dist/*` passes
- [ ] Installed from wheel in clean virtualenv and imports correctly
- [ ] `requires-python` and dependency versions are correct
- [ ] `LICENSE` file present; `license` field uses SPDX identifier
- [ ] `project.urls` includes repository link
## References
- Dependency version constraints, classifiers, optional extras: [references/metadata.md](references/metadata.md)
- Package structure patterns, versioning strategies: [references/patterns.md](references/patterns.md)
- NumPy-style docstrings: [references/docstrings.md](references/docstrings.md)
- Import errors, missing files, dependency conflicts: [references/common-issues.md](references/common-issues.md)
- Scientific Python guidelines: https://learn.scientific-python.org/development/guides/packaging-simple/
Pliki w paczce (12)
- SKILL.md 4 KB
- assets/.gitignore 1 KB
- assets/github-actions-publish.yml 1 KB
- assets/pyproject-full-featured.toml 3 KB
- assets/pyproject-minimal.toml 1 KB
- assets/readme-template.md 2 KB
- assets/sphinx-conf.py 1 KB
- references/common-issues.md 1 KB
- references/docstrings.md 2 KB
- references/metadata.md 4 KB
- references/patterns.md 5 KB
- scripts/cli-example.py 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · uw-ssec/rse-plugins | 100 | BSD-3-Clause |
| acaprino/alfio-claude-plugins | 100 | MIT |
| acaprino/alfio-claude-plugins | 100 | MIT |
| acaprino/alfio-claude-plugins | 100 | MIT |
| acaprino/alfio-claude-plugins | 100 | MIT |
| acaprino/alfio-claude-plugins | 100 | MIT |
| acaprino/alfio-claude-plugins | 100 | MIT |
| rootcastleco/rei-skills | 100 | MIT |
| laurigates/claude-plugins | 100 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki 9c9876a06441 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95packaging-python-libraries
Pakuje biblioteki Pythona w pyproject.toml, wybiera backend budowania, publikuje na PyPI przez trusted publishing i buduje koła wheel. - 95project-system
Prowadzi przez konfigurację i pakowanie projektów Pythona z pyproject.toml: backendy budowania, punkty wejścia, wersjonowanie, publikacja na PyPI, instalacje edytowalne i wzorce monorepo. - 100python-pypi-package-builder
Prowadzi przez budowę, testy, linting, wersjonowanie i publikację biblioteki Python w PyPI: setuptools, hatchling, flit i poetry, PEP 440, Trusted Publishing i typowanie. - 100python-best-practices
Podaje dobre praktyki przy czytaniu i pisaniu plików Python, w tym pyproject.toml i requirements.txt. - 100python-packaging-patterns
Strukturyzuje projekty Python do dystrybucji: pyproject.toml, układ src, zależności, publikacja, narzędzia hatch, setuptools, flit i poetry, wersjonowanie i instalacje edytowalne. - 87python-project-developer
Opisuje pełną specyfikację rozwoju projektów w Pythonie dla narzędzi CLI i GUI: wspólne API ze wzorcem ToolResult, integracja z function calling OpenAI, pyproject.toml, testy i publikacja na PyPI.