Hacker News new | ask | show | jobs
by benatkin 961 days ago
I wouldn't want a stray python file, whether I was using in it a non-python project or a python project, to trip up editors.

I think Earthly has the right idea with an Earthfile. https://docs.earthly.dev/docs/earthfile

It's a different tool for running commands, though.

2 comments

You can also install a jeeves plugin with pip. Say,

    pip install jeeves-yeti-pyproject
will provide you with jeeves, a bunch of commands, and a pack of dev dependencies which I personally happen to like and to use in my projects.

I don't believe Make has plugins.

That's some more indirection, besides putting a disconnected python file in the project directory.

I'm not sure whether it's suggested to install it globally, as a development dependency with poetry/similar, or with pipx https://pypa.github.io/pipx/

The "import sh" thing could have some users installing this package https://pypi.org/project/sh/

This in addition to it being known as "j". It has at least 3 names, jeeves, j, and sh.

For a Python project, I'd recommend doing this as a dev dependency.

* jeeves is the name of the project which I'm advertising, which converts a Python file to a set of commands; * `j` is the name of executable which aformentioned project exposes; * and `sh` is the library (the correct link to which you have provided) which is an optional dependency of `jeeves` and provides a more convenient interface to calling processes and executing commands from Python than `subprocess.run()`.

Earthly is fantastic and I would recommend it, but they really need to improve sharing cache.