README.md 1.36 KB
Newer Older
CHARLES's avatar
CHARLES committed
1
2
3
4
5


# Downloader daemon

Checks online services for changed in data files, and downloads them when needed.
CHARLES's avatar
CHARLES committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# Installation

## Conda

```
# Create conda env
conda env create -f environment.yaml

# Activate created env
conda activate downloader

# Install the downloader
./setup.py install
```
CHARLES's avatar
CHARLES committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38


# Development

## Tooling

```
# Install developer tools
pip install -r requirements-dev.txt
```

### Linter

Using command-line:
```bash
# Run linter against current codebase
pylint --errors-only --output-format=colorized lib/
# The --errors-only flag only shows the errors
CHARLES's avatar
CHARLES committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

# Detect more issues:
pylint --disable=C0103,C0111,C0301,C0302,C0411,C1801,R0205,R0902,R0904,R0912,R0913,R0914,R0915 lib/
# C0103: snake_case convention
# C0111: missing doc
# C0301: line too long
# C0302: too many lines
# C0411: import order
# C1801: length != 0 as condition
# R0205: explicit object inheritance
# R0902: too many attributes
# R0904: too many methods
# R0912: too many branches
# R0913: too many arguments
# R0914: too many local variables
# R0915: too many instructions
CHARLES's avatar
CHARLES committed
55
56
57
58
59
60
61
62
63
64
65
66
```

There are also plugins for many editors and IDEs.

### Code formatting

The code has been automatically formatted to follow PEP8 standard.
```bash
# Format every python source file in lib/ folder
autopep8 --in-place --recursive -j8 lib/
```

CHARLES's avatar
CHARLES committed
67
68
69
70
71
72
73
There are also plugins for many editors and IDEs.

### Unit testing

```
pytest lib/
```