MetabolicAtlas / data-generation

Process the raw data-files for ingestion into the Neo4j database
MIT License
0 stars 0 forks source link

feat: add script for testing versions #25

Closed MalinAhlberg closed 3 years ago

MalinAhlberg commented 3 years ago

This addresses task 5 in https://github.com/MetabolicAtlas/MetabolicAtlas/issues/684, the purpose being automatically letting the user know if theyarn and node versions are outdated. Background: multiple (at least more than one...) user has been confused by the non-informative error messages you get when you try to run the installation with older versions of yarn/node.

To try it, run ./generate or ./generate ../path-to-datafiles. This replaces

$ yarn
$ yarn start path-to-data-files

Please also see the Readme. If versions are outdated, the output will look like this:

Error! Need node version v12 or above

However, I'm not sure that my proposed solution really helps here (hence the draft PR). Running yarn may seem more standard and appealing to many users, rather than running a bash script? And just adding an extra script to run before you run yarn may also just complicate, rather than facilitate things?

MalinAhlberg commented 3 years ago

Another option is to keep this script in the MetabolicAtlas repo instead of here, and to use it as a tool for users who run into problem during installation (ie not as an installation script). Over time, more checks could be added.

MalinAhlberg commented 3 years ago

Great work! Maybe the function generate-data can be updated accordingly as well.

Good idea! Perhaps we should first decide how to proceed with this pr, though. Let's wait and see what @mihai-sysbio and @e0 thinks.

mihai-sysbio commented 3 years ago

Looks good to me!

Another option is to keep this script in the MetabolicAtlas repo instead of here, and to use it as a tool for users who run into problem during installation (ie not as an installation script). Over time, more checks could be added.

@MalinAhlberg would it work to keep this script in this repo but call it from proj.sh by updating this line?

If so, both documentations (readmes) might need an extra look that the description of the data generation is consistent.

MalinAhlberg commented 3 years ago

@MalinAhlberg would it work to keep this script in this repo but call it from proj.sh by updating this line?

Hm, the script should be called before the installation of data-generation, which happens before that line is called. I'm not sure how much we would want to move around things :thinking: