Skip to content

Commit

Permalink
🐛 📝 Fix wrong documentation building with myst_parser (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Galileo-Galilei committed May 10, 2022
1 parent 5ad1f4e commit e7df3a4
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 28 deletions.
17 changes: 4 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# "nbsphinx",
"sphinx_copybutton",
"sphinx_markdown_tables",
"myst_parser",
]

# enable autosummary plugin (table of contents for modules/classes/class
Expand All @@ -55,19 +56,13 @@
napoleon_include_init_with_doc = True

# enable documentation in markdown
source_suffix = {
".rst": "restructuredtext",
".txt": "markdown",
".md": "markdown",
}
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ["_build"]


# -- Options for HTML output -------------------------------------------------
Expand All @@ -79,13 +74,9 @@
#
html_theme = "sphinx_rtd_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

# useful to create dropdown with the name of the directory as the section name
# see https://stackoverflow.com/questions/36925871/toctree-nested-drop-down:
html_theme_options = {"collapse_navigation": False}


myst_heading_anchors = 5
2 changes: 1 addition & 1 deletion docs/source/03_getting_started/02_first_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ kedro viz

Open your browser at the following adress:

```browser
```{browser}
http://localhost:4141/
```

Expand Down
1 change: 0 additions & 1 deletion docs/source/05_framework_ml/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ Introduction
Why we need a mlops framework for development lifecycle <01_why_framework.md>
The architecture of a machine learning project <02_ml_project_components.md>
An efficient tool for model serving and training / inference synchronization <03_framework_solutions.md>
A step by step example <04_example_project.md>
4 changes: 2 additions & 2 deletions docs/source/05_pipeline_serving/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Introduction
.. toctree::
:maxdepth: 4

Reminder on Mlflow Models <01_mlflow_model.md>
Reminder on Mlflow Models <01_mlflow_models.md>
Log a Pipeline as model with ``KedroPipelineModel`` <02_custom_kedro_pipeline_model.md>
Log a Pipeline as model with the CLI <03_cli_modelify.md>
Automatically log inference pipeline after training <04_hook_pipeline_ml.md>
Deployments patterns for ``KedroPipelineModel`` models <05_deployments_patterns.md>
Deployments patterns for ``KedroPipelineModel`` models <05_deployment_patterns.md>
4 changes: 2 additions & 2 deletions docs/source/07_python_objects/02_Hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This package provides 2 new hooks.
This hook :

1. manages mlflow settings at the beginning and the end of the run (run start / end).
2. log useful informations for reproducibility as ``mlflow tags`` (including kedro ``Journal`` information and the commands used to launch the run).
3. register the pipeline as a valid ``mlflow model`` if [it is a ``PipelineML`` instance](#new-pipeline)
2. log useful informations for reproducibility as ``mlflow tags`` (including kedro ``Journal`` information for old kedro versions and the commands used to launch the run).
3. register the pipeline as a valid ``mlflow model`` if [it is a ``PipelineML`` instance](./03_Pipelines.md)

## ``MlflowNodeHook``

Expand Down
2 changes: 1 addition & 1 deletion docs/source/07_python_objects/04_CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``kedro mlflow init``: this command is needed to initalize your project. You cannot run any other commands before you run this one once. It performs 2 actions:
- creates a ``mlflow.yml`` configuration file in your ``conf/local`` folder
- replace the ``src/PYTHON_PACKAGE/run.py`` file by an updated version of the template. If your template has been modified since project creation, a warning will be raised. You can either run ``kedro mlflow init --force`` to ignore this warning (but this will erase your ``run.py``) or [set hooks manually](#new-hooks).
- replace the ``src/PYTHON_PACKAGE/run.py`` file by an updated version of the template. If your template has been modified since project creation, a warning will be raised. You can either run ``kedro mlflow init --force`` to ignore this warning (but this will erase your ``run.py``) or [set hooks manually](../02_installation/02_setup.md#declaring-kedro-mlflow-hooks).

`init` has two arguments:

Expand Down
2 changes: 0 additions & 2 deletions kedro_mlflow/mlflow/kedro_pipeline_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ def load_context(self, context):
self.loaded_catalog.save(name=name, data=updated_catalog.load(name))

def predict(self, context, model_input):
# TODO : checkout out how to pass extra args in predict
# for instance, to enable parallelization

# we create an empty hook manager but do NOT register hooks
# because we want this model be executable outside of a kedro project
Expand Down
11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ def _parse_requirements(path, encoding="utf-8"):
extras_require={
"doc": [
"sphinx>=4.5.0,<5.0.0",
"sphinx_rtd_theme==1.0.0",
"sphinx-markdown-tables==0.0.15",
"sphinx-click==3.1.0",
"sphinx_copybutton==0.5.0",
"pandas>=1.0.0, <2.0.0", # avoid to make readthedocs load rc version
"numpy>=1.0.0, <2.0.0", # bug on windows for numpy 1.19.0->1.19.4
"sphinx_rtd_theme~=1.0.0",
"sphinx-markdown-tables~=0.0.15",
"sphinx-click~=3.1.0",
"sphinx_copybutton~=0.5.0",
"myst-parser~=0.17.2",
],
"test": [
"pytest>=5.4.0, <8.0.0",
Expand Down

0 comments on commit e7df3a4

Please sign in to comment.