Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

ci(release): drop unused contents:write on TestPyPI job; add twine check --strict (#9648)

Isaac Millere8fffea498cd
diff --git a/.github/.internal_dspyai/pyproject.toml b/.github/.internal_dspyai/pyproject.toml
index 497f2213d..45d360431 100644
--- a/.github/.internal_dspyai/pyproject.toml
+++ b/.github/.internal_dspyai/pyproject.toml
@@ -4,7 +4,7 @@ name="dspy-ai"
#replace_package_version_marker
version="3.2.0"
description = "DSPy"
-readme = "README.md"
+readme = {text = "`dspy-ai` is a compatibility alias for the [dspy](https://pypi.org/project/dspy/) package. Install `dspy` instead: `pip install dspy`.", content-type = "text/markdown"}
authors = [
{ name = "Omar Khattab", email = "[email protected]" }
]
diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml
index 929510291..fce1094e6 100644
--- a/.github/workflows/build_and_release.yml
+++ b/.github/workflows/build_and_release.yml
@@ -22,7 +22,6 @@ jobs:
name: pypi
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
- contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python 3.11
@@ -50,6 +49,8 @@ jobs:
run: sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai-test-isaac"/;}' pyproject.toml
- name: Build a binary wheel
run: python3 -m build
+ - name: Validate built distributions
+ run: python3 -m twine check --strict dist/*
# Test the locally built wheel
- name: Create test environment
run: python -m venv test_before_testpypi
@@ -101,6 +102,8 @@ jobs:
run: sed -i '/#replace_package_name_marker/{n;s/__name__ *= *"[^"]*"/__name__="dspy"/;}' ./dspy/__metadata__.py
- name: Build a binary wheel
run: python3 -m build
+ - name: Validate built distributions
+ run: python3 -m twine check --strict dist/*
# Test the locally built wheel before publishing to pypi
- name: Create test environment
run: python -m venv test_before_pypi
@@ -126,6 +129,8 @@ jobs:
sed -i '/#replace_dspy_version_marker/{n;s/dspy>=[^"]*/dspy>=${{ needs.extract-tag.outputs.version }}/;}' .github/.internal_dspyai/pyproject.toml
- name: Build a binary wheel (dspy-ai)
run: python3 -m build .github/.internal_dspyai/
+ - name: Validate built distributions (dspy-ai)
+ run: python3 -m twine check --strict .github/.internal_dspyai/dist/*
- name: Publish distribution 📦 to PyPI (dspy-ai)
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
with: