memray icon indicating copy to clipboard operation
memray copied to clipboard

Add how to run with poetry scripts

Open knaitas opened this issue 3 years ago • 1 comments

Hi, thanks for this tool.

Could you add example on how to run this with poetry CLI scripts?

For example, how I imagined this would work:

poetry run memray run --live -m make -e file.txt

make is the poetry CLI command -e some argument file.txt another argument

Is it possible to run it this way right now?

knaitas avatar Apr 21 '22 06:04 knaitas

@knaitas Could you clarify what you mean by "poetry CLI command"? Are you referring to https://python-poetry.org/docs/pyproject/#scripts?

pradyunsg avatar Jul 11 '22 23:07 pradyunsg

I'm closing this issue and there is nothing specific for memray to do here. memray can be executed as a module as any other Python module that can be executed with -m. Unfortunately we don't use poetry ourselves so I suggest to reach the poetry maintainers on how to do that.

pablogsal avatar Aug 16 '22 18:08 pablogsal

Enter first Poetry virtual environment with poetry shell then type the usual memray command e.g. python -m memray run --live <your command with arguments>

f4exb avatar Mar 15 '23 18:03 f4exb