numbox 0.3.1__py3-none-any.whl → 0.3.2__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 numbox might be problematic. Click here for more details.

numbox/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.3.1'
1
+ __version__ = '0.3.2'
@@ -238,7 +238,7 @@ class CompiledGraph:
238
238
  for var_name, variable in variables.items():
239
239
  if var_name not in provided:
240
240
  raise KeyError(
241
- f"Missing value for external variable '{source_name}.{var_name}'"
241
+ f"Missing value for external variable '{_make_qual_name(source_name, var_name)}'"
242
242
  )
243
243
  values.get(variable).value = provided[var_name]
244
244
 
@@ -274,12 +274,13 @@ class CompiledGraph:
274
274
  if node.variable.formula is None:
275
275
  continue
276
276
  args = tuple(values.get(input_).value for input_ in node.inputs)
277
- # assert _null not in args, f"Uninitialized input for {node.variable}, args = {args}"
277
+ assert not any(
278
+ [arg is _null for arg in args]
279
+ ), f"Uninitialized input for {node.variable}, args = {args}"
278
280
  cache_key = (node.variable, args)
279
- if node.variable.cacheable:
280
- if cache_key in values.cache:
281
- values.get(node.variable).value = values.cache[cache_key]
282
- continue
281
+ if node.variable.cacheable and cache_key in values.cache:
282
+ values.get(node.variable).value = values.cache[cache_key]
283
+ continue
283
284
  result = node.variable.formula(*args)
284
285
  if node.variable.cacheable:
285
286
  values.cache[cache_key] = result
@@ -348,6 +349,9 @@ class Graph:
348
349
  self.compiled_graphs = {}
349
350
 
350
351
  def compile(self, required: List[str] | str) -> CompiledGraph:
352
+ """
353
+ :required: list of qualified variables names that need to be calculated.
354
+ """
351
355
  if isinstance(required, str):
352
356
  required = [required]
353
357
  required_tup = tuple(sorted(required))
@@ -1,6 +1,6 @@
1
1
  MIT License (with Citation Clause)
2
2
 
3
- Copyright (c) 2025 Mikhail Goykhman
3
+ Copyright (c) 2026 Mikhail Goykhman
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: numbox
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Author: Mikhail Goykhman
5
5
  License: MIT License (with Citation Clause)
6
6
 
7
- Copyright (c) 2025 Mikhail Goykhman
7
+ Copyright (c) 2026 Mikhail Goykhman
8
8
 
9
9
  Permission is hereby granted, free of charge, to any person obtaining a copy
10
10
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- numbox/__init__.py,sha256=TZkGuMIRSRmUY3XCIs5owt2o60vXyqYMHWIkhx65uYE,22
1
+ numbox/__init__.py,sha256=bqu4G7Is-8Were-hMi-SthEalL7QW-PAbKWGZ9pVB6U,22
2
2
  numbox/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  numbox/core/configurations.py,sha256=0bCmxXL-QMwtvyIDhpXLeT-1KJMf_QpH0wLuEvYLGxQ,68
4
4
  numbox/core/any/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -15,7 +15,7 @@ numbox/core/bindings/utils.py,sha256=OATfF4k8e5oPa9_wlHHkLQhY_DhrPNKYdeeGu9Nj5yg
15
15
  numbox/core/proxy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  numbox/core/proxy/proxy.py,sha256=Wt7yzswDmeQXt0yjcTcnLi2coneowSHWXy_IFpZZJMU,3612
17
17
  numbox/core/variable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- numbox/core/variable/variable.py,sha256=GoCsB1hUDJJzZByK1OK13RZn4M-maBDjXfnbvRFjcS8,16371
18
+ numbox/core/variable/variable.py,sha256=Y1nB9wqt91BkWCKRyQNe1jFR0aic57HNnylTGp9h1nI,16518
19
19
  numbox/core/work/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  numbox/core/work/builder.py,sha256=d0DRwJoyskp-6tYQyV1VE-v9eX99qJbQJ_FdAFrjuiE,6273
21
21
  numbox/core/work/builder_utils.py,sha256=z8au1x10AwnzQ0_MAbQ6DnKTp3u9HeYZ1jyfkUMYjVg,1213
@@ -35,8 +35,8 @@ numbox/utils/meminfo.py,sha256=ykFi8Vt0WcHI3ztgMwvpn6NqaflDSQGL8tjI01jrzm0,1759
35
35
  numbox/utils/standard.py,sha256=SPsQcyLZw21RaNCdfkIGE_QBaVnMtZjJY4F40_GGuak,347
36
36
  numbox/utils/timer.py,sha256=5_d690Fb3L2axJBRxtoB0qe23exBosNR4qu6cno4QfY,641
37
37
  numbox/utils/void_type.py,sha256=IkZsjNeAIShYJtvWbvERdHnl_mbF1rCRWiM3gp6II8U,404
38
- numbox-0.3.1.dist-info/LICENSE,sha256=YYgNvjH_p6-1NsdrIqGJnr1GUbZzA_8DxsP6vVfM6nY,1446
39
- numbox-0.3.1.dist-info/METADATA,sha256=L2Ol4D5QRR_K8j31xvFgbdJtxFiFLDJG2MPWrmS81Zk,2996
40
- numbox-0.3.1.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
41
- numbox-0.3.1.dist-info/top_level.txt,sha256=A67jOkfqidCSYYm6ifjN_WZyIiR1B27fjxv6nNbPvjc,7
42
- numbox-0.3.1.dist-info/RECORD,,
38
+ numbox-0.3.2.dist-info/LICENSE,sha256=ZlmjEDrZFNHpGxy_7HThWRlyBvuOMchK__qgTdiO_Uk,1446
39
+ numbox-0.3.2.dist-info/METADATA,sha256=j7WYDDW5WT6aBnyXtsqpwKPXWKGYQq9Vu8_NNyC44q4,2996
40
+ numbox-0.3.2.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
41
+ numbox-0.3.2.dist-info/top_level.txt,sha256=A67jOkfqidCSYYm6ifjN_WZyIiR1B27fjxv6nNbPvjc,7
42
+ numbox-0.3.2.dist-info/RECORD,,
File without changes