paramflow 0.5__tar.gz → 0.5.2__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.
Files changed (30) hide show
  1. {paramflow-0.5/paramflow.egg-info → paramflow-0.5.2}/PKG-INFO +1 -1
  2. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/convert.cpython-313.pyc +0 -0
  3. paramflow-0.5.2/paramflow/__pycache__/frozen.cpython-313.pyc +0 -0
  4. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/parser.cpython-313.pyc +0 -0
  5. {paramflow-0.5 → paramflow-0.5.2}/paramflow/convert.py +5 -10
  6. {paramflow-0.5 → paramflow-0.5.2}/paramflow/frozen.py +3 -1
  7. {paramflow-0.5 → paramflow-0.5.2}/paramflow/parser.py +3 -0
  8. {paramflow-0.5 → paramflow-0.5.2/paramflow.egg-info}/PKG-INFO +1 -1
  9. {paramflow-0.5 → paramflow-0.5.2}/setup.py +1 -1
  10. paramflow-0.5/paramflow/__pycache__/frozen.cpython-313.pyc +0 -0
  11. {paramflow-0.5 → paramflow-0.5.2}/LICENSE +0 -0
  12. {paramflow-0.5 → paramflow-0.5.2}/MANIFEST.in +0 -0
  13. {paramflow-0.5 → paramflow-0.5.2}/README.md +0 -0
  14. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__init__.py +0 -0
  15. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/__init__.cpython-312.pyc +0 -0
  16. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/__init__.cpython-313.pyc +0 -0
  17. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/convert.cpython-312.pyc +0 -0
  18. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/frozen.cpython-312.pyc +0 -0
  19. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc +0 -0
  20. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params.cpython-312.pyc +0 -0
  21. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params.cpython-313.pyc +0 -0
  22. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc +0 -0
  23. {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/parser.cpython-312.pyc +0 -0
  24. {paramflow-0.5 → paramflow-0.5.2}/paramflow/params.py +0 -0
  25. {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/SOURCES.txt +0 -0
  26. {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/dependency_links.txt +0 -0
  27. {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/requires.txt +0 -0
  28. {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/top_level.txt +0 -0
  29. {paramflow-0.5 → paramflow-0.5.2}/pyproject.toml +0 -0
  30. {paramflow-0.5 → paramflow-0.5.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: paramflow
3
- Version: 0.5
3
+ Version: 0.5.2
4
4
  Summary: A lightweight library for hyperparameter and configuration management
5
5
  Home-page: https://github.com/mduszyk/paramflow
6
6
  Classifier: Programming Language :: Python :: 3
@@ -36,15 +36,10 @@ def convert_type(dst_value, src_value, path=''):
36
36
 
37
37
 
38
38
  def infer_type(value: str):
39
- result = value
40
- if '.' in value:
41
- try:
42
- result = float(value)
43
- except ValueError:
44
- pass
45
- else:
39
+ try:
40
+ return int(value)
41
+ except ValueError:
46
42
  try:
47
- result = int(value)
43
+ return float(value)
48
44
  except ValueError:
49
- pass
50
- return result
45
+ return value
@@ -1,4 +1,4 @@
1
- from typing import Union, List, Dict
1
+ from typing import Union, List, Dict, Any
2
2
 
3
3
 
4
4
  class ParamsDict(dict):
@@ -19,6 +19,8 @@ class ParamsDict(dict):
19
19
  def __delitem__(self, key):
20
20
  raise TypeError(f'{self.__class__.__name__} is immutable')
21
21
 
22
+ def __getattr__(self, key) -> Any:
23
+ return self[key]
22
24
 
23
25
  class ParamsList(list):
24
26
 
@@ -176,7 +176,10 @@ class ArgsParser(Parser):
176
176
  args_params[key] = arg_value
177
177
 
178
178
  if self.consume_args:
179
+ help = '--help' in sys.argv
179
180
  sys.argv = [sys.argv[0]] + remaining
181
+ if help:
182
+ sys.argv.append('--help')
180
183
  else:
181
184
  it = iter(remaining)
182
185
  for arg_name, arg_value in zip(it, it):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: paramflow
3
- Version: 0.5
3
+ Version: 0.5.2
4
4
  Summary: A lightweight library for hyperparameter and configuration management
5
5
  Home-page: https://github.com/mduszyk/paramflow
6
6
  Classifier: Programming Language :: Python :: 3
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='paramflow',
5
- version='0.5',
5
+ version='0.5.2',
6
6
  description='A lightweight library for hyperparameter and configuration management',
7
7
  packages=find_packages(),
8
8
  install_requires=[
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes