dryad2dataverse 0.8.0__py3-none-any.whl → 0.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dryad2dataverse/__init__.py +1 -1
- dryad2dataverse/data/dryad2dataverse_config.yml +4 -3
- dryad2dataverse/scripts/dryadd.py +19 -3
- {dryad2dataverse-0.8.0.dist-info → dryad2dataverse-0.8.1.dist-info}/METADATA +1 -1
- {dryad2dataverse-0.8.0.dist-info → dryad2dataverse-0.8.1.dist-info}/RECORD +7 -7
- {dryad2dataverse-0.8.0.dist-info → dryad2dataverse-0.8.1.dist-info}/WHEEL +0 -0
- {dryad2dataverse-0.8.0.dist-info → dryad2dataverse-0.8.1.dist-info}/entry_points.txt +0 -0
dryad2dataverse/__init__.py
CHANGED
|
@@ -26,7 +26,7 @@ downloading and file duplication.
|
|
|
26
26
|
|
|
27
27
|
import sys
|
|
28
28
|
|
|
29
|
-
VERSION = (0, 8,
|
|
29
|
+
VERSION = (0, 8, 1)
|
|
30
30
|
__version__ = '.'.join([str(x) for x in VERSION])
|
|
31
31
|
USERAGENT = (f'dryad2dataverse/v{__version__} ({sys.platform.capitalize()}); '
|
|
32
32
|
f'Python {sys.version[:sys.version.find("(")-1]}')
|
|
@@ -20,7 +20,7 @@ secret: null
|
|
|
20
20
|
#Base url of Dataverse instance (eg: https://borealisdata.ca)
|
|
21
21
|
dv_url: null
|
|
22
22
|
#Dataverse API KEY
|
|
23
|
-
|
|
23
|
+
api_key: null
|
|
24
24
|
#Maximum upload size in bytes (contact Dataverse administrator for value if unknown)
|
|
25
25
|
max_upload: 3221225472
|
|
26
26
|
#Contact email address for Dataverse record, eg: research.data@test.invalid
|
|
@@ -78,8 +78,9 @@ recipients:
|
|
|
78
78
|
- null
|
|
79
79
|
#location of dryadd log
|
|
80
80
|
#include full file name: eg: /var/log/dryadd.log
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
#The default below will exist but is a terrible place
|
|
82
|
+
#for a log so you should change it.
|
|
83
|
+
log: ~/dryadd.log
|
|
83
84
|
#level at which to write a log message. Select from:
|
|
84
85
|
# debug, info, warning, error or critical
|
|
85
86
|
loglevel: warning
|
|
@@ -492,6 +492,12 @@ def test_config(cfile:pathlib.Path):
|
|
|
492
492
|
print('Configuration file error', file=sys.stdout)
|
|
493
493
|
print(e, file=sys.stderr)
|
|
494
494
|
sys.exit()
|
|
495
|
+
#this shouldn't happen ever, but just in case
|
|
496
|
+
except FileNotFoundError as e:
|
|
497
|
+
print(e, file=sys.stderr)
|
|
498
|
+
sys.exit()
|
|
499
|
+
|
|
500
|
+
|
|
495
501
|
|
|
496
502
|
def main():
|
|
497
503
|
'''
|
|
@@ -499,13 +505,23 @@ def main():
|
|
|
499
505
|
'''
|
|
500
506
|
#pylint: disable=too-many-branches, too-many-locals, too-many-statements
|
|
501
507
|
args = argp().parse_args()
|
|
502
|
-
configfile = pathlib.Path(args.config)
|
|
508
|
+
configfile = pathlib.Path(args.config).expanduser().absolute()
|
|
509
|
+
if not configfile.exists():
|
|
510
|
+
print(('Config file not found. Creating it at '
|
|
511
|
+
f'{str(configfile)} and exiting.') , file=sys.stderr)
|
|
512
|
+
config = dryad2dataverse.config.Config(configfile.parent, configfile.name)
|
|
513
|
+
sys.exit()
|
|
514
|
+
else:
|
|
515
|
+
config = dryad2dataverse.config.Config(configfile.parent, configfile.name)
|
|
503
516
|
test_config(configfile)
|
|
504
|
-
config = dryad2dataverse.config.Config(configfile.parent, configfile.name)
|
|
505
517
|
for val in ['api_key', 'secret']:
|
|
506
518
|
if getattr(args,val):
|
|
507
519
|
config[val] = getattr(args,val)
|
|
508
|
-
|
|
520
|
+
try:
|
|
521
|
+
config.validate()
|
|
522
|
+
except ValueError as e:
|
|
523
|
+
print(e, file=sys.stderr)
|
|
524
|
+
sys.exit()
|
|
509
525
|
config['token'] = dryad2dataverse.auth.Token(**config)
|
|
510
526
|
|
|
511
527
|
logpath = pathlib.Path(config['log']).expanduser().absolute()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dryad2dataverse
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: Utility for copying and syncing data from a Dryad data repository to a Dataverse repository
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: Harvard Dataverse,Dataverse,research data management,data repository,Dryad,datadryad.org,dataverse.org
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
dryad2dataverse/__init__.py,sha256=
|
|
1
|
+
dryad2dataverse/__init__.py,sha256=e034K3LQEPO1wDDA2w539h6arIQTIqCCiw6W6hMSmGQ,915
|
|
2
2
|
dryad2dataverse/auth.py,sha256=NsM9TFTd6J29mdWBqbEsIjTcHgjPCQ8REwIO-pzeGR0,2848
|
|
3
3
|
dryad2dataverse/config.py,sha256=UiFqS1PgIP0IHtRcZbFL5T-ziC3Hqw5N8VTl_0GA0aQ,5917
|
|
4
|
-
dryad2dataverse/data/dryad2dataverse_config.yml,sha256=
|
|
4
|
+
dryad2dataverse/data/dryad2dataverse_config.yml,sha256=74M6VDdU-wToBbv0gzVU8GbIETJ6kE1uNsKrGEGN8cw,3978
|
|
5
5
|
dryad2dataverse/exceptions.py,sha256=oIP1_fSEvLF3HpK6gOYb05vUisY-IAxwXZDeNoAvCPM,1008
|
|
6
6
|
dryad2dataverse/handlers.py,sha256=9c0ksWVIBJVMP5mO0O36QRnEUg6I9e4MdQWCvdwKBo4,1569
|
|
7
7
|
dryad2dataverse/monitor.py,sha256=ctrbdNk7BglM_YCpHNV5ay-zB7XN6xbQUHJhsBwgO_E,26193
|
|
8
|
-
dryad2dataverse/scripts/dryadd.py,sha256=
|
|
8
|
+
dryad2dataverse/scripts/dryadd.py,sha256=PkWeT4t0AN_sCttFFFyWXaQubFhOL1ZORw9KSTYdLcw,26852
|
|
9
9
|
dryad2dataverse/serializer.py,sha256=_GQBqDmZa_dJZmtf2X699WWiJWxuWdH5s1k-EafK1fI,33531
|
|
10
10
|
dryad2dataverse/transfer.py,sha256=3Uzr9N1X-muIHGqmWacO4mEIQ_wo4MzpkEDCEB_NWlA,34794
|
|
11
|
-
dryad2dataverse-0.8.
|
|
12
|
-
dryad2dataverse-0.8.
|
|
13
|
-
dryad2dataverse-0.8.
|
|
14
|
-
dryad2dataverse-0.8.
|
|
11
|
+
dryad2dataverse-0.8.1.dist-info/METADATA,sha256=hJD1Qix550QE02D6chCguCU9Zgf3Ej4a6kV4PvlJf3Q,3817
|
|
12
|
+
dryad2dataverse-0.8.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
13
|
+
dryad2dataverse-0.8.1.dist-info/entry_points.txt,sha256=P-Wu7phJ2dGqaZT6OzHEgy3I-TXXq_7ad67r--O8IcA,62
|
|
14
|
+
dryad2dataverse-0.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|