Skip to content

Commit

Permalink
Antes de reorganización, pruebas pasan excepto parasitismo
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Sep 9, 2022
1 parent f32dbaa commit f7ec536
Show file tree
Hide file tree
Showing 33 changed files with 66 additions and 60 deletions.
32 changes: 17 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pruebas/test_central/rcrs/modelo_calib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import xarray as xr
from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela, Coso
from tikon.central.res import Resultado
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.ecs import ÁrbolEcs, CategEc, EcuaciónVacía, SubcategEc, Ecuación, Parám
from tikon.ecs.aprioris import APrioriDens
from tikon.datos import Obs
Expand Down
2 changes: 1 addition & 1 deletion pruebas/test_central/rcrs/modelo_calib_inic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela, Coso
from tikon.central.res import Resultado
from tikon.datos import Obs
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.ecs import ÁrbolEcs, CategEc, EcuaciónVacía, SubcategEc, Ecuación, Parám
from tikon.ecs.aprioris import APrioriDens
from tikon.utils import EJE_TIEMPO, EJE_PARC, EJE_ESTOC
Expand Down
2 changes: 1 addition & 1 deletion pruebas/test_central/rcrs/modelo_calib_mód.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import xarray as xr
from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela, Coso
from tikon.central.res import Resultado
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.ecs import ÁrbolEcs, CategEc, EcuaciónVacía, SubcategEc, Ecuación, Parám
from tikon.ecs.aprioris import APrioriDens
from tikon.datos import Obs
Expand Down
2 changes: 1 addition & 1 deletion pruebas/test_datos/test_datos.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import xarray as xr
import xarray.testing as xrt

from tikon.datos.datos import Datos, lleno_como, combinar, máximo, mínimo, donde, f_numpy, codificar_coords
from tikon.central.matriz import Datos, lleno_como, combinar, máximo, mínimo, donde, f_numpy, codificar_coords


def _prb_igl(dts, mxr):
Expand Down
2 changes: 1 addition & 1 deletion pruebas/test_móds/test_cultivo/test_cultivo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import xarray.testing as xrt

from tikon.central import Parcela, Modelo, Exper
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.móds.cultivo.cult import Cultivo
from tikon.móds.cultivo.extrn import CombinSimsCult
from tikon.móds.cultivo.res import RES_BIOMASA, RES_HUMSUELO
Expand Down
2 changes: 1 addition & 1 deletion pruebas/test_móds/test_manejo/rcrs/mod_incr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tikon.central import Módulo, SimulMódulo, Exper, Parcela
from tikon.central.res import Resultado
from tikon.datos.datos import donde as f_donde
from tikon.central.matriz import donde as f_donde
from tikon.móds.manejo import Acción
from tikon.móds.manejo.conds import CondVariable

Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ license = "AGPL-v3.0"

[tool.poetry.dependencies]
python = "^3.9,<3.11"
numpy = "^1.22.3"
scipy = "^1.8.0"
pandas = "^1.4.1"
numpy = "^1.23.2"
scipy = "^1.9.1"
pandas = "^1.4.4"
matplotlib = "^3.5.1"
SALib = "^1.4.5"
spotpy = "^1.5.14"
spotpy = "^1.6.1"
taqdir = "^2.1.3"
Shapely = "^1.8.1"
ennikkai = "^1.2.5"
Expand All @@ -24,7 +24,7 @@ tradssat = "^0.1.7"
pyshp = "^2.2.0"
Pillow = "^9.0.1"
Babel = "^2.9.1"
seaborn = "^0.11.2"
seaborn = "^0.12.0"
openpyxl = "^3.0.10"
xlrd = "1.2.0"
bibtexparser = "^1.2.0"
Expand Down
3 changes: 2 additions & 1 deletion tikon/central/coso.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from typing import Any

from tikon.utils import guardar_json, leer_json

Expand All @@ -14,7 +15,7 @@ def __init__(símismo, nombre, ecs):
def índices_inter(símismo):
return símismo.nombre

def activar_ec(símismo, categ, subcateg, ec, **argspc):
def activar_ec(símismo, categ: str, subcateg: str, ec: str, **argspc: Any):
símismo.ecs.activar_ec(categ, subcateg, ec)

def activar_ecs(símismo, dic_ecs):
Expand Down
4 changes: 2 additions & 2 deletions tikon/datos/datos.py → tikon/central/matriz.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import functools
from typing import Any, Optional
from typing import Any, Optional, Union, List

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -159,7 +159,7 @@ def llenar_inf(símismo, val):
símismo.matr[np.isinf(símismo.matr)] = val
return símismo

def nuevo_como(símismo, vals, excluir: str = None):
def nuevo_como(símismo, vals, excluir: Union[str, List[str]] = None):
coords = símismo.coords_internas
dims = símismo.dims
if excluir:
Expand Down
3 changes: 1 addition & 2 deletions tikon/central/parc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import numpy as np
import pyproj
import xarray as xr
from frozendict import frozendict
from geopy.distance import distance
from shapely.geometry import Polygon
from shapely.ops import transform
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.utils import EJE_PARC, EJE_DEST, EJE_COORD


Expand Down
3 changes: 1 addition & 2 deletions tikon/central/res.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import numpy as np
import xarray as xr
from frozendict import frozendict

from tikon.central.errores import ErrorNombreInválido
from tikon.central.simul import PlantillaSimul
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.datos.dibs import graficar_res
from tikon.datos.valid import ValidÍnds, ValidRes
from tikon.ecs.aprioris import APrioriDens
Expand Down
3 changes: 1 addition & 2 deletions tikon/ecs/paráms.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import numpy as np
import xarray as xr
from frozendict import frozendict

