cdxcore 0.1.9__tar.gz → 0.1.10__tar.gz

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.

Files changed (41) hide show
  1. {cdxcore-0.1.9 → cdxcore-0.1.10}/PKG-INFO +1 -1
  2. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/__init__.py +1 -1
  3. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/subdir.py +13 -5
  4. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/version.py +1 -1
  5. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore.egg-info/PKG-INFO +1 -1
  6. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore.egg-info/SOURCES.txt +1 -2
  7. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore.egg-info/top_level.txt +0 -1
  8. {cdxcore-0.1.9 → cdxcore-0.1.10}/pyproject.toml +1 -1
  9. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_config.py +1 -3
  10. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_crman.py +1 -1
  11. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_err.py +1 -1
  12. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_pretty.py +1 -1
  13. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_subdir.py +1 -1
  14. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_uniquehash.py +1 -1
  15. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_util.py +1 -1
  16. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_verbose.py +1 -1
  17. {cdxcore-0.1.9 → cdxcore-0.1.10}/tests/test_version.py +1 -1
  18. cdxcore-0.1.9/docs2/source/conf.py +0 -35
  19. {cdxcore-0.1.9 → cdxcore-0.1.10}/LICENSE +0 -0
  20. {cdxcore-0.1.9 → cdxcore-0.1.10}/README.md +0 -0
  21. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/config.py +0 -0
  22. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/crman.py +0 -0
  23. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/err.py +0 -0
  24. {cdxcore-0.1.9/tmp → cdxcore-0.1.10/cdxcore}/jcpool.py +0 -0
  25. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/pretty.py +0 -0
  26. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/pretty.py_bak.py +0 -0
  27. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/uniquehash.py +0 -0
  28. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/util.py +0 -0
  29. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore/verbose.py +0 -0
  30. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore.egg-info/dependency_links.txt +0 -0
  31. {cdxcore-0.1.9 → cdxcore-0.1.10}/cdxcore.egg-info/requires.txt +0 -0
  32. {cdxcore-0.1.9 → cdxcore-0.1.10}/docs/source/conf.py +0 -0
  33. {cdxcore-0.1.9 → cdxcore-0.1.10}/setup.cfg +0 -0
  34. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/deferred.py +0 -0
  35. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/dynaplot.py +0 -0
  36. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/filelock.py +0 -0
  37. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/np.py +0 -0
  38. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/npio.py +0 -0
  39. {cdxcore-0.1.9 → cdxcore-0.1.10}/tmp/sharedarray.py +0 -0
  40. {cdxcore-0.1.9 → cdxcore-0.1.10}/up/git_message.py +0 -0
  41. {cdxcore-0.1.9 → cdxcore-0.1.10}/up/pip_modify_setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdxcore
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: Basic Python Tools; upgraded cdxbasics
5
5
  Author-email: Hans Buehler <github@buehler.london>
6
6
  License-Expression: MIT
@@ -4,4 +4,4 @@ Created on June 2022
4
4
  @author: hansb
5
5
  """
6
6
 
7
- __version__ = "0.1.9" # auto-updated by setup.py
7
+ __version__ = "0.1.10" # auto-updated by setup.py
@@ -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
- jsonpickle_numpy.register_handlers()
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)
@@ -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=uniqueHash.length)
501
+ return self.unique_id(max_len=unique_hash.length)
502
502
 
503
503
  # =======================================================
504
504
  # @version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdxcore
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: Basic Python Tools; upgraded cdxbasics
5
5
  Author-email: Hans Buehler <github@buehler.london>
6
6
  License-Expression: MIT
@@ -5,6 +5,7 @@ cdxcore/__init__.py
5
5
  cdxcore/config.py
6
6
  cdxcore/crman.py
7
7
  cdxcore/err.py
8
+ cdxcore/jcpool.py
8
9
  cdxcore/pretty.py
9
10
  cdxcore/pretty.py_bak.py
10
11
  cdxcore/subdir.py
@@ -17,7 +18,6 @@ cdxcore.egg-info/SOURCES.txt
17
18
  cdxcore.egg-info/dependency_links.txt
18
19
  cdxcore.egg-info/requires.txt
19
20
  cdxcore.egg-info/top_level.txt
20
- docs2/source/conf.py
21
21
  docs/source/conf.py
22
22
  tests/test_config.py
23
23
  tests/test_crman.py
@@ -31,7 +31,6 @@ tests/test_version.py
31
31
  tmp/deferred.py
32
32
  tmp/dynaplot.py
33
33
  tmp/filelock.py
34
- tmp/jcpool.py
35
34
  tmp/np.py
36
35
  tmp/npio.py
37
36
  tmp/sharedarray.py
@@ -1,7 +1,6 @@
1
1
  cdxcore
2
2
  dist
3
3
  docs
4
- docs2
5
4
  media
6
5
  tests
7
6
  tmp
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "cdxcore"
9
- version = "0.1.9"
9
+ version = "0.1.10"
10
10
  description = "Basic Python Tools; upgraded cdxbasics"
11
11
  authors = [{ name = "Hans Buehler", email = "github@buehler.london" }]
12
12
  readme = "README.md"
@@ -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
@@ -29,7 +29,7 @@ def import_local():
29
29
  if name[:len(me)] == me:
30
30
  imp.reload(mdata)
31
31
  print("Reloaded", name)
32
- import_local()
32
+ #import_local()
33
33
 
34
34
  from cdxcore.crman import CRMan
35
35
 
@@ -30,7 +30,7 @@ def import_local():
30
30
  if name[:len(me)] == me:
31
31
  imp.reload(mdata)
32
32
  print("Reloaded", name)
33
- import_local()
33
+ #import_local()
34
34
 
35
35
  from cdxcore.err import fmt, error, verify, warn, warn_if
36
36
 
@@ -37,7 +37,7 @@ def import_local():
37
37
  if name[:len(me)] == me:
38
38
  imp.reload(mdata)
39
39
  print("Reloaded", name)
40
- import_local()
40
+ #import_local()
41
41
 
42
42
  from cdxcore.pretty import PrettyObject, Sequence
43
43
 
@@ -28,7 +28,7 @@ def import_local():
28
28
  for name, mdata in modules.items():
29
29
  if name[:len(me)] == me:
30
30
  imp.reload(mdata)
31
- import_local()
31
+ #import_local()
32
32
 
33
33
  """
34
34
  Imports
@@ -32,7 +32,7 @@ def import_local():
32
32
  for name, mdata in modules.items():
33
33
  if name[:len(me)] == me:
34
34
  imp.reload(mdata)
35
- import_local()
35
+ #import_local()
36
36
 
37
37
  """
38
38
  Imports
@@ -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
@@ -29,7 +29,7 @@ def import_local():
29
29
  if name[:len(me)] == me:
30
30
  imp.reload(mdata)
31
31
  print("Reloaded", name)
32
- import_local()
32
+ #import_local()
33
33
 
34
34
  from cdxcore.verbose import Context
35
35
  from cdxcore.uniquehash import unique_hash32 as unique_hash
@@ -28,7 +28,7 @@ def import_local():
28
28
  for name, mdata in modules.items():
29
29
  if name[:len(me)] == me:
30
30
  imp.reload(mdata)
31
- import_local()
31
+ #import_local()
32
32
 
33
33
  """
34
34
  Imports
@@ -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
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes