-
Make sure you have docker compose (https://docs.docker.com/compose/install/) installed. Build the image regulome:
docker compose build
-
Run regulome:
docker compose up
-
The app will be running at http://0.0.0.0:6543.
-
Stop and remove containers, networks:
docker compose down
-
In Docker Desktop, find the running docker compose (should be named as "regulome-encoded"), there will be one docker container runing inside. Select the "CLI" to open the terminal:
npm run dev
-
The above command runs continually in the terminal window and watches for changes in Javascript and SCSS files, rebuilding the bundles as you make changes.
- Choose the regulome service and run the specific test command, for example:
docker-compose run regulome npm test
-
Install dependency boto3 first then deploy:
pip3 install boto3 python src/encoded/commands/deploy.py --profile-name regulome
-
The demo link uses this format: https://[instance_name].demo.regulomedb.org/regulome-search/
-
Deploy script help (how to specify name, instance size, etc):
python src/encoded/commands/deploy.py --help
-
For all options, including setting up ES clusters (needed for full production). After indexing (currently 8+hrs) the machine can be downsized at AWS to an m4.2xlarge, unless you are planning to submit significant data to it.
To set up linting with Sublime Text 3 or Visual Studio Code, first install the linters:
pip3 install flake8
npm install -g eslint
npm install -g eslint-plugin-react
⚠️ Note: You don't have to use Sublime Text 3 but you must ensure that linting in your editor behaves as it does in Sublime Text 3.
After first setting up Package Control (follow install and usage instructions on site), use it to install the following linting packages in Sublime Text 3:
sublimelinter
sublimelinter-flake8
SublimeLinter-contrib-eslint
(Sublime linter eslint instructions)babel
(Babel instructions)
Sublime Linting with pyenv
To get Sublime to lint Python code using pyenv
you must add the python version and paths and python_paths to your Sublime Linter Preferences. In Sublime Text, navigate to the user linter preferences:
-
Sublime Preferences -> Package Settings -> Sublime Linter -> Settings-User
-
Add the following (modify existing preference settings file or add this entire JSON object below if the file is blank):
{
"user": {
"@python": 3.8,
"paths": {
"linux": [],
"osx": [
"/Users/YOURUSERNAME/.pyenv/versions/3.8.10/bin/",
"/Users/YOURUSERNAME/.pyenv/versions/2.7/bin/"
],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [
"/Users/YOURUSERNAME/.pyenv/versions/3.8.10/bin/python3",
"/Users/YOURUSERNAME/.pyenv/versions/2.7/bin/python"
],
"windows": []
}
}
}
- Restart Sublime
Go to the Visual Studio Code marketplace and install these extensions:
- ESLint
- Python
- Sass
Versions
python3 --version
returnsPython 3.8.10
(or variant like 3.8.x)node --version
returnsv10.15.0
(or variant like v6.x.y)
Linting check
-
Python: Open Sublime, make a change to a Python file, make an intentional syntax error (no
:
at the end anif
evaluation). Warnings and errors should show on the left side of the line. -
JavaScript: Make a syntax error, or style error, in a JS file. Warnings and errors should show on the left side of the line.