Commit cbda3ef5 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Allow to install as simple user on unix systems + update documentation

parent 4a228a68
import os
import sys
from setuptools import setup, find_packages
from pip.req import parse_requirements
from pathlib import Path
install_reqs = parse_requirements('requirements.txt', session='hack')
# reqs is a list of requirement
......@@ -10,6 +12,12 @@ version = '1.0.1'
if == "posix":
config_dir = '/etc/dgenies'
wsgi_dir = '/var/www/dgenies'
if '--user' in sys.argv:
config_dir = os.path.join(str(Path.home()), ".dgenies")
wsgi_dir = config_dir
......@@ -18,9 +26,9 @@ if == "posix":
data_files=[('/etc/dgenies', ['']),
('/etc/dgenies', ['tools.yaml']),
('/var/www/dgenies', ['dgenies.wsgi'])],
data_files=[(config_dir, ['']),
(config_dir, ['tools.yaml']),
(wsgi_dir, ['dgenies.wsgi'])],
......@@ -23,7 +23,8 @@ class AppConfigReader:
config_file_search = [os.path.join(os.path.abspath(os.sep), "dgenies", ""),
os.path.join(str(Path.home()), ".dgenies", "")]
os.path.join(str(Path.home()), ".dgenies", ""),
os.path.join(str(Path.home()), ".dgenies", "")]
if == "nt":
config_file.insert(1, os.path.join(sys.executable, '..', ""))
......@@ -10,10 +10,16 @@ Linux
### Install
Install in 1 step (as root):
Install in 1 step:
As root:
pip3 install dgenies
Or as simple user:
pip3 install dgenies --user
Alternatively, you can install it manually:
git clone
......@@ -26,6 +32,8 @@ Alternatively, you can install it manually:
#### Standalone mode
pip3 install dgenies --upgrade
Add `--user` flag if you have not root access.
#### Webserver mode
......@@ -177,7 +185,14 @@ Configuration
Changing the default configuration is not required for standalone mode, but you can want to custom some parts of the program.
Configuration is stored in the `/etc/dgenies/` file (linux) or in the `` file of the install folder (windows). The file is divided in 9 parts described below.
Configuration file location:
* Linux:
* `/etc/dgenies/` if installed with root access
* `~/.dgenies/` else
* Windows:
* `` file of the install folder
The file is divided in 9 parts described below.
To change this file, please copy it into `` (at the same location) to avoid erase of the file on upgrades.
......@@ -198,16 +213,6 @@ For webserver mode only (ignored in standalone mode):
* `batch_system_type`: local for run all jobs locally, sge or slurm to use a cluster scheduler.
### Softwares
Paths to the external software should be set here:
* `minimap2`: path to minimap2 software (keep as it to use built-in)
And if you use a cluster:
* `minimap2_cluster`: path to minimap2 on the cluster
### Debug
Some parameters for debug:
......@@ -294,6 +299,10 @@ Fill for target and query the absolute local path of the file. This path will no
If at least target is filled, a button "Load example" will be shown in the run form. Click on it will load example data in the form.
### Analytics
Set `enable_logging_runs` to True will enable storage of analytics data. It stores for each job creation date, user mail, size of query and target, and batch type.
......@@ -106,6 +106,7 @@ class Tools:
config_file_search = [os.path.join(os.path.abspath(os.sep), "dgenies", "tools.yaml"),
os.path.join(str(Path.home()), ".dgenies", "tools.yaml"),
os.path.join(str(Path.home()), ".dgenies", "tools.yaml.local")]
if == "nt":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment