This is a packaged shiny app for the frontend of django.tfbindingandperturbation.com
This may be installed from github using pip. To install the most up to date version,
install the dev
branch
pip install git+https://github.com/BrentLab/tfbpshiny@dev
This is how to use docker compose to build the production version of the app and run it in the containers:
-
First, clone the repo
-
Next,
cd
into the repo and add a.envs/
directory. The.envs
directory should have the following structure:.envs/.production/{.shiny,.traefik}
Where
.shiny
and.traefik
are text files. They should have the following variables at minimum:.shiny
DOCKER_ENV=true BASE_URL='https://django.tfbindingandperturbation.com' TOKEN='your token here' BINDING_URL='https://django.tfbindingandperturbation.com/api/binding' BINDINGCONCATENATED_URL='https://django.tfbindingandperturbation.com/api/bindingconcatenated/' BINDINGMANUALQC_URL='https://django.tfbindingandperturbation.com/api/bindingmanualqc' CALLINGCARDSBACKGROUND_URL='https://django.tfbindingandperturbation.com/api/callingcardsbackground' DATASOURCE_URL='https://django.tfbindingandperturbation.com/api/datasource' DTO_URL='https://django.tfbindingandperturbation.com/api/dto' EXPRESSION_URL='https://django.tfbindingandperturbation.com/api/expression' EXPRESSIONMANUALQC_URL='https://django.tfbindingandperturbation.com/api/expressionmanualqc' FILEFORMAT_URL='https://django.tfbindingandperturbation.com/api/fileformat' GENOMICFEATURE_URL='https://django.tfbindingandperturbation.com/api/genomicfeature' PROMOTERSET_URL='https://django.tfbindingandperturbation.com/api/promoterset' PROMOTERSETSIG_URL='https://django.tfbindingandperturbation.com/api/promotersetsig' RANKRESPONSE_URL='https://django.tfbindingandperturbation.com/api/rankresponse' REGULATOR_URL='https://django.tfbindingandperturbation.com/api/regulator' UNIVARIATEMODELS_URL='https://django.tfbindingandperturbation.com/api/univariatemodels'
.traefik
TRAEFIK_DASHBOARD_PASSWORD_HASH=<hashed password>
-
Next, you can build the image:
docker compose -f production.yml build
-
And launch
docker copmpose -f production.yml up
Git clone the app as usual, cd into it and poetry install. Add a .env
file that is the same as the .shiny
file above, minus the DOCKER_ENV
variable. Then you can do:
poetry run python -m tfbpshiny --log-level INFO shiny \
--port 8010 --host 127.0.0.1 --debug
with any valid port that will work for you.
To issue pull requests, please:
-
fork to your own github repo
-
git clone the repo to your local or open a codespace from your fork
-
Make sure that you have poetry and pre-commit installed.
poetry install
andpre-commit install
. -
git switch
to thedev
branch. All feature branches must be branched fromdev
(NOTmain
) -
Create a branch from
dev
(git switch -c new_branch
) and start coding! Please keep feature branches as small as possible in order to make code review eaiser -
Periodically
git rebase
back ontodev
to make sure your feature branch stays up to date with thedev
to make pull requests easier to merge. -
When ready, commit, make sure that all
pre-commit
checks pass and issue a pull request to the BrentLabdev
branch (NOTmain
!)