update requirements

develop
gwen 3 years ago
parent ec3ce5791b
commit d2d97cd9b4

@ -1,8 +1,15 @@
houses: houses:
- name: bourbon bourbon:
- name: berry name: Bourbon
- name: anjou path: xml/bourbon
berry:
name: Berry
path: xml/Berry
anjou:
name: Anjou
path: xml/anjou
# TODO
# - Bretagne # - Bretagne
# - Bourgogne # - Bourgogne
# - Orléans # - Orléans

@ -19,11 +19,10 @@ class ProjectContext(KedroContext):
project_version = "0.1" project_version = "0.1"
package_name = "actes_princiers" package_name = "actes_princiers"
def get_houses_config(self): def get_houses(self):
"""loading from generic configuration file """loading from generic configuration file
(that is, the global houses `houses.yaml`)""" (that is, the global houses `houses.yaml`)"""
houses_file = self.config_loader.get("houses*") houses_file = self.config_loader.get("houses*")
# FIXME : put this in attribute in the context
return houses_file['houses'] return houses_file['houses']
def _get_catalog(self, *args, **kwargs): def _get_catalog(self, *args, **kwargs):

@ -2,13 +2,19 @@ from kedro.pipeline import Pipeline, node, pipeline
from kedro.framework.session import KedroSession from kedro.framework.session import KedroSession
from .nodes import parse_xsl from .nodes import parse_xsl
import logging
logger = logging.getLogger(__name__)
# we need the context here in order to access to prepare_pipeline_creation() # we need the context here in order to access to prepare_pipeline_creation()
with KedroSession.create() as session: with KedroSession.create() as session:
context = session.load_context() context = session.load_context()
# we have to call the catalog attribute, # important: **we have to call** the catalog as an attribute,
# because it makes a call to the _get_catalog() of the context method # because it makes a call to the _get_catalog() of the context method
catalog = context.catalog catalog = context.catalog
logger.info("loading houses")
logger.info("------------------ houses ---------------------")
logger.info(str(context.get_houses()))
def nodes_factory(nodes_description): def nodes_factory(nodes_description):
"nodes creation" "nodes creation"

@ -1,8 +1,9 @@
sphinx-rtd-theme>=1.2.2
myst-parser>=2.0.0
pandas>=2.0.2 pandas>=2.0.2
nbsphinx>=0.9.2 nbsphinx>=0.9.2
lxml>=4.6.3 lxml>=4.6.3
python-slugify>=8.0.1 python-slugify>=8.0.1
sphinx-rtd-theme>=1.2.2
black~=22.0 black~=22.0
flake8>=3.7.9, <5.0 flake8>=3.7.9, <5.0
ipython>=7.31.1, <8.0; python_version < '3.8' ipython>=7.31.1, <8.0; python_version < '3.8'

Loading…
Cancel
Save