-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdump.py
38 lines (30 loc) · 1.08 KB
/
dump.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import biothings, config
biothings.config_for_app(config)
from config import DATA_ARCHIVE_ROOT
import biothings.hub.dataload.dumper
import datetime
class PDumper(biothings.hub.dataload.dumper.DummyDumper):
SRC_NAME = "protocolsio"
__metadata__ = {
"src_meta": {
"author":{
"name": "Marco Cano",
"url": "https://github.com/marcodarko"
},
"code":{
"branch": "master",
"repo": "https://github.com/marcodarko/protocolsio.git"
},
"license": "https://www.protocols.io/terms#tos1",
"url" : "https://www.protocols.io/groups/coronavirus-method-development-community/publications"
}
}
# override in subclass accordingly
SRC_ROOT_FOLDER = os.path.join(DATA_ARCHIVE_ROOT, SRC_NAME)
SCHEDULE = "20 6 * * *"
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.set_release()
def set_release(self):
self.release = datetime.datetime.now().strftime('%Y-%m-%d-%H:%M')