scilens 0.1.2__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 +1 -1
- {scilens-0.1.2.dist-info → scilens-0.1.3.dist-info}/METADATA +1 -1
- {scilens-0.1.2.dist-info → scilens-0.1.3.dist-info}/RECORD +6 -6
- {scilens-0.1.2.dist-info → scilens-0.1.3.dist-info}/WHEEL +0 -0
- {scilens-0.1.2.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")
|
|
@@ -2,4 +2,4 @@ _A=None
|
|
|
2
2
|
from typing import Literal
|
|
3
3
|
from pydantic import BaseModel,Field
|
|
4
4
|
CurveParser=Literal['simple_1D','frameseries_2D']
|
|
5
|
-
class ReaderNetcdfConfig(BaseModel):groups_depth:int|_A=Field(default=_A,description='
|
|
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`).')
|
|
@@ -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,7 +25,7 @@ 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=
|
|
28
|
+
scilens/config/models/reader_format_netcdf.py,sha256=nbfTB3avO0DidbNa1dCZGFZmmQvzTYhpe6mqfAanaOA,1025
|
|
29
29
|
scilens/config/models/reader_format_txt.py,sha256=eHg90gwEI_VpqwqEjMRhwlS8dHcl5G4ow-37HjQq_zY,1168
|
|
30
30
|
scilens/config/models/readers.py,sha256=dK_d02jqsrYTe42HO3SHQ6Fyw3SC_jleMafJpelAhdY,605
|
|
31
31
|
scilens/config/models/report.py,sha256=nTmP2nIwL2Ku5IH9QMwYLPKmfsK2ttu9UK0GnzPUHeM,870
|
|
@@ -90,7 +90,7 @@ scilens/utils/template.py,sha256=9dlXX3nmfzDRUwzPJOkoxk15UXivZ2SW-McdCwokFa4,443
|
|
|
90
90
|
scilens/utils/time_tracker.py,sha256=DdVBoMpVLXrX0qZZXyLm4g38EwDVLlRcBqcpNex1mYY,545
|
|
91
91
|
scilens/utils/vectors.py,sha256=4N2BZSC5n3HgZqPujDGF5NdjVmSL1rOHb_qw4OoABQY,103
|
|
92
92
|
scilens/utils/web.py,sha256=E4T8Fra65u9g_BpcFANPk4ORvsYavAeiSgWA3vRca2E,804
|
|
93
|
-
scilens-0.1.
|
|
94
|
-
scilens-0.1.
|
|
95
|
-
scilens-0.1.
|
|
96
|
-
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
|