paramflow 0.1__tar.gz → 0.1.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.
- {paramflow-0.1/paramflow.egg-info → paramflow-0.1.2}/PKG-INFO +1 -1
- paramflow-0.1.2/paramflow/__pycache__/parser.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/parser.py +3 -4
- {paramflow-0.1 → paramflow-0.1.2/paramflow.egg-info}/PKG-INFO +1 -1
- {paramflow-0.1 → paramflow-0.1.2}/setup.py +1 -1
- paramflow-0.1/paramflow/__pycache__/parser.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/LICENSE +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/MANIFEST.in +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/README.md +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__init__.py +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/__init__.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/convert.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/frozen.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/params.cpython-312.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/convert.py +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/frozen.py +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow/params.py +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow.egg-info/SOURCES.txt +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow.egg-info/dependency_links.txt +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/paramflow.egg-info/top_level.txt +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/pyproject.toml +0 -0
- {paramflow-0.1 → paramflow-0.1.2}/setup.cfg +0 -0
|
Binary file
|
|
@@ -2,13 +2,9 @@ import argparse
|
|
|
2
2
|
import configparser
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
-
import tomllib
|
|
6
5
|
from typing import Dict, Final, Type
|
|
7
6
|
from abc import ABC, abstractmethod
|
|
8
7
|
|
|
9
|
-
import yaml
|
|
10
|
-
from dotenv import dotenv_values
|
|
11
|
-
|
|
12
8
|
|
|
13
9
|
class Parser(ABC):
|
|
14
10
|
@abstractmethod
|
|
@@ -22,6 +18,7 @@ class TomlParser(Parser):
|
|
|
22
18
|
self.path = path
|
|
23
19
|
|
|
24
20
|
def __call__(self, *args) -> Dict[str, any]:
|
|
21
|
+
import tomllib
|
|
25
22
|
with open(self.path, 'rb') as fp:
|
|
26
23
|
params = tomllib.load(fp)
|
|
27
24
|
if len(params) > 0:
|
|
@@ -35,6 +32,7 @@ class YamlParser(Parser):
|
|
|
35
32
|
self.path = path
|
|
36
33
|
|
|
37
34
|
def __call__(self, *args) -> Dict[str, any]:
|
|
35
|
+
import yaml
|
|
38
36
|
with open(self.path, 'r') as fp:
|
|
39
37
|
params = yaml.safe_load(fp)
|
|
40
38
|
if len(params) > 0:
|
|
@@ -78,6 +76,7 @@ class DotEnvParser(Parser):
|
|
|
78
76
|
self.target_profile = target_profile
|
|
79
77
|
|
|
80
78
|
def __call__(self, params: Dict[str, any]) -> Dict[str, any]:
|
|
79
|
+
from dotenv import dotenv_values
|
|
81
80
|
if self.target_profile is None and self.default_profile in params:
|
|
82
81
|
self.target_profile = self.default_profile
|
|
83
82
|
params = params.get(self.default_profile, params)
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
File without changes
|
|
File without changes
|
{paramflow-0.1 → paramflow-0.1.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
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
|