Git Product home page Git Product logo

biokey's Introduction

🧬🔑 BioKey

BioKey is the cancer bioinformatics user registration and profile application.

It's to enable current and future users of LabCAS to help manage their identities, including:

  • Registering for a non-EDRN account
  • Updating your details, such as your email address or name
  • Changing your non-EDRN password

👉 Note: If you have an account with EDRN (Early Detection Research Network), you can use it to access LabCAS and other EDRN applications. If you're not sure if you have an account, visit the EDRN Data Management and Coordinating Center and try to log in. If you can't, you don't.

🤓 Development

Make the DB

createdb biokey
./manage.sh makemigrations
./manage.sh migrate wagtailimages  # not sure why this needs to be done separately
./manage.sh migrate

Maybe this is needed?

./manage.sh makemigrations --empty jpledrnbiokeystreams
./manage.sh makemigrations --empty jpledrnbiokeypolicy
./manage.sh makemigrations jpledrnbiokeycontent
./manage.sh makemigrations

Launch it

./manage.sh runserver 6468  # or pick your favorite port

Essential Environment Variables

TBD.

Database

TBD.

Software Installation

TBD.

🚢 Containerized Setup

TBD.

🎑 Image Building

First, build the wheels by running:

support/build-wheels.sh

Then build the image:

docker image build --file docker/Dockerfile --tag edrndocker/biokey .

You can do a spot check to see if the image is viable by running

docker container run --rm --env SIGNING_KEY=key --env ALLOWED_HOSTS='*' --publish 8000:8000 \
    edrndocker/biokey:latest

and then visiting http://localhost:8000/. If you get "Server Error (500)", congratulations! It's working.

To launch the orchestrated services (BioKey application, PostgreSQL database, Redis cache/message queue, and Celery worker)—or in other words, to start the composition—run:

docker compose --project-name biokey --file docker/docker-compose.yaml up --detach

Note the many environment variables that are needed. You'll want to put these into a .env file; see the "Environemnt Variables" section, below. Also, after the first launch only, the database is empty and needs to be structured and populated; see the next section.

📀 Containerized Database Setup

Create the biokey database in PostgreSQL:

docker compose --project-name biokey --file docker/docker-compose.yaml \
    exec db createdb --username=postgres --encoding=UTF8 --owner=postgres biokey

Make sure the POSTGRES_PASSWORD environment variable has the same value when running this command as you did when you started the composition, above.

Next, run the Django database migrations to turn the empty biokey database into a Django-, Wagtail-, and BioKey-capable database:

docker compose --project-name biokey --file docker/docker-compose.yaml \
    exec app /app/bin/django-admin migrate

Finally, populate the content with:

docker compose --project-name biokey --file docker/docker-compose.yaml \
    exec app /app/bin/django-admin biokey_bloom

🪶 Front End Web Server

TBD.

🏛 Database Structure

TBD.

🥤 Initial Form and Content Population

TBD.

🔻 Subpath Serving

TBD.

🍃 Container Environment Variables

TBD.

🍃 Environment Variable Reference

