scilens 0.1.1__py3-none-any.whl → 0.1.3__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.
- scilens/components/file_reader.py +8 -7
- scilens/config/models/reader_format_netcdf.py +5 -0
- scilens/config/models/readers.py +2 -1
- scilens/report/templates/index.html +2 -2
- {scilens-0.1.1.dist-info → scilens-0.1.3.dist-info}/METADATA +1 -1
- {scilens-0.1.1.dist-info → scilens-0.1.3.dist-info}/RECORD +8 -7
- {scilens-0.1.1.dist-info → scilens-0.1.3.dist-info}/WHEEL +0 -0
- {scilens-0.1.1.dist-info → scilens-0.1.3.dist-info}/entry_points.txt +0 -0
|
@@ -15,14 +15,15 @@ class FileReader:
|
|
|
15
15
|
if not B:raise Exception(f"Custom curve parser not found: {A}")
|
|
16
16
|
J=C.split('/')[-1].replace('.py','');F=importlib.util.spec_from_file_location(J,B);G=importlib.util.module_from_spec(F);F.loader.exec_module(G);return getattr(G,H)
|
|
17
17
|
def read(A,path):
|
|
18
|
-
logging.info(f"Reading file: {path}");E=_A;
|
|
19
|
-
if
|
|
20
|
-
if isinstance(
|
|
18
|
+
logging.info(f"Reading file: {path}");E=_A;D=A.config.custom_curve_parser
|
|
19
|
+
if D:
|
|
20
|
+
if isinstance(D,str):E=A._get_custom_parser(D)
|
|
21
21
|
try:
|
|
22
|
-
B=A.reader_mgmr.get_reader_from_file(path,encoding=A.config.encoding,curve_parser=E,extension_mapping=A.config.extension_mapping,extension_fallback=A.config.extension_fallback);
|
|
23
|
-
if B.__class__.__name__=='ReaderTxt':
|
|
24
|
-
elif B.__class__.__name__=='ReaderCsv':
|
|
25
|
-
B.
|
|
22
|
+
B=A.reader_mgmr.get_reader_from_file(path,encoding=A.config.encoding,curve_parser=E,extension_mapping=A.config.extension_mapping,extension_fallback=A.config.extension_fallback);C=_A
|
|
23
|
+
if B.__class__.__name__=='ReaderTxt':C=A.readers_config.txt
|
|
24
|
+
elif B.__class__.__name__=='ReaderCsv':C=A.readers_config.csv
|
|
25
|
+
elif B.__class__.__name__=='ReaderNetcdf':C=A.readers_config.netcdf
|
|
26
|
+
B.read(C)
|
|
26
27
|
except NoReaderFound:
|
|
27
28
|
if A.config.extension_unknown_ignore:0
|
|
28
29
|
else:raise Exception(f"No reader found")
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
_A=None
|
|
2
|
+
from typing import Literal
|
|
3
|
+
from pydantic import BaseModel,Field
|
|
4
|
+
CurveParser=Literal['simple_1D','frameseries_2D']
|
|
5
|
+
class ReaderNetcdfConfig(BaseModel):groups_depth:int|_A=Field(default=_A,description='Définit la profondeur de recherche des groupes. Si vide prendra tous les groupes.');units_attributes:list[str]|_A=Field(default=_A,description='Noms des attributs de variable qui spécifient les unités.');curve_parser:CurveParser|_A=Field(default=_A,description='Parser de courbes: `simple_1D` or `frameseries_2D`.');curve_x_variable:str|_A=Field(default=_A,description='Nom de variable pour les axes X (`simple_1D` et `frameseries_2D`).');curve_step_variable:str|_A=Field(default=_A,description='Nom de variable `Step` (`1D`) (seulement pour `frameseries_2D`).');compare_1D:bool=Field(default=False,description='Pour les processeurs qui comparent, compare les variables vecteurs (`1D`).');compare_2D:bool=Field(default=False,description='Pour les processeurs qui comparent, compare les variables matrices (`2D`).')
|
scilens/config/models/readers.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel,Field
|
|
2
2
|
from scilens.config.models.reader_format_txt import ReaderTxtIgnoreConfig,ReaderTxtConfig
|
|
3
3
|
from scilens.config.models.reader_format_csv import ReaderCsvConfig
|
|
4
|
-
|
|
4
|
+
from scilens.config.models.reader_format_netcdf import ReaderNetcdfConfig
|
|
5
|
+
class ReadersConfig(BaseModel):txt:ReaderTxtConfig=Field(default=ReaderTxtConfig(),description='Configuration des readers txt.');csv:ReaderCsvConfig=Field(default=ReaderCsvConfig(),description='Configuration des readers csv.');netcdf:ReaderNetcdfConfig=Field(default=ReaderNetcdfConfig(),description='Configuration des readers NetCDF.')
|
|
@@ -89,8 +89,8 @@ function load_framesseries(){
|
|
|
89
89
|
</script>
|
|
90
90
|
<script type="text/javascript">
|
|
91
91
|
const global_framesseries = {
|
|
92
|
-
test : [ {% for file in data.files %} {{ file.
|
|
93
|
-
reference : [ {% for file in data.files %} {{ file.
|
|
92
|
+
test : [ {% for file in data.files %} {{ file.test.framesseries or 'null' }} , {% endfor %} ],
|
|
93
|
+
reference : [ {% for file in data.files %} {{ file.ref.framesseries or 'null' }} , {% endfor %} ],
|
|
94
94
|
};
|
|
95
95
|
load_framesseries();
|
|
96
96
|
</script>
|
|
@@ -12,7 +12,7 @@ scilens/components/compare_errors.py,sha256=_n9uWwLVZyPn99mwsAF8WBfcYppVQCsMwj0x
|
|
|
12
12
|
scilens/components/compare_floats.py,sha256=T461VNiwVXtYWqrIr5LMiUwBkHsPmhv6LjzIVfkQOI8,1978
|
|
13
13
|
scilens/components/compare_folders.py,sha256=LZ1AuYxLVHMNbtXWXQrdms4vZgOQthvDy-8NFD_EFjc,2617
|
|
14
14
|
scilens/components/executor.py,sha256=8ZZq9wwoiMr7ys9LXv1pEg5Zc06QatT9PGIigMsDAB8,3620
|
|
15
|
-
scilens/components/file_reader.py,sha256=
|
|
15
|
+
scilens/components/file_reader.py,sha256=tfRbmPu4pB7lNLUHNl8XVryx_Gy_huxe9ZrJ2OkR3b4,1623
|
|
16
16
|
scilens/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
scilens/config/cli_run_options.py,sha256=Ls7yK5QDUPFbk73nbjGuPvuRbBRYw4Miag5ISpu3prg,281
|
|
18
18
|
scilens/config/env_var.py,sha256=NqNBoIfngJEXaGEm7jGqre5pmkJ9eUjiWzbDrTVfi2c,292
|
|
@@ -25,8 +25,9 @@ scilens/config/models/execute.py,sha256=pFY-gZuBvLbcjTEcoNhPPO7FMFmKa6_TU5IXyKaf
|
|
|
25
25
|
scilens/config/models/execute_and_compare.py,sha256=TWL6yXGvQSaaV6nhHqWLvtr3v396APIoDNt0U1TbMro,582
|
|
26
26
|
scilens/config/models/file_reader.py,sha256=sDIh1z_q4B5c7PhNC1WvQWLNGR4NMbXr-WhT6zDyLB4,1000
|
|
27
27
|
scilens/config/models/reader_format_csv.py,sha256=r2ERmC_dWoESr9sCJ_T3dF2F00ypttZfSH8ZFG-PKnw,2208
|
|
28
|
+
scilens/config/models/reader_format_netcdf.py,sha256=nbfTB3avO0DidbNa1dCZGFZmmQvzTYhpe6mqfAanaOA,1025
|
|
28
29
|
scilens/config/models/reader_format_txt.py,sha256=eHg90gwEI_VpqwqEjMRhwlS8dHcl5G4ow-37HjQq_zY,1168
|
|
29
|
-
scilens/config/models/readers.py,sha256=
|
|
30
|
+
scilens/config/models/readers.py,sha256=dK_d02jqsrYTe42HO3SHQ6Fyw3SC_jleMafJpelAhdY,605
|
|
30
31
|
scilens/config/models/report.py,sha256=nTmP2nIwL2Ku5IH9QMwYLPKmfsK2ttu9UK0GnzPUHeM,870
|
|
31
32
|
scilens/config/models/report_html.py,sha256=9I9iKRDOoLMZRBY0lQV4UFtg5-D-VDfYiFGF1VFAnQ8,1389
|
|
32
33
|
scilens/config/models/report_output.py,sha256=XoqUe-t-y8GRbUR3_bDwwaWf6hif-rZ-5pKDGdCMugw,875
|
|
@@ -62,7 +63,7 @@ scilens/report/templates/compare_11_summary.html,sha256=wskX861ISVQKFyEf3cF5mD53
|
|
|
62
63
|
scilens/report/templates/compare_12_sections.html,sha256=m6HK-BL4Sb8VKNbCl-48Kmu9rh-IFkdp-Hckdedp7Gg,5923
|
|
63
64
|
scilens/report/templates/compare_13_section_numbers copy.html,sha256=0PWK_I2kNX3LjPLkkY4eSYIeB7YFkA28nk-PPLDhnaY,1753
|
|
64
65
|
scilens/report/templates/compare_13_section_numbers.html,sha256=ocPnazj2YsoroZUaBMNLqluejr7s8Kp71egceDxjzOI,2776
|
|
65
|
-
scilens/report/templates/index.html,sha256=
|
|
66
|
+
scilens/report/templates/index.html,sha256=1kN-omesa_ns7uJz25KIFHrOONvNcoBg0lhXDmAesDA,3643
|
|
66
67
|
scilens/report/templates/js_chartlibs_echarts.js,sha256=6YicVhTNIBmmBpV31XCVN5oBeiD0t29JIosJZRUv01M,907
|
|
67
68
|
scilens/report/templates/js_chartlibs_plotly.js,sha256=uVAOKUB5XE33-r04phR-LlRkFoaHEIXyQ3jXT5r97Rc,1521
|
|
68
69
|
scilens/report/templates/js_com_dom.js,sha256=YAJNGmgq2YbF9D3TqB7YSms67-xB88Molp9cKhWlqsI,1228
|
|
@@ -89,7 +90,7 @@ scilens/utils/template.py,sha256=9dlXX3nmfzDRUwzPJOkoxk15UXivZ2SW-McdCwokFa4,443
|
|
|
89
90
|
scilens/utils/time_tracker.py,sha256=DdVBoMpVLXrX0qZZXyLm4g38EwDVLlRcBqcpNex1mYY,545
|
|
90
91
|
scilens/utils/vectors.py,sha256=4N2BZSC5n3HgZqPujDGF5NdjVmSL1rOHb_qw4OoABQY,103
|
|
91
92
|
scilens/utils/web.py,sha256=E4T8Fra65u9g_BpcFANPk4ORvsYavAeiSgWA3vRca2E,804
|
|
92
|
-
scilens-0.1.
|
|
93
|
-
scilens-0.1.
|
|
94
|
-
scilens-0.1.
|
|
95
|
-
scilens-0.1.
|
|
93
|
+
scilens-0.1.3.dist-info/METADATA,sha256=jqg_M9TD7uwLyZRKSnDjmHKe3aNfJOsxqjyy42gD8A8,1367
|
|
94
|
+
scilens-0.1.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
95
|
+
scilens-0.1.3.dist-info/entry_points.txt,sha256=DaKGgxUEUv34GJAoXtta6ecL37ercejep9sCSSRQK2s,48
|
|
96
|
+
scilens-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|