pypandoc icon indicating copy to clipboard operation
pypandoc copied to clipboard

Add release.md to MANIFEST.in

Open hugobuddel opened this issue 2 years ago • 7 comments

This should fix test_basic_conversion_from_file_pattern and test_basic_conversion_from_file_pattern_with_input_list when ran on the released code.

These tests check for the presence of the string making a release which is taken from release.md. Therefore, release.md must be in the release tarball.

See also https://github.com/JessicaTegner/pypandoc/pull/259/files#r1126859693

However, this PR has not been tested.

hugobuddel avatar Mar 06 '23 18:03 hugobuddel

continuing from #259

JessicaTegner avatar Mar 06 '23 20:03 JessicaTegner

continuing from #259

As discussed there, perhaps it is indeed better to use different md files as input to this test, and not include release.md in the manifest.

hugobuddel avatar Mar 06 '23 20:03 hugobuddel

I would say so. However, looking at the 2 (at the moment released) packages, it looks like only the tarball has a *.md file in it(the readme).

But yes, I'm in favor of using what's already there (or, creating temp files, as the testing already has functions to handle such things).

Thinking about it more, it would probably be best to just use temp files, cause that would make it all independent

JessicaTegner avatar Mar 06 '23 20:03 JessicaTegner

Related, it would be 'better' to test the build package rather than the source repository. In my own projects I try to enforce this by putting the package (which would be the pypandoc directory) in a src directory and the tests in a separate tests directory. That way the tests can never accidentally import the source directory, but rather the built and installed package. Then this error would have been caught in the CI, but not sure whether that change is worth the effort.

Is it OK to leave it to you how to proceed? That is, choose one or more of

  • Merging this as-is, which would probably fix the immediate problem.
  • Use true test files in a temporary directory.
  • Test the 'release' package rather than the source.

My immediate problem was installing the app 'apostrophe' on Guix, which requires pypandoc, which failed to build, see https://issues.guix.gnu.org/62013 . Writing this PR was already a rabbit hole deeper than I intended, so just merging this as-is would be sufficient for me for now. In the meantime I've made a patch to update Guix to use pypandoc 1.7.5, which does work.

hugobuddel avatar Mar 07 '23 15:03 hugobuddel

Seems resonable @hugobuddel. Kind of related, does the patches in #328 also work for you. Then if that's the case, I think we are gonna move to that one, due to it using actual temp test files. THen in another later pr, I'll seperate the code into an src dir, like you suggested

JessicaTegner avatar Mar 08 '23 07:03 JessicaTegner

Seems resonable @hugobuddel. Kind of related, does the patches in #328 also work for you. Then if that's the case, I think we are gonna move to that one, due to it using actual temp test files.

I don't think #328 is related, it touches a different test

hugobuddel avatar Mar 08 '23 09:03 hugobuddel

Cool. I think what we'll do is use temporary markdown file, per your secondary suggestions. Then I'll work on refactoring the testing

JessicaTegner avatar Mar 09 '23 14:03 JessicaTegner