Erotemic / xdoctest

A rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX.
Apache License 2.0
209 stars 12 forks source link

0.15.3 pypi tarball lost test data files (*.ipynb) #95

Closed mgorny closed 3 years ago

mgorny commented 3 years ago

I see there's been some cleanup, and as part of it the following files disappeared, compared to 0.15.2:

@@ -139,14 +49,12 @@ requirements/problematic.txt
 requirements/runtime.txt
 requirements/tests.txt
 testing/_grave.py
-testing/notebook_with_doctests.ipynb
 testing/test_binary_ext.py
 testing/test_cases.py
 testing/test_checker.py
 testing/test_core.py
 testing/test_directive.py
 testing/test_doctest_example.py
-testing/test_doctest_in_notebook.ipynb
 testing/test_dynamic.py
 testing/test_entry_point.py
 testing/test_errors.py

As a result, tests are now failing e.g. with:

>       with open(ipynb_fpath, 'r+') as file:
E       FileNotFoundError: [Errno 2] No such file or directory: '/tmp/portage/dev-python/xdoctest-0.15.3/work/xdoctest-0.15.3/testing/notebook_with
_doctests.ipynb'
Erotemic commented 3 years ago

Thanks for the report.

I'm not sure what the cause is. Is see the ipynb files in the 0.15.2 tarball, but they are gone in 0.15.3. However, the files are in git, and I don't why they aren't present. I'll look into it.

mgorny commented 3 years ago

I know that in the 'old days' you had to put some rules into MANIFEST.in but I'm not really sure how modern setuptools work.

Erotemic commented 3 years ago

That's probably it. I see the ipynb files in the git tarballs: https://github.com/Erotemic/xdoctest/archive/0.15.3.tar.gz but the pypi tarballs are probably from the manifest.

Erotemic commented 3 years ago

The MANIFEST file seems to be the key. The tarball that is upload is the one created by publish.sh via python setup.py sdist. I verified that the new tarball correctly contains the ipynb file. This will be fixed once #94 is merged, which I will to today after the CI passes.

I'm considering moving to pbr for versioning and release tooling, but for now its important to maintain MANIFEST.

Erotemic commented 3 years ago

This should now be fixed: https://pypi.org/project/xdoctest/0.15.4/#files

Let me know if there's still problems. Again, thanks for the report!