eosframes 1.1.0__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.
- eosframes/__init__.py +121 -0
- eosframes/cli.py +764 -0
- eosframes/exceptions.py +20 -0
- eosframes/hub.py +152 -0
- eosframes/logger.py +127 -0
- eosframes/naming.py +610 -0
- eosframes/ops.py +711 -0
- eosframes/read.py +213 -0
- eosframes/scale.py +1713 -0
- eosframes/stack.py +204 -0
- eosframes/utils.py +23 -0
- eosframes/write.py +201 -0
- eosframes-1.1.0.dist-info/METADATA +112 -0
- eosframes-1.1.0.dist-info/RECORD +17 -0
- eosframes-1.1.0.dist-info/WHEEL +4 -0
- eosframes-1.1.0.dist-info/entry_points.txt +3 -0
- eosframes-1.1.0.dist-info/licenses/LICENSE +21 -0
eosframes/__init__.py
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""``eosframes`` — utilities for Ersilia model output dataframes.
|
|
2
|
+
|
|
3
|
+
Split, assemble, convert, stack, scale, and summarise tabular outputs from
|
|
4
|
+
the `Ersilia Model Hub <https://github.com/ersilia-os/ersilia>`_. The CLI
|
|
5
|
+
entry point is ``eosframes`` (registered as a ``poetry`` script); the same
|
|
6
|
+
operations are available as Python functions imported from this package.
|
|
7
|
+
|
|
8
|
+
The architecture is layered: ``cli`` → ``ops`` / ``scale`` →
|
|
9
|
+
``read`` / ``write`` / ``stack`` / ``naming`` / ``hub``. Every
|
|
10
|
+
DataFrame that flows through the library carries two loose attributes —
|
|
11
|
+
``df.model_id`` (always) and ``df.version`` (when the filename encodes
|
|
12
|
+
it) — and write paths cross-validate them against the destination
|
|
13
|
+
filename. See ``CLAUDE.md`` for the full attribute and naming contracts.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from importlib.metadata import PackageNotFoundError
|
|
17
|
+
from importlib.metadata import version as _pkg_version
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
__version__ = _pkg_version("eosframes")
|
|
21
|
+
except PackageNotFoundError:
|
|
22
|
+
# Not installed (e.g. running from a source checkout without
|
|
23
|
+
# `pip install -e .`). Keep the package importable but signal the
|
|
24
|
+
# situation — scaler files will fail the version-match check.
|
|
25
|
+
__version__ = "0.0.0+unknown"
|
|
26
|
+
|
|
27
|
+
from .exceptions import EosframesError
|
|
28
|
+
from .hub import fetch_columns, fetch_metadata
|
|
29
|
+
from .logger import get_logger, set_verbosity
|
|
30
|
+
from .naming import (
|
|
31
|
+
get_model_id_from_path,
|
|
32
|
+
get_version_from_path,
|
|
33
|
+
is_model_id_valid,
|
|
34
|
+
is_valid_columns_name,
|
|
35
|
+
is_valid_info_name,
|
|
36
|
+
is_valid_name,
|
|
37
|
+
is_valid_stack_explicit_name,
|
|
38
|
+
is_valid_stack_mix_name,
|
|
39
|
+
is_valid_summary_name,
|
|
40
|
+
is_valid_transformer_name,
|
|
41
|
+
make_chunks_dir_name,
|
|
42
|
+
make_columns_name,
|
|
43
|
+
make_info_name,
|
|
44
|
+
make_output_name,
|
|
45
|
+
make_stack_explicit_name,
|
|
46
|
+
make_stack_mix_name,
|
|
47
|
+
make_summary_name,
|
|
48
|
+
make_transformer_name,
|
|
49
|
+
parse_name,
|
|
50
|
+
parse_stack_explicit_name,
|
|
51
|
+
parse_stack_mix_name,
|
|
52
|
+
parse_transformer_name,
|
|
53
|
+
)
|
|
54
|
+
from .ops import (
|
|
55
|
+
append_files,
|
|
56
|
+
convert_file,
|
|
57
|
+
dedupe_file,
|
|
58
|
+
split_csv,
|
|
59
|
+
stack_files,
|
|
60
|
+
unstack_file,
|
|
61
|
+
)
|
|
62
|
+
from .read import read_chunked_csvs, read_csv, read_h5
|
|
63
|
+
from .scale import fit, fit_file, transform, transform_file
|
|
64
|
+
from .stack import hstack, vstack
|
|
65
|
+
from .write import write_chunked_csvs, write_csv, write_h5
|
|
66
|
+
|
|
67
|
+
__all__ = [
|
|
68
|
+
"__version__",
|
|
69
|
+
# Low-level I/O
|
|
70
|
+
"read_csv",
|
|
71
|
+
"read_h5",
|
|
72
|
+
"read_chunked_csvs",
|
|
73
|
+
"write_csv",
|
|
74
|
+
"write_h5",
|
|
75
|
+
"write_chunked_csvs",
|
|
76
|
+
# DataFrame operations
|
|
77
|
+
"hstack",
|
|
78
|
+
"vstack",
|
|
79
|
+
# File-level operations
|
|
80
|
+
"split_csv",
|
|
81
|
+
"convert_file",
|
|
82
|
+
"stack_files",
|
|
83
|
+
"unstack_file",
|
|
84
|
+
"append_files",
|
|
85
|
+
"dedupe_file",
|
|
86
|
+
# GitHub / hub
|
|
87
|
+
"fetch_metadata",
|
|
88
|
+
"fetch_columns",
|
|
89
|
+
# Scaling
|
|
90
|
+
"fit",
|
|
91
|
+
"transform",
|
|
92
|
+
"fit_file",
|
|
93
|
+
"transform_file",
|
|
94
|
+
# Naming utilities
|
|
95
|
+
"parse_name",
|
|
96
|
+
"make_output_name",
|
|
97
|
+
"make_chunks_dir_name",
|
|
98
|
+
"make_info_name",
|
|
99
|
+
"make_columns_name",
|
|
100
|
+
"make_summary_name",
|
|
101
|
+
"make_transformer_name",
|
|
102
|
+
"make_stack_mix_name",
|
|
103
|
+
"make_stack_explicit_name",
|
|
104
|
+
"parse_stack_mix_name",
|
|
105
|
+
"parse_stack_explicit_name",
|
|
106
|
+
"parse_transformer_name",
|
|
107
|
+
"get_version_from_path",
|
|
108
|
+
"get_model_id_from_path",
|
|
109
|
+
"is_valid_name",
|
|
110
|
+
"is_valid_info_name",
|
|
111
|
+
"is_valid_columns_name",
|
|
112
|
+
"is_valid_summary_name",
|
|
113
|
+
"is_valid_stack_mix_name",
|
|
114
|
+
"is_valid_stack_explicit_name",
|
|
115
|
+
"is_valid_transformer_name",
|
|
116
|
+
"is_model_id_valid",
|
|
117
|
+
# Misc
|
|
118
|
+
"get_logger",
|
|
119
|
+
"set_verbosity",
|
|
120
|
+
"EosframesError",
|
|
121
|
+
]
|