Variable Purpose Default
ALLOWED_HOSTS Valid Host HTTP headers; others rejected .jpl.nasa.gov
BASE_URL Base URL for Wagtail admin interface for generated emails https://edrn-labcas.jpl.nasa.gov/biokey/
BIOKEY_VERSION Version of the BioKey image in Docker Composition latest
CACHE_URL URL to the cache service redis://
CERT_CN Common name of random TLS certificate edrn-docker.jpl.nasa.gov
CSRF_TRUSTED_ORIGINS Comma-separated URLs that provide trusted resources http://*.jpl.nasa.gov,https://*.jpl.nasa.gov
DATA_DIR Where Docker Composition can persist voumes /usr/local/labcas/biokey/ops/dockerdata
EMAIL_HOST_PASSWORD Password to log into SMTP server (unset)
EMAIL_HOST_USER Username to log into SMTP server (unset)
EMAIL_HOST Host name of SMTP server smtp.jpl.nasa.gov
EMAIL_PORT Port number of SMTP server 587
EMAIL_USE_SSL True if to use SSL to access SMTP server False
EMAIL_USE_TLS True if to use TLS to access SMTP server True
FORCE_SCRIPT_NAME Subpath if the app isn't at the root URL (unset, except /biokey/ in Docker Composition)
HTTP_PORT http non-TLS port for BioKey (see PROXY_PORT for TLS) 8080
IMAGE_RENDITIONS_CACHE_SIZE How many various resolutions of images to cache 1000
IMAGE_RENDITIONS_CACHE_TIMEOUT How long to cache image renditions (seconds) 86400
LDAP_CACHE_TIMEOUT Timeout in seconds to cache results from LDAP_URI 3600
LDAP_URI LDAP server for Wagtail administrator authentication ldaps://ldap-202007.jpl.nasa.gov
MEDIA_ROOT Filesystem location of user media $CWD/media
MEDIA_URL URL to user media (images, documents) /media/
MQ_URL URL to message queue redis://
POSTGRES_PASSWORD Root password to Postgres DB in Docker Composition (unset)
PROXY_PATH Subpath in TLS-termination of BioKey /biokey/ in Docker Composition
HTTPS_PORT Host port to bind to for TLS-based termination of BioKey 4234
RECAPTCHA_PRIVATE_KEY Private key of reCAPTCHA service (unset)
RECAPTCHA_PUBLIC_KEY Public key of reCAPTCHA service (unset)
SECURE_COOKIES True if to use secure (HTTPS) cookies only True
SIGNING_KEY Opaque key used to sign secrets (unset but required)
STATIC_ROOT Filesystem location of static files $CWD/static
STATIC_URL URL to static resources /static/

👩‍💻 Software Environment

TBD.

👥 Contributing

You can start by looking at the open issues, forking the project, and submitting a pull request. You can also contact us by email with suggestions.

🔢 Versioning

We use the SemVer philosophy for versioning this software. For versions available, see the releases made on this project.

👩‍🎨 Creators

The principal developer is:

The QA team consists of:

To contact the team as a whole, email the Informatics Center.

🏞️ Image Credits

Images used in this software from Pexels, namely:

See the Pexels license.

📃 License

The software is licensed under the Apache version 2 license.

biokey's People

Contributors

nutjob4life avatar

biokey's Issues

Implement a password change form

📜 Describe the Requirement

BioKey shall provide a way for users to change their passwords.

☑️ Success Criteria

Replace this text by answering the question: if the software satisfies the requirement, how would you know? You can use GitHub check boxes (i.e., - [ ] box label) if you like.

〽️ Alternative Ideas

Replace this text with a description of any alternative solutions or features you've considered.

🗺 Context

Requested by @hoodriverheather

Web app look-and-feel (theme)

📜 Describe the Requirement

The EDRN LabCAS profile app (user registration and password change) should adhere to a certain look-and-feel, or "theme".

Possible themes:

Regardless, Bootstrap should be used as a base due to its wide array of widgets, layout support, and mobile-friendliness.

@hoodriverheather: what should the theme be?

☑️ Success Criteria

This is subjective, of course, but if anything it should look like a "well dressed" website and not plain, un-styled HTML.

〽️ Alternative Ideas

FYI, there's a nice collection of other themes out there.

Implement form to register new users

📜 Describe the Requirement

BioKey shall have a form similar to this Google form to support registration of new users.

A newly registered user should send a notification to the IC team.

The system shall provide a way to approve or deny registration.

☑️ Success Criteria

Replace this text by answering the question: if the software satisfies the requirement, how would you know? You can use GitHub check boxes (i.e., - [ ] box label) if you like.

〽️ Alternative Ideas

Replace this text with a description of any alternative solutions or features you've considered.

🗺 Context

Requested by @hoodriverheather

Test the registration form with a test user

📜 Describe the Requirement

The registration form shall be tested with a test user.

The test user should be able to access LabCAS data University_of_Washington_Microarray_Data

☑️ Success Criteria

Replace this text by answering the question: if the software satisfies the requirement, how would you know? You can use GitHub check boxes (i.e., - [ ] box label) if you like.

〽️ Alternative Ideas

Replace this text with a description of any alternative solutions or features you've considered.

🗺 Context

Requested by @hoodriverheather

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.