File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ jobs:
48
48
run : python3 -m build
49
49
# Test the locally built wheel
50
50
- name : Create test environment
51
- run : python -m venv test_env
51
+ run : python -m venv test_before_testpypi
52
52
- name : Test package installation and functionality
53
53
run : |
54
- source test_env /bin/activate
54
+ source test_before_testpypi /bin/activate
55
55
# Install the locally built wheel and testing dependencies
56
56
pip install dist/*.whl pytest
57
57
python -c "import dspy; print(dspy.__version__)"
93
93
run : sed -i '/#replace_package_name_marker/{n;s/__name__ *= *"[^"]*"/__name__="dspy"/;}' ./dspy/__metadata__.py
94
94
- name : Build a binary wheel
95
95
run : python3 -m build
96
+ # Test the locally built wheel before publishing to pypi
97
+ - name : Create test environment
98
+ run : python -m venv test_before_pypi
99
+ - name : Test package installation and functionality
100
+ run : |
101
+ source test_before_pypi/bin/activate
102
+ # Install the locally built wheel and testing dependencies
103
+ pip install dist/*.whl pytest
104
+ pytest tests/metadata/test_metadata.py tests/predict
105
+ deactivate
96
106
- name : Publish distribution 📦 to PyPI (dspy)
97
107
uses : pypa/gh-action-pypi-publish@release/v1
98
108
with :
Original file line number Diff line number Diff line change
1
+ import dspy
2
+ import re
3
+
4
+
5
+ def test_metadata ():
6
+ assert dspy .__name__ == "dspy"
7
+ assert re .match (r"\d+\.\d+\.\d+" , dspy .__version__ )
8
+ assert dspy .__author__ == "Omar Khattab"
9
+ assert dspy .
__author_email__ == "[email protected] "
10
+ assert dspy .__url__ == "https://github.com/stanfordnlp/dspy"
11
+ assert dspy .__description__ == "DSPy"
You can’t perform that action at this time.
0 commit comments