heracless 0.3.2__tar.gz → 0.3.3__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.
- {heracless-0.3.2 → heracless-0.3.3}/LICENSE +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/PKG-INFO +28 -13
- {heracless-0.3.2 → heracless-0.3.3}/README.md +20 -8
- {heracless-0.3.2 → heracless-0.3.3}/heracless/__init__.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/cli_tool.py +1 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/fight.py +8 -2
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/__init__.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/cfg_tree.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/exceptions.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/helper.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/load_func_template.py +5 -4
- {heracless-0.3.2 → heracless-0.3.3}/heracless/utils/utils.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/wapp/About.py +1 -1
- {heracless-0.3.2 → heracless-0.3.3}/heracless/wapp/pages/ConfigGenerator.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless/wapp/pages/Documentation.py +10 -7
- {heracless-0.3.2 → heracless-0.3.3}/heracless/wapp/utils.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless.egg-info/PKG-INFO +28 -13
- {heracless-0.3.2 → heracless-0.3.3}/heracless.egg-info/SOURCES.txt +3 -1
- {heracless-0.3.2 → heracless-0.3.3}/heracless.egg-info/dependency_links.txt +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/heracless.egg-info/requires.txt +5 -1
- {heracless-0.3.2 → heracless-0.3.3}/heracless.egg-info/top_level.txt +1 -0
- {heracless-0.3.2 → heracless-0.3.3}/pyproject.toml +9 -4
- {heracless-0.3.2 → heracless-0.3.3}/setup.cfg +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/config/types.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/config/types.pyi +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/conftest.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/conftest.pyi +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/quick_test.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/test_end_to_end.py +0 -0
- {heracless-0.3.2 → heracless-0.3.3}/tests/test_units.py +0 -0
- heracless-0.3.3/tmp/test_file.pyi +47 -0
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: heracless
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Yaml to Dataclass parser for Config files
|
|
5
5
|
Author-email: Felix Schelling <felix.schelling@protonmail.com>
|
|
6
6
|
Project-URL: Repository, https://github.com/felixscode/heracless.git
|
|
@@ -12,18 +12,21 @@ Requires-Python: >=3.10
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: black
|
|
15
|
-
Requires-Dist: pytest
|
|
16
15
|
Requires-Dist: PyYAML
|
|
17
16
|
Requires-Dist: art
|
|
18
|
-
|
|
19
|
-
Requires-Dist:
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest; extra == "dev"
|
|
19
|
+
Requires-Dist: streamlit; extra == "dev"
|
|
20
|
+
Requires-Dist: streamlit_ace; extra == "dev"
|
|
21
|
+
Requires-Dist: build; extra == "dev"
|
|
22
|
+
Requires-Dist: twine; extra == "dev"
|
|
20
23
|
|
|
21
24
|
# ⚔️ Heracless ⚔️
|
|
22
25
|
|
|
23
26
|
A simple and minimalistic Config Manager using YAML.
|
|
24
27
|
[](https://github.com/felixscode/heracless)
|
|
25
28
|
[](https://pypi.org/project/heracless/)
|
|
26
|
-
[](https://heracless.io/
|
|
29
|
+
[](https://heracless.io/Documentation)
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
## Table of Contents
|
|
@@ -82,22 +85,25 @@ Paste the following code into your `load_config.py`:
|
|
|
82
85
|
|
|
83
86
|
```python
|
|
84
87
|
from pathlib import Path
|
|
85
|
-
from typing import
|
|
88
|
+
from typing import TypeVar
|
|
86
89
|
|
|
87
90
|
from heracless import load_config as _load_config
|
|
88
91
|
|
|
89
|
-
# CONFIG_YAML_PATH is a global variable that sets the path of your
|
|
92
|
+
# CONFIG_YAML_PATH is a global variable that sets the path of your yaml config file
|
|
90
93
|
# Edit this to your config file path
|
|
91
94
|
CONFIG_YAML_PATH = None
|
|
92
95
|
|
|
93
96
|
Config = TypeVar("Config")
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
|
|
99
|
+
def load_config(config_path : Path|str = CONFIG_YAML_PATH,frozen: bool = True,stub_dump:bool = True) -> Config:
|
|
96
100
|
"""
|
|
97
101
|
Load the configuration from the specified directory and return a Config object.
|
|
98
102
|
|
|
99
103
|
Args:
|
|
104
|
+
config_path (Path|str, optional): The path to the configuration file. Defaults to CONFIG_YAML_PATH.
|
|
100
105
|
frozen (bool, optional): Whether the configuration should be frozen. Defaults to True.
|
|
106
|
+
stub_dump (bool, optional): Whether to dump a stub file for typing support or not. Defaults to True.
|
|
101
107
|
|
|
102
108
|
Returns:
|
|
103
109
|
Config: The loaded configuration object.
|
|
@@ -110,9 +116,8 @@ def load_config(frozen: bool = True) -> Config:
|
|
|
110
116
|
CONFIG_YAML_PATH is a global variable that sets the path of your YAML config file.
|
|
111
117
|
"""
|
|
112
118
|
|
|
113
|
-
file_path = Path(__file__).resolve()
|
|
114
|
-
|
|
115
|
-
return _load_config(yaml_config_path,file_path, frozen=frozen)
|
|
119
|
+
file_path = Path(__file__).resolve() if stub_dump else None
|
|
120
|
+
return _load_config(config_path, file_path, frozen=frozen)
|
|
116
121
|
```
|
|
117
122
|
|
|
118
123
|
After creating the `load_config.py` file, set the `CONFIG_YAML_PATH` variable to the path of your `config.yaml` file. For example:
|
|
@@ -171,9 +176,19 @@ Written in Python 3.11
|
|
|
171
176
|
## Future
|
|
172
177
|
|
|
173
178
|
- [ ] Add config variants
|
|
174
|
-
- [
|
|
179
|
+
- [x] Add None type support
|
|
175
180
|
- [x] Web app
|
|
176
181
|
|
|
182
|
+
|
|
183
|
+
# Development Environment
|
|
184
|
+
|
|
185
|
+
in Order to install all dependcies install the optinal [dev] dependcies.
|
|
186
|
+
```bash
|
|
187
|
+
git clone ...
|
|
188
|
+
cd heracless
|
|
189
|
+
pip install -e .[dev]
|
|
190
|
+
```
|
|
191
|
+
|
|
177
192
|
## Author
|
|
178
193
|
|
|
179
194
|
Felix Schelling<br>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A simple and minimalistic Config Manager using YAML.
|
|
4
4
|
[](https://github.com/felixscode/heracless)
|
|
5
5
|
[](https://pypi.org/project/heracless/)
|
|
6
|
-
[](https://heracless.io/
|
|
6
|
+
[](https://heracless.io/Documentation)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
@@ -62,22 +62,25 @@ Paste the following code into your `load_config.py`:
|
|
|
62
62
|
|
|
63
63
|
```python
|
|
64
64
|
from pathlib import Path
|
|
65
|
-
from typing import
|
|
65
|
+
from typing import TypeVar
|
|
66
66
|
|
|
67
67
|
from heracless import load_config as _load_config
|
|
68
68
|
|
|
69
|
-
# CONFIG_YAML_PATH is a global variable that sets the path of your
|
|
69
|
+
# CONFIG_YAML_PATH is a global variable that sets the path of your yaml config file
|
|
70
70
|
# Edit this to your config file path
|
|
71
71
|
CONFIG_YAML_PATH = None
|
|
72
72
|
|
|
73
73
|
Config = TypeVar("Config")
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
|
|
76
|
+
def load_config(config_path : Path|str = CONFIG_YAML_PATH,frozen: bool = True,stub_dump:bool = True) -> Config:
|
|
76
77
|
"""
|
|
77
78
|
Load the configuration from the specified directory and return a Config object.
|
|
78
79
|
|
|
79
80
|
Args:
|
|
81
|
+
config_path (Path|str, optional): The path to the configuration file. Defaults to CONFIG_YAML_PATH.
|
|
80
82
|
frozen (bool, optional): Whether the configuration should be frozen. Defaults to True.
|
|
83
|
+
stub_dump (bool, optional): Whether to dump a stub file for typing support or not. Defaults to True.
|
|
81
84
|
|
|
82
85
|
Returns:
|
|
83
86
|
Config: The loaded configuration object.
|
|
@@ -90,9 +93,8 @@ def load_config(frozen: bool = True) -> Config:
|
|
|
90
93
|
CONFIG_YAML_PATH is a global variable that sets the path of your YAML config file.
|
|
91
94
|
"""
|
|
92
95
|
|
|
93
|
-
file_path = Path(__file__).resolve()
|
|
94
|
-
|
|
95
|
-
return _load_config(yaml_config_path,file_path, frozen=frozen)
|
|
96
|
+
file_path = Path(__file__).resolve() if stub_dump else None
|
|
97
|
+
return _load_config(config_path, file_path, frozen=frozen)
|
|
96
98
|
```
|
|
97
99
|
|
|
98
100
|
After creating the `load_config.py` file, set the `CONFIG_YAML_PATH` variable to the path of your `config.yaml` file. For example:
|
|
@@ -151,9 +153,19 @@ Written in Python 3.11
|
|
|
151
153
|
## Future
|
|
152
154
|
|
|
153
155
|
- [ ] Add config variants
|
|
154
|
-
- [
|
|
156
|
+
- [x] Add None type support
|
|
155
157
|
- [x] Web app
|
|
156
158
|
|
|
159
|
+
|
|
160
|
+
# Development Environment
|
|
161
|
+
|
|
162
|
+
in Order to install all dependcies install the optinal [dev] dependcies.
|
|
163
|
+
```bash
|
|
164
|
+
git clone ...
|
|
165
|
+
cd heracless
|
|
166
|
+
pip install -e .[dev]
|
|
167
|
+
```
|
|
168
|
+
|
|
157
169
|
## Author
|
|
158
170
|
|
|
159
171
|
Felix Schelling<br>
|
|
File without changes
|
|
@@ -111,7 +111,7 @@ def _fight_hydra(
|
|
|
111
111
|
return config_obj
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def fight(cfg_dir: Path, dump_dir: Path, frozen: bool) -> Optional[Any]:
|
|
114
|
+
def fight(cfg_dir: Path|str, dump_dir: Path|None, frozen: bool) -> Optional[Any]:
|
|
115
115
|
"""
|
|
116
116
|
Parse YAML config and dump it into a file.
|
|
117
117
|
|
|
@@ -123,7 +123,13 @@ def fight(cfg_dir: Path, dump_dir: Path, frozen: bool) -> Optional[Any]:
|
|
|
123
123
|
:raises FileNotFoundError: If the config file does not exist.
|
|
124
124
|
:raises OSError: If there is an issue reading the file.
|
|
125
125
|
"""
|
|
126
|
-
|
|
126
|
+
if isinstance(cfg_dir, str):
|
|
127
|
+
cfg_dir = Path(cfg_dir)
|
|
128
|
+
if isinstance(dump_dir, str):
|
|
129
|
+
dump_dir = Path(dump_dir)
|
|
130
|
+
if cfg_dir is None:
|
|
131
|
+
raise TypeError("cfg_dir cannot be None. please set the path to the config files location")
|
|
132
|
+
dump_func = dump_in_file if dump_dir else dump_dummy # if dump_dir is None, then dump_dummy is used
|
|
127
133
|
yaml_load_func = full_load
|
|
128
134
|
return _fight_hydra(cfg_dir, dump_dir, dump_func, yaml_load_func, frozen)
|
|
129
135
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -10,12 +10,14 @@ CONFIG_YAML_PATH = None
|
|
|
10
10
|
Config = TypeVar("Config")
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def load_config(frozen: bool = True) -> Config:
|
|
13
|
+
def load_config(config_path : Path|str = CONFIG_YAML_PATH,frozen: bool = True,stub_dump:bool = True) -> Config:
|
|
14
14
|
"""
|
|
15
15
|
Load the configuration from the specified directory and return a Config object.
|
|
16
16
|
|
|
17
17
|
Args:
|
|
18
|
+
config_path (Path|str, optional): The path to the configuration file. Defaults to CONFIG_YAML_PATH.
|
|
18
19
|
frozen (bool, optional): Whether the configuration should be frozen. Defaults to True.
|
|
20
|
+
stub_dump (bool, optional): Whether to dump a stub file for typing support or not. Defaults to True.
|
|
19
21
|
|
|
20
22
|
Returns:
|
|
21
23
|
Config: The loaded configuration object.
|
|
@@ -28,6 +30,5 @@ def load_config(frozen: bool = True) -> Config:
|
|
|
28
30
|
CONFIG_YAML_PATH is a global variable that sets the path of your YAML config file.
|
|
29
31
|
"""
|
|
30
32
|
|
|
31
|
-
file_path = Path(__file__).resolve()
|
|
32
|
-
|
|
33
|
-
return _load_config(yaml_config_path, file_path, frozen=frozen)
|
|
33
|
+
file_path = Path(__file__).resolve() if stub_dump else None
|
|
34
|
+
return _load_config(config_path, file_path, frozen=frozen)
|
|
File without changes
|
|
@@ -14,7 +14,7 @@ st.markdown(
|
|
|
14
14
|
"""
|
|
15
15
|
[](https://github.com/felixscode/heracless)
|
|
16
16
|
[](https://pypi.org/project/heracless/)
|
|
17
|
-
[](https://heracless.io/
|
|
17
|
+
[](https://heracless.io/Documentation)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
File without changes
|
|
@@ -87,22 +87,25 @@ Paste the following code into your `load_config.py`:
|
|
|
87
87
|
|
|
88
88
|
```python
|
|
89
89
|
from pathlib import Path
|
|
90
|
-
from typing import
|
|
90
|
+
from typing import TypeVar
|
|
91
91
|
|
|
92
92
|
from heracless import load_config as _load_config
|
|
93
93
|
|
|
94
|
-
# CONFIG_YAML_PATH is a global variable that sets the path of your
|
|
94
|
+
# CONFIG_YAML_PATH is a global variable that sets the path of your yaml config file
|
|
95
95
|
# Edit this to your config file path
|
|
96
96
|
CONFIG_YAML_PATH = None
|
|
97
97
|
|
|
98
98
|
Config = TypeVar("Config")
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
def load_config(config_path : Path|str = CONFIG_YAML_PATH,frozen: bool = True,stub_dump:bool = True) -> Config:
|
|
101
102
|
\"""
|
|
102
103
|
Load the configuration from the specified directory and return a Config object.
|
|
103
104
|
|
|
104
105
|
Args:
|
|
106
|
+
config_path (Path|str, optional): The path to the configuration file. Defaults to CONFIG_YAML_PATH.
|
|
105
107
|
frozen (bool, optional): Whether the configuration should be frozen. Defaults to True.
|
|
108
|
+
stub_dump (bool, optional): Whether to dump a stub file for typing support or not. Defaults to True.
|
|
106
109
|
|
|
107
110
|
Returns:
|
|
108
111
|
Config: The loaded configuration object.
|
|
@@ -115,12 +118,12 @@ def load_config(frozen: bool = True) -> Config:
|
|
|
115
118
|
CONFIG_YAML_PATH is a global variable that sets the path of your YAML config file.
|
|
116
119
|
\"""
|
|
117
120
|
|
|
118
|
-
file_path = Path(__file__).resolve()
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
file_path = Path(__file__).resolve() if stub_dump else None
|
|
122
|
+
return _load_config(config_path, file_path, frozen=frozen)
|
|
123
|
+
|
|
121
124
|
```
|
|
122
125
|
|
|
123
|
-
After creating the `load_config.py` file, set the `CONFIG_YAML_PATH` variable to the path of your `config.yaml` file. For example:
|
|
126
|
+
After creating the `load_config.py` file, set the `CONFIG_YAML_PATH` variable to the path of your default `config.yaml` file. For example:
|
|
124
127
|
|
|
125
128
|
```python
|
|
126
129
|
CONFIG_YAML_PATH = "/path/to/your/config.yaml"
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: heracless
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Yaml to Dataclass parser for Config files
|
|
5
5
|
Author-email: Felix Schelling <felix.schelling@protonmail.com>
|
|
6
6
|
Project-URL: Repository, https://github.com/felixscode/heracless.git
|
|
@@ -12,18 +12,21 @@ Requires-Python: >=3.10
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: black
|
|
15
|
-
Requires-Dist: pytest
|
|
16
15
|
Requires-Dist: PyYAML
|
|
17
16
|
Requires-Dist: art
|
|
18
|
-
|
|
19
|
-
Requires-Dist:
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest; extra == "dev"
|
|
19
|
+
Requires-Dist: streamlit; extra == "dev"
|
|
20
|
+
Requires-Dist: streamlit_ace; extra == "dev"
|
|
21
|
+
Requires-Dist: build; extra == "dev"
|
|
22
|
+
Requires-Dist: twine; extra == "dev"
|
|
20
23
|
|
|
21
24
|
# ⚔️ Heracless ⚔️
|
|
22
25
|
|
|
23
26
|
A simple and minimalistic Config Manager using YAML.
|
|
24
27
|
[](https://github.com/felixscode/heracless)
|
|
25
28
|
[](https://pypi.org/project/heracless/)
|
|
26
|
-
[](https://heracless.io/
|
|
29
|
+
[](https://heracless.io/Documentation)
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
## Table of Contents
|
|
@@ -82,22 +85,25 @@ Paste the following code into your `load_config.py`:
|
|
|
82
85
|
|
|
83
86
|
```python
|
|
84
87
|
from pathlib import Path
|
|
85
|
-
from typing import
|
|
88
|
+
from typing import TypeVar
|
|
86
89
|
|
|
87
90
|
from heracless import load_config as _load_config
|
|
88
91
|
|
|
89
|
-
# CONFIG_YAML_PATH is a global variable that sets the path of your
|
|
92
|
+
# CONFIG_YAML_PATH is a global variable that sets the path of your yaml config file
|
|
90
93
|
# Edit this to your config file path
|
|
91
94
|
CONFIG_YAML_PATH = None
|
|
92
95
|
|
|
93
96
|
Config = TypeVar("Config")
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
|
|
99
|
+
def load_config(config_path : Path|str = CONFIG_YAML_PATH,frozen: bool = True,stub_dump:bool = True) -> Config:
|
|
96
100
|
"""
|
|
97
101
|
Load the configuration from the specified directory and return a Config object.
|
|
98
102
|
|
|
99
103
|
Args:
|
|
104
|
+
config_path (Path|str, optional): The path to the configuration file. Defaults to CONFIG_YAML_PATH.
|
|
100
105
|
frozen (bool, optional): Whether the configuration should be frozen. Defaults to True.
|
|
106
|
+
stub_dump (bool, optional): Whether to dump a stub file for typing support or not. Defaults to True.
|
|
101
107
|
|
|
102
108
|
Returns:
|
|
103
109
|
Config: The loaded configuration object.
|
|
@@ -110,9 +116,8 @@ def load_config(frozen: bool = True) -> Config:
|
|
|
110
116
|
CONFIG_YAML_PATH is a global variable that sets the path of your YAML config file.
|
|
111
117
|
"""
|
|
112
118
|
|
|
113
|
-
file_path = Path(__file__).resolve()
|
|
114
|
-
|
|
115
|
-
return _load_config(yaml_config_path,file_path, frozen=frozen)
|
|
119
|
+
file_path = Path(__file__).resolve() if stub_dump else None
|
|
120
|
+
return _load_config(config_path, file_path, frozen=frozen)
|
|
116
121
|
```
|
|
117
122
|
|
|
118
123
|
After creating the `load_config.py` file, set the `CONFIG_YAML_PATH` variable to the path of your `config.yaml` file. For example:
|
|
@@ -171,9 +176,19 @@ Written in Python 3.11
|
|
|
171
176
|
## Future
|
|
172
177
|
|
|
173
178
|
- [ ] Add config variants
|
|
174
|
-
- [
|
|
179
|
+
- [x] Add None type support
|
|
175
180
|
- [x] Web app
|
|
176
181
|
|
|
182
|
+
|
|
183
|
+
# Development Environment
|
|
184
|
+
|
|
185
|
+
in Order to install all dependcies install the optinal [dev] dependcies.
|
|
186
|
+
```bash
|
|
187
|
+
git clone ...
|
|
188
|
+
cd heracless
|
|
189
|
+
pip install -e .[dev]
|
|
190
|
+
```
|
|
191
|
+
|
|
177
192
|
## Author
|
|
178
193
|
|
|
179
194
|
Felix Schelling<br>
|
|
@@ -21,6 +21,7 @@ pyproject.toml
|
|
|
21
21
|
./tests/test_units.py
|
|
22
22
|
./tests/config/types.py
|
|
23
23
|
./tests/config/types.pyi
|
|
24
|
+
./tmp/test_file.pyi
|
|
24
25
|
heracless/__init__.py
|
|
25
26
|
heracless/cli_tool.py
|
|
26
27
|
heracless/fight.py
|
|
@@ -45,4 +46,5 @@ tests/quick_test.py
|
|
|
45
46
|
tests/test_end_to_end.py
|
|
46
47
|
tests/test_units.py
|
|
47
48
|
tests/config/types.py
|
|
48
|
-
tests/config/types.pyi
|
|
49
|
+
tests/config/types.pyi
|
|
50
|
+
tmp/test_file.pyi
|
|
File without changes
|
|
@@ -3,14 +3,11 @@ requires = ["setuptools >= 69.5.1"]
|
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
[project]
|
|
5
5
|
name = "heracless"
|
|
6
|
-
version = "0.3.
|
|
6
|
+
version = "0.3.3"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"black",
|
|
9
|
-
"pytest",
|
|
10
9
|
"PyYAML",
|
|
11
10
|
"art",
|
|
12
|
-
"streamlit",
|
|
13
|
-
"streamlit_ace",
|
|
14
11
|
]
|
|
15
12
|
requires-python = ">= 3.10"
|
|
16
13
|
authors = [
|
|
@@ -32,5 +29,13 @@ package-dir = {"" = "."}
|
|
|
32
29
|
[project.urls]
|
|
33
30
|
Repository = "https://github.com/felixscode/heracless.git"
|
|
34
31
|
"Homepage" = "https://heracless.io"
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest",
|
|
35
|
+
"streamlit",
|
|
36
|
+
"streamlit_ace",
|
|
37
|
+
"build",
|
|
38
|
+
"twine",
|
|
39
|
+
]
|
|
35
40
|
[tool.black]
|
|
36
41
|
line-length = 120
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from datetime import date, datetime
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
@dataclass(frozen=True)
|
|
6
|
+
class ProductItem:
|
|
7
|
+
sku: str
|
|
8
|
+
quantity: int
|
|
9
|
+
description: str
|
|
10
|
+
price: float
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class Config:
|
|
15
|
+
invoice: int
|
|
16
|
+
date: date
|
|
17
|
+
bill_to: "BillTo"
|
|
18
|
+
ship_to: "ShipTo"
|
|
19
|
+
product: tuple["ProductItem"]
|
|
20
|
+
tax: float
|
|
21
|
+
total: float
|
|
22
|
+
comments: str
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass(frozen=True)
|
|
26
|
+
class Address:
|
|
27
|
+
lines: str
|
|
28
|
+
city: str
|
|
29
|
+
state: str
|
|
30
|
+
postal: str
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True)
|
|
34
|
+
class ShipTo:
|
|
35
|
+
given: str
|
|
36
|
+
family: str
|
|
37
|
+
address: "Address"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(frozen=True)
|
|
41
|
+
class BillTo:
|
|
42
|
+
given: str
|
|
43
|
+
family: str
|
|
44
|
+
address: "Address"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def load_config(config_path: str) -> Config: ...
|