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 release.md to MANIFEST.in #327

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hugobuddel
Copy link

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.

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
@JessicaTegner
Copy link
Owner

continuing from #259

@hugobuddel
Copy link
Author

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.

@JessicaTegner
Copy link
Owner

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 JessicaTegner mentioned this pull request Mar 7, 2023
@hugobuddel
Copy link
Author

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.

@JessicaTegner
Copy link
Owner

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

@hugobuddel
Copy link
Author

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

@JessicaTegner
Copy link
Owner

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

mbakke pushed a commit to guix-mirror/guix that referenced this pull request Mar 21, 2023
The tests of python-pypandoc 1.6.5 fail; these are fixed in 1.7.5:
JessicaTegner/pypandoc@6670e90

The tests of later versions of python-pypandoc also fail though:
JessicaTegner/pypandoc#327

Finally, python-pypandoc requires the pandoc data to be embeded in
the binary:
https://github.com/jgm/pandoc/blob/main/INSTALL.md#creating-a-relocatable-binary

* gnu/packages/python-xyz.scm (python-pypandoc): Upgrade to 1.7.5
* gnu/packages/haskel-xyz.scm (pandoc): Embed data files.

Signed-off-by: Ludovic Courtès <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants