Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu authored Aug 26, 2023
2 parents ea6a5f2 + b3637fb commit cc38c28
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 92 deletions.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

## Bug fixes and other changes
* Updated `kedro pipeline create` and `kedro catalog create` to use new `/conf` file structure.
* Converted `setup.py` in default template to `pyproject.toml` and moved flake8 configuration
to dedicated file `.flake8`.

## Documentation changes
* Revised the `data` section to restructure beginner and advanced pages about the Data Catalog and datasets.
Expand All @@ -41,6 +43,8 @@
| `AbstractDataset` | `AbstractDataSet` | `kedro.io.core` |
| `AbstractVersionedDataset` | `AbstractVersionedDataSet` | `kedro.io.core` |

* Using the `layer` attribute at the top level is deprecated; it will be removed in Kedro version 0.19.0. Please move `layer` inside the `metadata` -> `kedro-viz` attributes.

# Release 0.18.12

## Major features and improvements
Expand Down
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@
"https://opensource.org/license/apache2-0-php/",
"https://docs.github.com/en/rest/overview/other-authentication-methods#via-username-and-password",
"https://docs.snowflake.com/en/developer-guide/snowpark/reference/python/api/snowflake.snowpark.DataFrameWriter.saveAsTable.html",
"https://www.educative.io/blog/advanced-yaml-syntax-cheatsheet#anchors"
"https://www.educative.io/blog/advanced-yaml-syntax-cheatsheet#anchors",
# temporarily, until the file actually exists in `main`
"https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.flake8",
]

# retry before render a link broken (fix for "too many requests")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/deployment/airflow_astronomer.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ To follow this tutorial, ensure you have the following:
├── plugins
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── .flake8
└── src
```

Expand Down
2 changes: 1 addition & 1 deletion docs/source/development/linting.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ It is a good practice to [split your line when it is too long](https://beta.ruff

#### Configure `flake8`

Store your `flake8` configuration in a file named `setup.cfg` within your project root. The Kedro starters use the [following configuration](https://github.com/kedro-org/kedro-starters/blob/main/pandas-iris/%7B%7B%20cookiecutter.repo_name%20%7D%7D/setup.cfg):
Store your `flake8` configuration in a file named `.flake8` within your project root. The Kedro default project template use the [following configuration](https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.flake8):

```text
[flake8]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/get_started/kedro_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ project-dir # Parent directory of the template
├── notebooks # Project-related Jupyter notebooks (can be used for experimental code before moving the code to src)
├── pyproject.toml # Identifies the project root and contains configuration information
├── README.md # Project README
├── setup.cfg # Configuration options for `pytest` when doing `kedro test` and for the `isort` utility when doing `kedro lint`
├── .flake8 # Configuration options for `flake8` (linting)
└── src # Project source code
```

Expand Down
4 changes: 2 additions & 2 deletions docs/source/kedro_project_setup/starters.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Here is the layout of the project as a Cookiecutter template:
├── docs # Project documentation
├── notebooks # Project related Jupyter notebooks (can be used for experimental code before moving the code to src)
├── README.md # Project README
├── setup.cfg # Configuration options for tools e.g. `pytest` or `black`
├── .flake8 # Configuration options for `flake8` (linting)
└── src # Project source code
└── {{ cookiecutter.python_package }}
├── __init.py__
Expand All @@ -164,7 +164,7 @@ Here is the layout of the project as a Cookiecutter template:
├── __main__.py
└── settings.py
├── requirements.txt
├── setup.py
├── pyproject.toml
└── tests
```

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In order to get the best out of the template:

## How to install dependencies

Declare any dependencies in `src/requirements.txt` for `pip` installation and `src/environment.yml` for `conda` installation.
Declare any dependencies in `src/requirements.txt` for `pip` installation.

To install them, run:

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "{{ cookiecutter.python_package }}"
version = "0.1"
dynamic = ["dependencies"]

[tool.setuptools.packages.find]
exclude = ["tests"]

[project.scripts]
{{ cookiecutter.repo_name }} = "{{ cookiecutter.python_package }}.__main__:main"

[project.optional-dependencies]
docs = [
"docutils<0.18.0",
"sphinx~=3.4.3",
"sphinx_rtd_theme==0.5.1",
"nbsphinx==0.8.1",
"nbstripout~=0.4",
"sphinx-autodoc-typehints==1.11.1",
"sphinx_copybutton==0.3.1",
"ipykernel>=5.3, <7.0",
"Jinja2<3.1.0",
"myst-parser~=0.17.2",
]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}

This file was deleted.

11 changes: 11 additions & 0 deletions kedro/io/data_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,17 @@ class to be loaded is specified with the key ``type`` and their
dataset_patterns[ds_name] = ds_config

else:
# Check if 'layer' attribute is defined at the top level
if "layer" in ds_config:
import warnings

warnings.warn(
"Defining the 'layer' attribute at the top level is deprecated "
"and will be removed in Kedro 0.19.0. Please move 'layer' inside the 'metadata' -> "
"'kedro-viz' attributes. See https://docs.kedro.org/en/latest/visualisation/kedro"
"-viz_visualisation.html#visualise-layers for more information.",
FutureWarning,
)
ds_layer = ds_config.pop("layer", None)
if ds_layer is not None:
layers[ds_layer].add(ds_name)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "{{ cookiecutter.python_package }}"
version = "0.1"
dynamic = ["dependencies"]

[tool.setuptools.packages.find]
exclude = ["tests"]

[project.scripts]
{{ cookiecutter.repo_name }} = "{{ cookiecutter.python_package }}.__main__:main"

[project.optional-dependencies]
docs = [
"docutils<0.18.0",
"sphinx~=3.4.3",
"sphinx_rtd_theme==0.5.1",
"nbsphinx==0.8.1",
"nbstripout~=0.4",
"sphinx-autodoc-typehints==1.11.1",
"sphinx_copybutton==0.3.1",
"ipykernel>=5.3, <7.0",
"Jinja2<3.1.0",
"myst-parser~=0.17.2",
]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
39 changes: 0 additions & 39 deletions kedro/templates/project/{{ cookiecutter.repo_name }}/src/setup.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/framework/cli/micropkg/test_micropkg_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ def test_empty_pipeline_requirements_txt(
def test_complex_requirements(
self, requirement, fake_project_cli, fake_metadata, fake_package_path
):
"""Options that are valid in requirements.txt but cannot be packaged using
setup.py."""
"""Options that are valid in requirements.txt but cannot be packaged in
pyproject.toml."""
self.call_pipeline_create(fake_project_cli, fake_metadata)
pipeline_requirements_txt = (
fake_package_path / "pipelines" / PIPELINE_NAME / "requirements.txt"
Expand Down

0 comments on commit cc38c28

Please sign in to comment.