Skip to content

BrentLab/tfbpshiny

Repository files navigation

TFBPShiny

This is a packaged shiny app for the frontend of django.tfbindingandperturbation.com

Install

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

Docker compose (production profile)

This is how to use docker compose to build the production version of the app and run it in the containers:

  1. First, clone the repo

  2. 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>
    
  3. Next, you can build the image:

    docker compose -f production.yml build
  4. And launch

    docker copmpose -f production.yml up

Local development using poetry

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.

Development

To issue pull requests, please:

  1. fork to your own github repo

  2. git clone the repo to your local or open a codespace from your fork

  3. Make sure that you have poetry and pre-commit installed. poetry install and pre-commit install.

  4. git switch to the dev branch. All feature branches must be branched from dev (NOT main)

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

  6. Periodically git rebase back onto dev to make sure your feature branch stays up to date with the dev to make pull requests easier to merge.

  7. When ready, commit, make sure that all pre-commit checks pass and issue a pull request to the BrentLab dev branch (NOT main!)

About

A shiny frontend for django.tfbindingandperturbation.com. This can be accessed at tfbindingandperturbation.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages