cdxcore 0.1.9__py3-none-any.whl → 0.1.10__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.
Potentially problematic release.
This version of cdxcore might be problematic. Click here for more details.
- cdxcore/__init__.py +1 -1
- cdxcore/subdir.py +13 -5
- cdxcore/version.py +1 -1
- {cdxcore-0.1.9.dist-info → cdxcore-0.1.10.dist-info}/METADATA +1 -1
- cdxcore-0.1.10.dist-info/RECORD +35 -0
- {cdxcore-0.1.9.dist-info → cdxcore-0.1.10.dist-info}/top_level.txt +0 -1
- tests/test_config.py +1 -3
- tests/test_crman.py +1 -1
- tests/test_err.py +1 -1
- tests/test_pretty.py +1 -1
- tests/test_subdir.py +1 -1
- tests/test_uniquehash.py +1 -1
- tests/test_util.py +1 -1
- tests/test_verbose.py +1 -1
- tests/test_version.py +1 -1
- cdxcore-0.1.9.dist-info/RECORD +0 -36
- docs2/source/conf.py +0 -35
- {tmp → cdxcore}/jcpool.py +0 -0
- {cdxcore-0.1.9.dist-info → cdxcore-0.1.10.dist-info}/WHEEL +0 -0
- {cdxcore-0.1.9.dist-info → cdxcore-0.1.10.dist-info}/licenses/LICENSE +0 -0
cdxcore/__init__.py
CHANGED
cdxcore/subdir.py
CHANGED
|
@@ -339,7 +339,6 @@ Documentation
|
|
|
339
339
|
-------------
|
|
340
340
|
"""
|
|
341
341
|
|
|
342
|
-
|
|
343
342
|
import os as os
|
|
344
343
|
import uuid as uuid
|
|
345
344
|
import threading as threading
|
|
@@ -355,11 +354,9 @@ from enum import Enum
|
|
|
355
354
|
from functools import update_wrapper
|
|
356
355
|
|
|
357
356
|
import json as json
|
|
358
|
-
import jsonpickle as jsonpickle
|
|
359
|
-
import jsonpickle.ext.numpy as jsonpickle_numpy
|
|
360
357
|
import gzip as gzip
|
|
361
358
|
import blosc as blosc
|
|
362
|
-
|
|
359
|
+
import sys as sys
|
|
363
360
|
from .err import verify, error, warn, fmt as txtfmt
|
|
364
361
|
from .pretty import PrettyObject
|
|
365
362
|
from .verbose import Context
|
|
@@ -372,7 +369,16 @@ from .uniquehash import unique_hash48, UniqueLabel, NamedUniqueHash
|
|
|
372
369
|
:meta private:
|
|
373
370
|
compression
|
|
374
371
|
"""
|
|
375
|
-
|
|
372
|
+
|
|
373
|
+
def _import_jsonpickle():
|
|
374
|
+
""" For some dodgy reason importing `jsonpickle` normally causes my tests to fail with a recursion error """
|
|
375
|
+
jsonpickle = sys.modules.get('jsonpickle', None)
|
|
376
|
+
if jsonpickle is None:
|
|
377
|
+
import jsonpickle as jsonpickle
|
|
378
|
+
import jsonpickle.ext.numpy as jsonpickle_numpy
|
|
379
|
+
jsonpickle_numpy.register_handlers()
|
|
380
|
+
return jsonpickle
|
|
381
|
+
|
|
376
382
|
BLOSC_MAX_BLOCK = 2147483631
|
|
377
383
|
BLOSC_MAX_USE = 1147400000 # ... blosc really cannot handle large files
|
|
378
384
|
#
|
|
@@ -1518,6 +1524,7 @@ class SubDir(object):
|
|
|
1518
1524
|
return ok
|
|
1519
1525
|
# read
|
|
1520
1526
|
if fmt == Format.JSON_PICKLE:
|
|
1527
|
+
jsonpickle = _import_jsonpickle()
|
|
1521
1528
|
return jsonpickle.decode( f.read() )
|
|
1522
1529
|
else:
|
|
1523
1530
|
assert fmt == Format.JSON_PLAIN, ("Internal error: unknown Format", fmt)
|
|
@@ -1935,6 +1942,7 @@ class SubDir(object):
|
|
|
1935
1942
|
if not version is None:
|
|
1936
1943
|
f.write("# " + version + "\n")
|
|
1937
1944
|
if fmt == Format.JSON_PICKLE:
|
|
1945
|
+
jsonpickle = _import_jsonpickle()
|
|
1938
1946
|
f.write( jsonpickle.encode(obj) )
|
|
1939
1947
|
else:
|
|
1940
1948
|
assert fmt == Format.JSON_PLAIN, ("Internal error: invalid Format", fmt)
|
cdxcore/version.py
CHANGED
|
@@ -498,7 +498,7 @@ class Version(object):
|
|
|
498
498
|
"""
|
|
499
499
|
Compute hash for use with :class:`cdxcore.uniquehash.UniqueHash`.
|
|
500
500
|
"""
|
|
501
|
-
return self.unique_id(max_len=
|
|
501
|
+
return self.unique_id(max_len=unique_hash.length)
|
|
502
502
|
|
|
503
503
|
# =======================================================
|
|
504
504
|
# @version
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
cdxcore/__init__.py,sha256=DzMRN-6SAKCjFPYC72fGXBql03834TWP2QnjtPSb_vc,127
|
|
2
|
+
cdxcore/config.py,sha256=YnIEJVFtMZ5EHlwzaB2JsSkCPhWPvEw9QSpe6mof_V4,98472
|
|
3
|
+
cdxcore/crman.py,sha256=jOw40Bh6PkmEiabA7OS9NsqF-9viam3CBiKzPwxVkVw,5693
|
|
4
|
+
cdxcore/err.py,sha256=SIJMBXKXYI_hiysv5iSPRy0w_BbxyTDPbNEs56Y94Rk,14541
|
|
5
|
+
cdxcore/jcpool.py,sha256=OzoXWBJKWaDgJm1OeUj9ERz9skvwslGOwNq0wbKtcFM,17222
|
|
6
|
+
cdxcore/pretty.py,sha256=iUpgUCwmI8yb5O-WZFJEk3QvNYcj_GIFHUgZ5lK8F2I,17082
|
|
7
|
+
cdxcore/pretty.py_bak.py,sha256=JgWr5044HzCNGG0wKSAWlWiPRs7-bNzkwiKH0T3n0to,28658
|
|
8
|
+
cdxcore/subdir.py,sha256=ceL-Od5NAlJX3f4mYgwki5EMzbs-LpG5M2cikC8eFIE,173868
|
|
9
|
+
cdxcore/uniquehash.py,sha256=g-D8pqPIppSdRq5QfdE5aP3paZ-NkXWHfnn-uNB7fmg,50648
|
|
10
|
+
cdxcore/util.py,sha256=0fp0EzeZvnje1Q7SUcgB_JtKpsYgGTfvlHVfq0mE_ug,31930
|
|
11
|
+
cdxcore/verbose.py,sha256=nKNoZQwl3eF1zBf-JZwPC-lL9d_o5mJsDsSUMixTMLw,29882
|
|
12
|
+
cdxcore/version.py,sha256=m30oI2Ortg44dKSim-sIoeh9PioD1FWsSfVEP5rubhk,27173
|
|
13
|
+
cdxcore-0.1.10.dist-info/licenses/LICENSE,sha256=M-cisgK9kb1bqVRJ7vrCxHcMQQfDxdY3c2YFJJWfNQg,1090
|
|
14
|
+
docs/source/conf.py,sha256=Owctibh5XcSpSNcrpOr3ROIDjoklmFVrMhu8cOSe50o,4180
|
|
15
|
+
tests/test_config.py,sha256=0U9vFIKDex0Il-7Vc_C4saAuXoHIsdQ8YhhS8AO7FQI,15950
|
|
16
|
+
tests/test_crman.py,sha256=jYDxqF__iq3fEjaZQoq66CNChWRoR79Ntyng5mr3sIA,1698
|
|
17
|
+
tests/test_err.py,sha256=VbVmbaB6o49G-n3t7yuJ4M0d9pyUQyJuVDqK-xRrLo8,3458
|
|
18
|
+
tests/test_pretty.py,sha256=5TmF7c1TRDSN-YR5yo04SiLJiW3bZaxpXHJ-4ZEO8hg,11952
|
|
19
|
+
tests/test_subdir.py,sha256=tO-zoOIKQtZEMpQM-tsrisyLRmMH8txCSOzh6jPRhYY,11721
|
|
20
|
+
tests/test_uniquehash.py,sha256=ldoQLT77R7odMAok4Yo3jmiUIH3VPHKoSiSLKbbM_mo,24907
|
|
21
|
+
tests/test_util.py,sha256=DZ6AlPFDNNlkqP5MlM1BUwmBJvEj4WCFqZcdh_Isflw,19955
|
|
22
|
+
tests/test_verbose.py,sha256=7JGCLKHU1HovO6UYSLLcJQxjaZxYJejS1fl8O3Sgk9w,5037
|
|
23
|
+
tests/test_version.py,sha256=eq7bNT0GefbUkwEzo658UUxgBCiR7CDhuIxAmnnI-qQ,4658
|
|
24
|
+
tmp/deferred.py,sha256=TirvzxYXWnZkOWuEMB7qsf6auilfy4VD_zPknYCjrnw,9401
|
|
25
|
+
tmp/dynaplot.py,sha256=kwrH_WccpJcfS7n_gzdAr4QxQobvIZZrrxgdsKLKfj0,48552
|
|
26
|
+
tmp/filelock.py,sha256=HqnHZhSCESaOA3ClrdWPW_GZpyo7c3VRSEofAV-khKM,18137
|
|
27
|
+
tmp/np.py,sha256=2MynhiaTfmx984Gz7TwfZH3t7GCmCAQiyeWzDDCL6_k,47686
|
|
28
|
+
tmp/npio.py,sha256=4Kwp5H4MgKHkOEhu4UJ5CcwpM7Pm8UFkaoL5FvOEFRI,10310
|
|
29
|
+
tmp/sharedarray.py,sha256=JuHuSlxA0evD0a-bEZgTFrfdlVPMgzfQNgfSjr1212w,11484
|
|
30
|
+
up/git_message.py,sha256=EfSH7Pit3ZoCiRqSMwRCUN_QyuwreU4LTIyGSutBlm4,123
|
|
31
|
+
up/pip_modify_setup.py,sha256=Esaml4yA9tFsqxLhk5bWSwvKCURONjQqfyChgFV2TSY,1584
|
|
32
|
+
cdxcore-0.1.10.dist-info/METADATA,sha256=CR4ZGaCL36hx08u3KnBdB5TWKM8Sknk2W_KsCptAv4g,754
|
|
33
|
+
cdxcore-0.1.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
34
|
+
cdxcore-0.1.10.dist-info/top_level.txt,sha256=phNSwCyJFe7UP2YMoi8o6ykhotatlIbJHjTp9EHM51k,26
|
|
35
|
+
cdxcore-0.1.10.dist-info/RECORD,,
|
tests/test_config.py
CHANGED
|
@@ -4,7 +4,6 @@ Created on Tue Apr 14 21:24:52 2020
|
|
|
4
4
|
@author: hansb
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
import unittest as unittest
|
|
9
8
|
import dataclasses as dataclasses
|
|
10
9
|
import sys as sys
|
|
@@ -12,7 +11,6 @@ import os as os
|
|
|
12
11
|
import pickle as pickle
|
|
13
12
|
import tempfile as tempfile
|
|
14
13
|
import shutil as shutil
|
|
15
|
-
sys.setrecursionlimit(100)
|
|
16
14
|
|
|
17
15
|
def import_local():
|
|
18
16
|
"""
|
|
@@ -37,7 +35,7 @@ def import_local():
|
|
|
37
35
|
if name[:len(me)] == me:
|
|
38
36
|
imp.reload(mdata)
|
|
39
37
|
print("Reloaded", name)
|
|
40
|
-
import_local()
|
|
38
|
+
#import_local()
|
|
41
39
|
|
|
42
40
|
from cdxcore.config import Config, Int, Float
|
|
43
41
|
from cdxcore.pretty import PrettyObject as pdct
|
tests/test_crman.py
CHANGED
tests/test_err.py
CHANGED
tests/test_pretty.py
CHANGED
tests/test_subdir.py
CHANGED
tests/test_uniquehash.py
CHANGED
tests/test_util.py
CHANGED
|
@@ -31,7 +31,7 @@ def import_local():
|
|
|
31
31
|
for name, mdata in modules.items():
|
|
32
32
|
if name[:len(me)] == me:
|
|
33
33
|
imp.reload(mdata)
|
|
34
|
-
import_local()
|
|
34
|
+
#import_local()
|
|
35
35
|
|
|
36
36
|
from cdxcore.util import is_function, is_atomic, is_float, is_filename
|
|
37
37
|
from cdxcore.util import fmt, fmt_seconds, fmt_list, fmt_dict, fmt_big_number, fmt_digits, fmt_big_byte_number, fmt_datetime, fmt_date, fmt_time, fmt_timedelta, fmt_filename, DEF_FILE_NAME_MAP
|
tests/test_verbose.py
CHANGED
tests/test_version.py
CHANGED
cdxcore-0.1.9.dist-info/RECORD
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
cdxcore/__init__.py,sha256=a9wRC3XcpvMapllTNzJzr0MMUqBnYzI_lnm18xrxjj0,126
|
|
2
|
-
cdxcore/config.py,sha256=YnIEJVFtMZ5EHlwzaB2JsSkCPhWPvEw9QSpe6mof_V4,98472
|
|
3
|
-
cdxcore/crman.py,sha256=jOw40Bh6PkmEiabA7OS9NsqF-9viam3CBiKzPwxVkVw,5693
|
|
4
|
-
cdxcore/err.py,sha256=SIJMBXKXYI_hiysv5iSPRy0w_BbxyTDPbNEs56Y94Rk,14541
|
|
5
|
-
cdxcore/pretty.py,sha256=iUpgUCwmI8yb5O-WZFJEk3QvNYcj_GIFHUgZ5lK8F2I,17082
|
|
6
|
-
cdxcore/pretty.py_bak.py,sha256=JgWr5044HzCNGG0wKSAWlWiPRs7-bNzkwiKH0T3n0to,28658
|
|
7
|
-
cdxcore/subdir.py,sha256=bVABx_XpzZxmjoUQe0Brt2cEakhUONP1YA4tjPQ_LTk,173453
|
|
8
|
-
cdxcore/uniquehash.py,sha256=g-D8pqPIppSdRq5QfdE5aP3paZ-NkXWHfnn-uNB7fmg,50648
|
|
9
|
-
cdxcore/util.py,sha256=0fp0EzeZvnje1Q7SUcgB_JtKpsYgGTfvlHVfq0mE_ug,31930
|
|
10
|
-
cdxcore/verbose.py,sha256=nKNoZQwl3eF1zBf-JZwPC-lL9d_o5mJsDsSUMixTMLw,29882
|
|
11
|
-
cdxcore/version.py,sha256=tsLHRIgYYqrcqGJqz-bMEJuixWtTg1AQB_QwJrf6VDE,27172
|
|
12
|
-
cdxcore-0.1.9.dist-info/licenses/LICENSE,sha256=M-cisgK9kb1bqVRJ7vrCxHcMQQfDxdY3c2YFJJWfNQg,1090
|
|
13
|
-
docs/source/conf.py,sha256=Owctibh5XcSpSNcrpOr3ROIDjoklmFVrMhu8cOSe50o,4180
|
|
14
|
-
docs2/source/conf.py,sha256=qxnJSrm3fV-llfvYlM0adpVD5pE_-8f8KqxH_ywe5UA,1276
|
|
15
|
-
tests/test_config.py,sha256=JtIWCt0Q2PmmADfOGL42anONvuNowtxLK312xvWmRD4,15979
|
|
16
|
-
tests/test_crman.py,sha256=hJlhuUuDrhzzJ3-ILUu_JCH842BJx9VGpEBCGrr4LOU,1697
|
|
17
|
-
tests/test_err.py,sha256=AUfUUnksdbcHEuY-boyTW7fJHJ_w13zYpaPYrqwWbSo,3457
|
|
18
|
-
tests/test_pretty.py,sha256=AJOI4jFnol_pY_wzF9baPNzx_J5pViVzZcRkWMDU4HY,11951
|
|
19
|
-
tests/test_subdir.py,sha256=heLvzVl3qpgLq_rj4BY5odn6ZWk978kum1SznKQ4JMw,11720
|
|
20
|
-
tests/test_uniquehash.py,sha256=kxmH5slL4NxmcCS2OOdbzqu9G2C3sm2SR4HkfIyromU,24906
|
|
21
|
-
tests/test_util.py,sha256=MnM3EFp4p8MGw1qnhtBryHikHOt__zfOm65OMzN0zWE,19954
|
|
22
|
-
tests/test_verbose.py,sha256=0EOVK5TWrwQwAjv08enaOTQZ6-_SQFMKXi3Nw6nSfMI,5036
|
|
23
|
-
tests/test_version.py,sha256=xPF6eXD7J9VB_L1FGK5kgjXkrfD9gqHdj03zc9s6XIs,4657
|
|
24
|
-
tmp/deferred.py,sha256=TirvzxYXWnZkOWuEMB7qsf6auilfy4VD_zPknYCjrnw,9401
|
|
25
|
-
tmp/dynaplot.py,sha256=kwrH_WccpJcfS7n_gzdAr4QxQobvIZZrrxgdsKLKfj0,48552
|
|
26
|
-
tmp/filelock.py,sha256=HqnHZhSCESaOA3ClrdWPW_GZpyo7c3VRSEofAV-khKM,18137
|
|
27
|
-
tmp/jcpool.py,sha256=OzoXWBJKWaDgJm1OeUj9ERz9skvwslGOwNq0wbKtcFM,17222
|
|
28
|
-
tmp/np.py,sha256=2MynhiaTfmx984Gz7TwfZH3t7GCmCAQiyeWzDDCL6_k,47686
|
|
29
|
-
tmp/npio.py,sha256=4Kwp5H4MgKHkOEhu4UJ5CcwpM7Pm8UFkaoL5FvOEFRI,10310
|
|
30
|
-
tmp/sharedarray.py,sha256=JuHuSlxA0evD0a-bEZgTFrfdlVPMgzfQNgfSjr1212w,11484
|
|
31
|
-
up/git_message.py,sha256=EfSH7Pit3ZoCiRqSMwRCUN_QyuwreU4LTIyGSutBlm4,123
|
|
32
|
-
up/pip_modify_setup.py,sha256=Esaml4yA9tFsqxLhk5bWSwvKCURONjQqfyChgFV2TSY,1584
|
|
33
|
-
cdxcore-0.1.9.dist-info/METADATA,sha256=Bz8HlL06uVWBnx7Ie2ogBTgyk_RffCMbFC5QBt3MCNo,753
|
|
34
|
-
cdxcore-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
-
cdxcore-0.1.9.dist-info/top_level.txt,sha256=eG4oLGRzNN40tCfK5tJbzfT_I2M-9IPGVpbRwFWE9Wk,32
|
|
36
|
-
cdxcore-0.1.9.dist-info/RECORD,,
|
docs2/source/conf.py
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# conf.py
|
|
2
|
-
def set_path(source = "cdxcore"):
|
|
3
|
-
import os, sys
|
|
4
|
-
root_path = os.path.split(
|
|
5
|
-
os.path.split(
|
|
6
|
-
os.path.split( __file__ )[0] # 'source
|
|
7
|
-
)[0] # 'docs'
|
|
8
|
-
)[0] # 'packag
|
|
9
|
-
assert root_path[-len(source):] == source, f"Conf.py '{__file__}': invalid source path '{root_path}'. Call 'make html' from the docs directory"
|
|
10
|
-
sys.path.insert(0, root_path) # so your package is importable
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
project = "cdxcore"
|
|
14
|
-
author = "Hans Buehler"
|
|
15
|
-
release = "0.1.0"
|
|
16
|
-
|
|
17
|
-
set_path(project)
|
|
18
|
-
|
|
19
|
-
extensions = [
|
|
20
|
-
"sphinx.ext.autodoc", # core: import & docstrings
|
|
21
|
-
"sphinx.ext.autosummary", # summary tables with links
|
|
22
|
-
"sphinx.ext.napoleon", # Google/NumPy style docstrings
|
|
23
|
-
"sphinx_autodoc_typehints", # nicer type hints formatting
|
|
24
|
-
"sphinx.ext.mathjax", # math rendering
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
autosummary_generate = True # make _autosummary files
|
|
28
|
-
autodoc_typehints = "description" # show types in doc body instead of signature
|
|
29
|
-
autodoc_member_order = "bysource" # preserve order in source file
|
|
30
|
-
napoleon_google_docstring = True
|
|
31
|
-
napoleon_numpy_docstring = True
|
|
32
|
-
napoleon_use_param = True
|
|
33
|
-
napoleon_use_rtype = False
|
|
34
|
-
autoclass_content = "both"
|
|
35
|
-
|
{tmp → cdxcore}/jcpool.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|