Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing code and data files back to dist wheels. #303

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

tomdonaldson
Copy link
Contributor

@tomdonaldson tomdonaldson commented Feb 18, 2022

With the APE-17 changes (#290), wheel files built for release did not contain the code or test data. @pllim and I found some subtle changes needed in setup.cfg to get those files in the wheel.

For the code, the key line is

packages = find:

I also included:

zip_safe = False

which I don't totally understand, but seems OK after reading the documentation.

The data files had been handled by setup_package.py files. With APE-17, these are obsolete so I deleted them and added their info to setup.cfg as options.package_data .

With these changes in place I verified that the wheel file created by these commands contained the same files as for the previous release (v1.2.1):

python -m pip install build wheel "twine>=3.3" -U
python -m build --sdist --wheel .

I also verified that the wheel was pip installable, and that the installation passed basic tests:

conda create --quiet --yes -n pyvo_install_test python=3.8
conda activate pyvo_install_test

pip install pyvo-1.2.<whatever>-py3-none-any.whl
pip install -U pytest-astropy requests_mock pillow

# Run local tests
cat << EOF | python
import pyvo
pyvo.test()
EOF

# Run one sample remote test (should have a few lines of output):
cat << EOF | python
from pyvo import registry
caoms = registry.search(keywords=['caom stsci'], servicetype='tap')
results = caoms[0].search(query='SELECT TOP 5 * FROM dbo.CaomObservation')
print(results)
EOF

@tomdonaldson tomdonaldson added this to the v1.3 milestone Feb 18, 2022
@pllim
Copy link
Member

pllim commented Feb 18, 2022

LGTM. Thanks!

@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #303 (62d4b5d) into main (00da970) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #303   +/-   ##
=======================================
  Coverage   75.49%   75.49%           
=======================================
  Files          44       44           
  Lines        5125     5125           
=======================================
  Hits         3869     3869           
  Misses       1256     1256           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00da970...62d4b5d. Read the comment docs.

@tomdonaldson
Copy link
Contributor Author

I expect the devastropy check will be fixed by astropy/astropy#12875.

@pllim
Copy link
Member

pllim commented Feb 18, 2022

Re: devastropy -- yup yup, you can ignore it here.

Not sure if you are waiting for other reviews or not, but feel free to merge if you are not. Good work. Thanks!

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomdonaldson
Copy link
Contributor Author

@pllim @bsipocz Thanks for the reviews! I'll make a v1.3 release soon(-ish).

@tomdonaldson tomdonaldson merged commit be7d043 into astropy:main Feb 18, 2022
@tomdonaldson tomdonaldson deleted the fix_release_build branch February 18, 2022 22:19
@pllim
Copy link
Member

pllim commented Feb 18, 2022

p.s. Sorry I missed this in the original review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants