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 command to check a file #127

Closed
merwok opened this issue Oct 9, 2018 · 6 comments
Closed

Add command to check a file #127

merwok opened this issue Oct 9, 2018 · 6 comments

Comments

@merwok
Copy link

merwok commented Oct 9, 2018

I would like an entry-point to check a reST or markdown file.

(I’ve heard about twine check but it doesn’t work for me due to flit-tox mismatch.)

@di
Copy link
Member

di commented Oct 9, 2018

@merwok Can you go into more detail about what you mean by "flit-tox mismatch"?

@di
Copy link
Member

di commented Oct 9, 2018

@merwok
Copy link
Author

merwok commented Oct 9, 2018

I am using the recent PEP 517 integration in tox, so tox reads my build-deps in pyproject.toml and uses flit to install my project. This works well, even for a Python2.7 test env! (I do need to change my lint/test commands to run against the installed project rather than the files in the repo root, but that’s not a new issue.)

Now twine check wants a path/to/dists argument.

Idea 1: check .tox/dist, but that only contains the sdist, and I run into pypa/flit#216

Idea 2: run pip wheel (as done by other projects), but I don’t have a setup.py anymore

Idea 3: run flit build, but I don’t want the files created in repo-root/dist (pypa/flit#217)

Idea 4: run a new command render-readme README.md and remove the flit/twine layers!

One important con of my request is that twine check validates that the description file is correctly read into wheel/sdist artifacts. render-readme would be similar to a unit test whereas twine check is akin to an integration test and gives us 100% confidence that the PyPI page will be correct.

@di
Copy link
Member

di commented Oct 9, 2018

I think we'll want to find a way you can use twine check here. My plan for this command is to eventually bring in additional metadata validation, so you'll probably want to use that instead of directly invoking readme-renderer.

I think that just fixing pypa/flit#216 and assuming that the sdist metadata matches any built distribution metadata should suffice, what do you think?

@merwok
Copy link
Author

merwok commented Oct 9, 2018

Ideally I would not use the top-level dist directory to create and check the dists (idea 3, pypa/flit#217), but in the meantime I’ll take twine check dist/*.

Feel free to close, at least I got the opportunity to detangle the various issues and this provides a record of the discussion with links.

@di
Copy link
Member

di commented Oct 9, 2018

Great. Closing as I don't think there's anything readme_renderer needs to do here.

@di di closed this as completed Oct 9, 2018
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

No branches or pull requests

2 participants