Lomax is the Workbench Archiving Service. It will handle bulk movement of GCS data into and out of archives, with an overall goal of saving users' money by taking advantage of cheaper storage classes for archives.
This service is named after the legendary music archiver Alan Lomax.
This codebase requires npm and Node.js.
Specifically, it wants Node.js version 8.15.0, or whatever minor/patch version
Google documents at https://cloud.google.com/functions/docs/concepts/nodejs-8-runtime.
npm
is included in the Node.js
install so typically you do not have to install
it separately.
If you already have a different version of Node on your system, think you might
need different versions in the future, or you have a hard time finding
the right version of Node to install, you might be interested in nvm.
nvm
is not required to work with Lomax, but it is highly recommended and
very useful to install and manage multiple versions of Node.
To install third-party libraries, first cd function
, then npm install
.
You will need to npm install
any time package.json
or package-lock.json changes. Conversely, if
those files have not changed since your last install, you should not have
to run npm install
. You must npm install
before linting or testing.
This is a minimal set of commands that may work for you:
brew install nvm
nvm install 8.15.0
cd function
npm install
npm test
- If you have not done so already run
brew install git-secrets
- To ensure git secrets is run please copy or link the hooks directory to .git/hooks/ locally.
- For more information (as a Broadie) see: https://broadinstitute.atlassian.net/wiki/spaces/GAWB/pages/136445956/Git+Secrets+SHHHHH
cd function
- make sure you're in the right directory. The root of this repostory is NOT the right directory!npm run lint
- note you need the extrarun
command.
If you have linter errors, you can access the linter directly with npx eslint
.
For instance, to ask eslint
to fix the errors it found, run npx eslint . --fix
.
cd function
- make sure you're in the right directory. The root of this repostory is NOT the right directory!npm test
npm test
will automatically lint the code before running tests, and will
fail on linter exceptions. This happens via the pretest
hook in package.json
.