from tikon.datos.datos import Datos
from tikon.central.matriz import Datos

from tikon.utils import EJE_PARÁMS

Expand Down
3 changes: 1 addition & 2 deletions tikon/ecs/árb_mód.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import xarray as xr
from frozendict import frozendict

from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from .paráms import MnjdrValsCoefs, MatrParám, ValsParámCoso, ValsParámCosoInter, ValsParámCosoVacíos
from .árb_coso import ÁrbolEcsCoso, CategEcCoso, SubcategEcCoso, EcuaciónCoso, ParámCoso

Expand Down
Empty file.
2 changes: 1 addition & 1 deletion tikon/móds/cultivo/cult.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tikon.utils import EJE_PARC

from . import res
from ...datos.datos import codificar_coords
from tikon.central.matriz import codificar_coords


class SimulCultivo(SimulMódulo):
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/cultivo/extrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

from tikon.central import Parcela, GrupoParcelas
from tikon.datos.datos import Datos, combinar, codificar_coords
from tikon.central.matriz import Datos, combinar, codificar_coords
from tikon.móds.rae.orgs.plantas import externa as plt_externas
from tikon.móds.rae.orgs.plantas.externa import CultivoExterno
from tikon.utils import EJE_PARÁMS, EJE_ESTOC
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/cultivo/mod_pcse/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pandas as pd
from babel.dates import format_date

from tikon.datos.datos import codificar_coords
from tikon.central.matriz import codificar_coords
from tikon.móds.cultivo.extrn import SimulCultivoExterno, InstanciaSimulCultivo
from tikon.móds.cultivo.res import RES_HUMSUELO, RES_BIOMASA
from tikon.móds.rae.utils import EJE_ETAPA, EJE_VÍCTIMA
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/manejo/conds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
from frozendict import frozendict

from tikon.datos.datos import Datos, lleno_como, f_numpy as fnp
from tikon.central.matriz import Datos, lleno_como, f_numpy as fnp


class PruebaCond(object):
Expand Down
4 changes: 2 additions & 2 deletions tikon/móds/manejo/manejo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from copy import deepcopy, copy
from copy import copy

from tikon.central.módulo import Módulo
from tikon.central.simul import SimulMódulo
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from tikon.móds.manejo.acciones import Acción


Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/manejo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tikon.datos.datos import donde as donde_, Datos
from tikon.central.matriz import donde as donde_, Datos
from tikon.móds.manejo.acciones import Acción
from tikon.móds.manejo.conds import CondVariable
from tikon.móds.rae.utils import RES_POBS, EJE_ETAPA
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/_ecs_coh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tikon.datos.datos import Datos
from tikon.central.matriz import Datos
from ._plntll import EcuaciónOrg
from ...utils import RES_EDAD, RES_COHORTES

Expand Down
4 changes: 1 addition & 3 deletions tikon/móds/rae/orgs/ecs/crec/_categ.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import numpy as np

from tikon.datos.datos import máximo
from tikon.central.matriz import máximo
from .ec import EcCrec
from .tasa import TasaCrec
from .._plntll import CategEcOrg
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/depred/_categ.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from frozendict import frozendict

from tikon.datos.datos import mínimo
from tikon.central.matriz import mínimo
from tikon.ecs.árb_mód import EcuaciónVacía
from tikon.móds.rae.orgs.ecs._plntll import CategEcOrg, SubcategEcOrg
from tikon.móds.rae.orgs.ecs.utils import ECS_DEPR, probs_conj
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/edad/brr_no_lín_temp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from scipy.stats import norm, expon

from tikon.datos.datos import máximo, f_numpy
from tikon.central.matriz import máximo, f_numpy
from tikon.ecs.aprioris import APrioriDist
from tikon.ecs.árb_mód import Parám
from ._plntll_ec import EcuaciónEdad
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/edad/brr_temp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from scipy.stats import norm, expon

from tikon.datos.datos import máximo
from tikon.central.matriz import máximo
from tikon.ecs.aprioris import APrioriDist
from tikon.ecs.árb_mód import Parám
from ._plntll_ec import EcuaciónEdad
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/edad/logan_temp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
import scipy.stats as estad
from tikon.datos.datos import máximo
from tikon.central.matriz import máximo
from tikon.ecs.aprioris import APrioriDist
from tikon.ecs.árb_mód import Parám

Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/edad/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import xarray as xr

from tikon.datos.datos import f_numpy, donde, máximo, mínimo
from tikon.central.matriz import f_numpy, donde, máximo, mínimo


def días_grados(mín, máx, umbrales, método, corte):
Expand Down
2 changes: 1 addition & 1 deletion tikon/móds/rae/orgs/ecs/estoc/normal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from tikon.datos.datos import máximo
from tikon.central.matriz import máximo
from tikon.ecs.aprioris import APrioriDens
from tikon.ecs.árb_mód import Parám
from tikon.móds.rae.orgs.ecs.estoc._plntll_ec import EcuaciónEstoc
Expand Down
3 changes: 1 addition & 2 deletions tikon/móds/rae/orgs/ecs/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import xarray as xr

from tikon.datos.datos import donde
from tikon.central.matriz import donde

ECS_EDAD = 'Edad'
ECS_CREC = 'Crecimiento'
Expand Down
Loading

0 comments on commit f7ec536

Please sign in to comment.