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

Consider scripts section similar to npm package.json #62

Closed
proofit404 opened this issue Jan 29, 2017 · 8 comments
Closed

Consider scripts section similar to npm package.json #62

proofit404 opened this issue Jan 29, 2017 · 8 comments

Comments

@proofit404
Copy link

Hi, thanks for yet another awesome tool!

I wander if there is any plans to add commands abbreviations for example in scripts section.

So instead of typing each time pipenv run python -m unittest discover it will be enough to run pipenv test (or maybe pipenv apply test) if we have this in the Pipfile:

[[scripts]]
test = "python -m unittest discover"

Moved from https://github.com/kennethreitz/pipenv/issues/153

@Carreau
Copy link

Carreau commented Jan 29, 2017

Wouldn't this be better in something like pyproject.toml which already support extra sections for external tools ? It would be better to develop a tool that does discover testing outside of pip/pipfile and once stabilized fold it into pip once the use has been shown and it's stable.

@proofit404
Copy link
Author

I don't know if working with pyproject.toml is in the goal of pipenv tool.

@pradyunsg
Copy link
Member

As of now, this functionality is provided by non-pip tools. Pipfile is meant to be a replacement for the requirements.txt format.

It would definitely be great to have something to automatically run the tests and all. It's just not something for Pipfile to handle. This will be provided as a part of pyproject.toml, so that build tools can use it. Pipfile is for handling and managing dependencies.

@dstufft
Copy link
Member

dstufft commented Jan 30, 2017

Yea, this is something that would go inside of pyproject.toml, not Pipfile.

@dstufft dstufft closed this as completed Jan 30, 2017
@proofit404
Copy link
Author

Originally this issue was filed to the pipenv bug tracker and was moved here after maintainer advice. Still I don't have answer that kind of tool can handle scripts whenever it written in pyproject.toml or Pipfile.toml.

@dstufft
Copy link
Member

dstufft commented Jan 30, 2017

Adding an official section to pyproject.toml would require writing a PEP, individual tools are free to add whatever keys they want under their [tool.NAMEONPYPI] table.

@proofit404
Copy link
Author

If I understand correctly there is no such tool yet?

@pradyunsg
Copy link
Member

There are no such tools that I know of.

Currently, the details of the file are still being worked on. PEP 518 is a start to adding proper declarative build information and build system determination. As I see it, the rest will be specified in the near future.

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

4 participants