euroargodev / euroargodev/argopy

PyPI source distribution does not include the test data

Open
#381 6 comments 0 reactions 0 assignees View on GitHub
internals invalid stale
Dominant language
Python
Stars
229
Forks
52
Avg merge
2d 10h
Merged PRs (30d)
8

Description

I was trying to build a distribution package from the [0.1.16 source tarball on PyPI](https://pypi.org/project/argopy/0.1.16/#files). Running the tests gave the following error during startup:

```
argopy/tests/conftest.py:8: in
from mocked_http import mocked_httpserver
argopy/tests/helpers/mocked_http.py:101: in
class HTTPTestHandler(BaseHTTPRequestHandler):
argopy/tests/helpers/mocked_http.py:103: in HTTPTestHandler
"": get_html_landing_page(),
argopy/tests/helpers/mocked_http.py:92: in get_html_landing_page
html.append("

Mocked HTTP server is up and running, serving %i files

" % len(URI))
E NameError: name 'URI' is not defined
```

Working back through the code, I found the underlying problem was that `argopy/tests/test_data` is not included in the PyPI source tarball. Switching to the tarball that GitHib provides from the 0.1.16 tag works as that includes the test data.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the 0.1.16 PyPI source tarball with the GitHub tag tarball, then inspect argopy/tests/test_data and the test setup in argopy/tests/conftest.py and argopy/tests/helpers/mocked_http.py. Verify the source distribution contains the test data and run the tests; done means the packaged tests no longer fail with NameError: name 'URI' is not defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.