holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.83k stars 520 forks source link

Align names of pixi tasks #7217

Open MarcSkovMadsen opened 3 months ago

MarcSkovMadsen commented 3 months ago

The names of the pixi tasks are

Tasks that can run on this machine:
-----------------------------------
build-conda, build-npm, build-pip, build-pyodide, docs-build, docs-server, install, lint, lint-install, lite-build, lite-server, test-docs, test-example, test-subprocess, test-type, test-ui, test-unit

I can see that they all start with with a verb and then a name, except the docs-build and docs-server.

Please rename to build-docs and serve-docs, to make things consistent, easier to discover and easier to remember.

If pixi can do tab completion, then this will also be a big advantage.

philippjfr commented 3 months ago

-1 on this, as @hoxbro explains in #7218 the naming is deliberately hierarchical, i.e. docs related tasks are prefixed with docs, test related tasks are prefixed with test and build related tasks are prefixed with build. The fact that pixi provides tab-completion in fact makes this argument stronger as you can see all related option by typing build, docs, and test and then tabbing.

philippjfr commented 3 months ago

With @hoxbro and I aligned on this I'm going to close.

MarcSkovMadsen commented 3 months ago

But you build the docs? What does build mean to you?

I can build. I can test. But i cannot docs - I can build my docs though.

philippjfr commented 3 months ago

I get the confusion but the build prefix is not meant to be read as a verb but rather as a category of tasks, specifically tasks related to building packages. Just as test-prefixed tasks are tasks related to testing and docs-prefixed tasks are tasks related to generating documentation materials.

philippjfr commented 3 months ago

I'd be fine renaming build to pkg or something to reduce the confusion.

philippjfr commented 3 months ago

If we want to avoid the verb confusion entirely we should also rename test -> tests.

hoxbro commented 2 months ago

I don't know why you think the first word must be a verb.

The naming of build and test is a common word for building and testing purposes.

The docs name is more uncommon but not unheard of.

As @philippjfr mentioned, autocomplete also strengthens the current ordering of having the main category first and then subsections related to it, as you can easily see what tasks are available for each main category.

image

 Screenshot 2024-09-09 16 30 19

 Screenshot 2024-09-09 16 30 38

I'm still -1 on the proposed change made in this issue.

MarcSkovMadsen commented 2 months ago

To me you logically "build docs". Just like you build Python packages, build npm packages etc. There is no difference.

For example you use the sphinx-build command to build docs.

MarcSkovMadsen commented 2 months ago

To be consistent you should then call it conda-build, npm-build etc.