nextstrain / auspice

Web app for visualizing pathogen evolution
https://docs.nextstrain.org/projects/auspice/
GNU Affero General Public License v3.0
291 stars 162 forks source link

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

Closed corneliusroemer closed 1 year ago

corneliusroemer commented 2 years ago

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?

jameshadfield commented 2 years ago

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.

corneliusroemer commented 2 years ago

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 :)

jameshadfield commented 2 years ago

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).

victorlin commented 1 year ago

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.