Skip to main content

No project description provided

Project description

LARA-django

The core LARA project database and webservice, hosting LARA-django applications for planning, storing and presenting experimental data and its meta data, realised as a python-django project

Installation

The installation process of the database core of LARA is a very simple two-step process: Download the docker-compose file and the .env file, and then run docker compose pull and then up, like described below:

To Run development version with docker compose:

 wget https://gitlab.com/LARAsuite/lara-django/-/raw/master/docker/docker-compose.dev-full.yml
 wget https://gitlab.com/LARAsuite/lara-django/-/raw/master/docker/.env.dev
 
 # or if you like curl:
 curl -O https://gitlab.com/LARAsuite/lara-django/-/blob/master/docker/docker-compose.dev-full.yml
 curl -O https://gitlab.com/LARAsuite/lara-django/-/blob/master/docker/.env.dev

Important: rename .env.dev -> .env :

 mv .env.dev .env

Important: in .env replace 'latest' in DOCKER_IMAGE_TAG=latest by current short git commit hash (first 8 characters of hash).

 # example: 
 DOCKER_IMAGE_TAG=b6e72259

mind: the LARA admin / login credentials are also set in the .env file, change them to your liking

To run docker compose as a non-root user, add your user to the docker group: and mind to log out and in again to activate the group membership

sudo addgroup $USER docker

To pull the docker containers from the github container registry, run in the directory where the docker-compose file is located:

 docker compose -f docker-compose.dev-full.yml  pull

This above procedure needs to be done only once, to update the docker containers, run the above pull command again.

Starting LARA-django with docker compose (development version)

To start the docker containers, run in the directory where the docker-compose file is located (add -d to run in the background):

 docker compose -f docker-compose.dev-full.yml up

Monitoring and Creating new entries to the LARA database:

Login to LARA-django interface with the credentials set in the .env file:

http://localhost:8008

or

http://127.0.0.1:8008

If you see the LARA home screen, then Welcome to the new LARA world!

LARA-django admin interface:

http://localhost:8008/admin or http://127.0.0.1:8008/admin

Environment variables

for development, please set (in the .env file)

export DJANGO_ALLOWED_HOSTS=localhost
export DJANGO_SETTINGS_MODULE=lara_django.settings.devel

for production, please set

export DJANGO_SETTINGS_MODULE=lara_django.settings.production

if your media does not reside in the default media folder, please set environment variable to

export DJANGO_MEDIA_PATH='path/to/my/media'

to use user defined fixtures, please set: :: export

DJANGO_FIXTURE_PATH='path/to/user/fixtures'

Testing all applications

Basic Commands

Type checks

Running type checks with mypy:

$ mypy lara_django

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests with pytest

$ pytest

Built with Cookiecutter Django Black code style

License: GPLv3

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lara_django-0.2.108.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lara_django-0.2.108-py3-none-any.whl (11.5 MB view details)

Uploaded Python 3

File details

Details for the file lara_django-0.2.108.tar.gz.

File metadata

  • Download URL: lara_django-0.2.108.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for lara_django-0.2.108.tar.gz
Algorithm Hash digest
SHA256 7e476245f53415ca2d0fd0976cb9a4b62e71f8f2ee550310c64b3a2ac6428c57
MD5 17c698271d590935b526c6859ed646a6
BLAKE2b-256 e440b0718acd318fc0addb655c03a0c827b92bebba802a61e1b8fb49afa54bbe

See more details on using hashes here.

File details

Details for the file lara_django-0.2.108-py3-none-any.whl.

File metadata

  • Download URL: lara_django-0.2.108-py3-none-any.whl
  • Upload date:
  • Size: 11.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for lara_django-0.2.108-py3-none-any.whl
Algorithm Hash digest
SHA256 85b20c9af581500bcca2b7c398e941132c6cf9add0096c8960fbf128bf41a1d0
MD5 7027dad02063095efd5280c590940ac3
BLAKE2b-256 09dbd6592ecef761b4c76d471d4609ceaa592f0152ca072cd6ba782cbe894b7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page