auspice icon indicating copy to clipboard operation
auspice copied to clipboard

DOC: Why don't we suggest simple `npx` command to run up to date auspice?

Open corneliusroemer opened this issue 2 years ago • 3 comments

Because auspice.us is still on 2.37.2 and bioconda auspice is at 2.37.1 and I wanted to test a mpox PR, I needed an up to date auspice version 2.37.3, so I read through the readme here to see how I can get an up to date serve up.

I was surprised to find the installation instructions to be rather complicated.

In the end, I created my own command that was much simpler:

npx auspice view --datasetDir auspice/

Is there a reason why we don't suggest this in the docs?

corneliusroemer avatar Jun 20 '22 17:06 corneliusroemer

Always happy to improve auspice installation (npm has resulted in plenty of headaches for users over the years). In this case, "much simpler" is one line instead of two - assuming you have an environment with node installed (which is implied if you have npx [1]) then the docs say to run

npm install --global auspice
auspice view --datasetDir data

I think your npx command should work, although I'm not sure about how to update auspice here (see this thread), perhaps npx auspice@latest view --datasetDir auspice/ would be better?

[1] This wasn't the case when we originally build auspice, which is why it's not the documented path. I think npx started being bundled with npm v5.2.

jameshadfield avatar Jun 20 '22 21:06 jameshadfield

Fair, but I still feel like one line rather than two is better, it's 50% less :D

Good point re update, I thought npx automatically pulled the latest, maybe it doesn't - in this case yeah great idea to suggest running @latest!

That would then be the number 1 suggested installation for users, neat command :)

corneliusroemer avatar Jun 21 '22 13:06 corneliusroemer

Notes from earlier meeting: Victor is going to test this out. Happy for it to replace npm install as long as there are no nasty edge cases.

Relatedly, if we can keep the conda distribution up to date, I think this would be preferred (for "ambient" runtime usage).

jameshadfield avatar Jun 30 '22 00:06 jameshadfield

Just getting around to thinking about this alongside related work.

I used npx auspice --help with Node.js 14 and it still runs some sort of npm install in the background every time, which makes it an overall slow experience.

Even if that wasn't the case, npx auspice … downloads the latest up to date Auspice version on the first call, and subsequent calls will continue to use that version until the npm cache is cleared. This behavior is discussed in https://github.com/npm/cli/issues/2329.

npx auspice --ignore-existing would force download of the latest version every time, but that makes it an overall slow experience as previously mentioned.

Going to close as "won't fix". This can be re-opened given a good approach.

victorlin avatar Dec 06 '22 23:12 victorlin