Skip to content

Commit

Permalink
Release 0.16.1 (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzjp2 committed May 21, 2020
2 parents c19ca9e + aee80eb commit d291a21
Show file tree
Hide file tree
Showing 25 changed files with 52 additions and 32 deletions.
13 changes: 13 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 0.16.1

## Major features and improvements

## Bug fixes and other changes
* Fixed deprecation warnings from `kedro.cli` and `kedro.context` when running `kedro jupyter notebook`
* Fixed a bug where `catalog` and `context` were not available in Jupyter Lab and Notebook.
* Fixed a bug where `kedro build-reqs` would fail if you didn't have your project dependencies installed.

## Breaking changes to the API

## Thanks for supporting contributions

# 0.16.0

## Major features and improvements
Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/01_setting_up_vscode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Setting up Visual Studio Code

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
Start by opening a new project directory in VS Code and installing the Python plugin under **Tools and languages**:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/02_setting_up_pycharm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Setting up PyCharm

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
This section will present a quick guide on how to configure [PyCharm](https://www.jetbrains.com/pycharm/) as a development environment for working on Kedro projects.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/03_configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
>
> This section contains detailed information about configuration.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/04_data_catalog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Data Catalog

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
This section introduces `catalog.yml`, the project-shareable Data Catalog. The file is located in `conf/base` and is a registry of all data sources available for use by a project; it manages loading and saving of data.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/05_nodes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nodes

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
>
> In this section we introduce the concept of a node.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/04_user_guide/06_pipelines.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pipelines

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
>
> In this section we introduce the concept of a pipeline.
Expand Down Expand Up @@ -152,7 +152,7 @@ Modular pipelines serve the following main purposes:

### How do I create modular pipelines?

For projects created using Kedro version 0.16.0 or later, Kedro ships a [project-specific CLI command](./10_developing_plugins.md#global-and-project-commands) `kedro pipeline create <pipeline_name>`, which does the following for you:
For projects created using Kedro version 0.16.1 or later, Kedro ships a [project-specific CLI command](./10_developing_plugins.md#global-and-project-commands) `kedro pipeline create <pipeline_name>`, which does the following for you:
1. Adds a new modular pipeline in a `src/<python_package>/pipelines/<pipeline_name>/` directory
2. Creates boilerplate configuration files, `catalog.yml` and `parameters.yml`, in `conf/<env>/pipelines/<pipeline_name>/`, where `<env>` defaults to `base`
3. Makes a placeholder for the pipeline unit tests in `src/tests/pipelines/<pipeline_name>/`
Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/07_logging.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Logging

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
Kedro uses, and facilitates the use of Python’s `logging` library, by providing a default logging configuration. This can be found in `conf/base/logging.yml` in every project generated using Kedro’s CLI `kedro new` command.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/08_advanced_io.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Advanced IO

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
In this tutorial, you will learn about advanced uses of the [Kedro IO](/kedro.io.rst) module and understand the underlying implementation.

Expand Down
4 changes: 2 additions & 2 deletions docs/source/04_user_guide/09_pyspark.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Working with PySpark

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
In this tutorial we explain how to work with `PySpark` in a Kedro pipeline.

Expand Down Expand Up @@ -54,7 +54,7 @@ class ProjectContext(KedroContext):
_spark_session.sparkContext.setLogLevel("WARN")

project_name = "kedro"
project_version = "0.16.0"
project_version = "0.16.1"


# ...
Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/10_developing_plugins.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Developing Kedro plugins

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
The functionality of Kedro can be extended using its `plugin` framework, which is designed to reduce the complexity involved in creating new features for Kedro while allowing you to inject additional commands into the CLI. Plugins are developed as separate Python packages that exist outside of any Kedro project.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/11_ipython.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Working with IPython and Jupyter Notebooks / Lab

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
This section follows the ["Hello World" example](../02_getting_started/04_hello_world.md) and demonstrates how to effectively use IPython and Jupyter Notebooks / Lab.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/04_user_guide/12_working_with_databricks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Working with Databricks

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
## Databricks Connect (recommended)
We recommend using [Databricks Connect](https://pypi.org/project/databricks-connect/) to easily execute your Kedro pipeline on a Databricks cluster.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/04_user_guide/13_journal.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Journal

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
## Overview
Journal in Kedro allows you to save the history of pipeline. This functionality helps you reproduce results and gives you an ability to investigate failures in your workflow.
Expand All @@ -16,7 +16,7 @@ A context journal record captures all the necessary information to reproduce the
"run_id": "2019-10-01T09.15.57.289Z",
"project_path": "<path-to-project>/src/kedro-tutorial",
"env": "local",
"kedro_version": "0.16.0",
"kedro_version": "0.16.1",
"tags": [],
"from_nodes": [],
"to_nodes": [],
Expand Down
4 changes: 2 additions & 2 deletions docs/source/04_user_guide/15_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ from your_project.hooks import TransformerHooks

class ProjectContext(KedroContext):
project_name = "kedro-tutorial"
project_version = "0.16.0"
project_version = "0.16.1"

hooks = [
hooks = (
# register the collection of your Hook implementations here.
# Note that we are using an instance here, not a class. It could also be a module.
TransformerHooks(),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/06_resources/01_faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frequently asked questions

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
## What is Kedro?

Expand Down
2 changes: 1 addition & 1 deletion docs/source/06_resources/02_architecture_overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kedro architecture overview

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
Here is a diagram showing high-level architecture of Kedro library:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/06_resources/03_commands_reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Guide to CLI commands

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
The `kedro` command line interface (CLI) helps with reproducibility in projects by allowing you to associate a set of commands and dependencies with a target and then execute them from the command line when inside a Kedro project directory. All project related CLI commands should be run from the project’s root directory.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/06_resources/04_lint.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linting your Kedro project

> *Note:* This documentation is based on `Kedro 0.16.0`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* This documentation is based on `Kedro 0.16.1`, if you spot anything that is incorrect then please create an [issue](https://github.com/quantumblacklabs/kedro/issues) or pull request.
> *Note:* The following suggestions would require installing the `pylint` package, subject to GPL licence.
Expand Down
4 changes: 2 additions & 2 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

def before_all(context):
"""Environment preparation before other cli tests are run.
Installs kedro by running pip in the top level directory.
Installs (core) kedro by running pip in the top level directory.
"""

def call(cmd):
Expand Down Expand Up @@ -98,7 +98,7 @@ def call(cmd):
]
)
call([context.pip, "install", "--upgrade", "setuptools"])
call([context.pip, "install", ".[all]"])
call([context.pip, "install", "."])


def after_all(context):
Expand Down
2 changes: 1 addition & 1 deletion kedro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
configuration and pipeline assembly.
"""

__version__ = "0.16.0"
__version__ = "0.16.1"


import logging
Expand Down
10 changes: 8 additions & 2 deletions kedro/framework/cli/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def get_kernel_spec(self, kernel_name):
return kernelspec


def _update_ipython_dir(project_path: Path) -> None:
os.environ["IPYTHONDIR"] = str(project_path / ".ipython")


@click.group()
def jupyter():
"""Open Jupyter Notebook / Lab with project specific variables loaded, or
Expand All @@ -126,6 +130,7 @@ def jupyter_notebook(ip_address, all_kernels, env, idle_timeout, args):
if "-h" not in args and "--help" not in args:
ipython_message(all_kernels)

_update_ipython_dir(context.project_path)
arguments = _build_jupyter_command(
"notebook",
ip_address=ip_address,
Expand All @@ -152,6 +157,7 @@ def jupyter_lab(ip_address, all_kernels, env, idle_timeout, args):
if "-h" not in args and "--help" not in args:
ipython_message(all_kernels)

_update_ipython_dir(context.project_path)
arguments = _build_jupyter_command(
"lab",
ip_address=ip_address,
Expand Down Expand Up @@ -187,7 +193,7 @@ def convert_notebook(all_flag, overwrite_flag, filepath, env):
"""
context = _load_project_context(env=env)
project_path = context.project_path
os.environ["IPYTHONDIR"] = str(project_path / ".ipython")
_update_ipython_dir(project_path)

source_path = get_source_dir(project_path)

Expand Down Expand Up @@ -254,7 +260,7 @@ def _build_jupyter_command( # pylint: disable=too-many-arguments

cmd += [
"--NotebookApp.kernel_spec_manager_class="
"kedro.cli.jupyter.SingleKernelSpecManager",
"kedro.framework.cli.jupyter.SingleKernelSpecManager",
f"--KernelSpecManager.default_kernel_name='{kernel_name}'",
]

Expand Down
6 changes: 4 additions & 2 deletions kedro/framework/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ def build_docs(open_docs):
@project_group.command("build-reqs")
def build_reqs():
"""Build the project dependency requirements."""
context = _load_project_context()
source_path = get_source_dir(context.project_path)
# we cannot use `context.project_path` as in other commands since
# context instantiation might break due to missing dependencies
# we attempt to install here
source_path = get_source_dir(Path.cwd())
requirements_path = source_path / "requirements.in"
if not requirements_path.is_file():
secho("No requirements.in found. Copying contents from requirements.txt...")
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/cli/test_jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def default_jupyter_options(command, address="127.0.0.1", all_kernels=False):
if not all_kernels:
cmd += [
"--NotebookApp.kernel_spec_manager_class="
"kedro.cli.jupyter.SingleKernelSpecManager",
"kedro.framework.cli.jupyter.SingleKernelSpecManager",
"--KernelSpecManager.default_kernel_name='DummyProject'",
]

Expand Down
3 changes: 1 addition & 2 deletions tests/framework/cli/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ def test_requirements_file_doesnt_exist(
self, python_call_mock, fake_kedro_cli, mocker, fake_repo_path
):
# File does not exist:
# 'is_file' is called multiple times in different places
mocker.patch.object(Path, "is_file", side_effect=[True, True, False])
mocker.patch.object(Path, "is_file", return_value=False)
mocker.patch.object(Path, "read_text", return_value="fake requirements")
fake_writer = mocker.patch.object(Path, "write_text")

Expand Down

0 comments on commit d291a21

Please sign in to comment.