Skip to content

Commit

Permalink
Change pyproject.toml on Kedro project template to be compatible with…
Browse files Browse the repository at this point in the history
… `uv`, `rye`, `pdm` (#4263)

* Changes to pyproject.toml template

Signed-off-by: Laura Couto <[email protected]>

* add requires-python to pyproject.toml

Signed-off-by: Laura Couto <[email protected]>

* Lint

Signed-off-by: Laura Couto <[email protected]>

* Failing test

Signed-off-by: Laura Couto <[email protected]>

* Change requirements.txt to -e .

Signed-off-by: Laura Couto <[email protected]>

* Revert

Signed-off-by: Laura Couto <[email protected]>

* Changes to pyproject.toml template

Signed-off-by: Laura Couto <[email protected]>

* add requires-python to pyproject.toml

Signed-off-by: Laura Couto <[email protected]>

* Lint

Signed-off-by: Laura Couto <[email protected]>

* Failing test

Signed-off-by: Laura Couto <[email protected]>

* Change requirements.txt to -e .

Signed-off-by: Laura Couto <[email protected]>

* Revert

Signed-off-by: Laura Couto <[email protected]>

* Formatting on cookiecutter placeholders on default template

Signed-off-by: Laura Couto <[email protected]>

* Add change to release notes

Signed-off-by: Laura Couto <[email protected]>

* Elaborate on release notes

Signed-off-by: Laura Couto <[email protected]>

* Update pyproject.toml on test_project

Signed-off-by: Laura Couto <[email protected]>

* Syntax issues

Signed-off-by: Laura Couto <[email protected]>

* Changes to pyproject.toml template

Signed-off-by: Laura Couto <[email protected]>

* add requires-python to pyproject.toml

Signed-off-by: Laura Couto <[email protected]>

* Lint

Signed-off-by: Laura Couto <[email protected]>

* Failing test

Signed-off-by: Laura Couto <[email protected]>

* Change requirements.txt to -e .

Signed-off-by: Laura Couto <[email protected]>

* Revert

Signed-off-by: Laura Couto <[email protected]>

* add requires-python to pyproject.toml

Signed-off-by: Laura Couto <[email protected]>

* Lint

Signed-off-by: Laura Couto <[email protected]>

* Failing test

Signed-off-by: Laura Couto <[email protected]>

* Change requirements.txt to -e .

Signed-off-by: Laura Couto <[email protected]>

* Revert

Signed-off-by: Laura Couto <[email protected]>

* Formatting on cookiecutter placeholders on default template

Signed-off-by: Laura Couto <[email protected]>

* Add change to release notes

Signed-off-by: Laura Couto <[email protected]>

* Elaborate on release notes

Signed-off-by: Laura Couto <[email protected]>

* Update pyproject.toml on test_project

Signed-off-by: Laura Couto <[email protected]>

* Syntax issues

Signed-off-by: Laura Couto <[email protected]>

* Fix accidentally removed line

Signed-off-by: Laura Couto <[email protected]>

* Fix duplicated line

Signed-off-by: Laura Couto <[email protected]>

---------

Signed-off-by: Laura Couto <[email protected]>
  • Loading branch information
lrcouto authored Nov 13, 2024
1 parent 075d59b commit 9464dc7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Major features and improvements
* Implemented dict-like interface for `KedroDataCatalog`.
* Implemented lazy dataset initializing for `KedroDataCatalog`.
* Project dependencies on both the default template and on starter templates are now explicitly declared on the `pyproject.toml` file, allowing Kedro projects to work with project management tools like `uv`, `pdm`, and `rye`.

**Note:** ``KedroDataCatalog`` is an experimental feature and is under active development. Therefore, it is possible we'll introduce breaking changes to this class, so be mindful of that if you decide to use it already. Let us know if you have any feedback about the ``KedroDataCatalog`` or ideas for new features.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
requires-python = ">=3.9"
name = "{{ cookiecutter.python_package }}"
readme = "README.md"
dynamic = ["dependencies", "version"]
dynamic = ["version"]
dependencies = [
"ipython>=8.10",
"jupyterlab>=3.0",
"notebook",
"kedro~={{ cookiecutter.kedro_version }}",
"kedro-datasets[pandas-csvdataset]"
]

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

[project.optional-dependencies]
docs = [
Expand All @@ -30,7 +38,6 @@ dev = [
]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
version = {attr = "{{ cookiecutter.python_package }}.__version__"}

[tool.setuptools.packages.find]
Expand All @@ -41,7 +48,7 @@ namespaces = false
package_name = "{{ cookiecutter.python_package }}"
project_name = "{{ cookiecutter.project_name }}"
kedro_init_version = "{{ cookiecutter.kedro_version }}"
tools = {{ cookiecutter.tools | default('') | string | replace('\"', '\\\"') }}
tools = "{{ cookiecutter.tools | default('') | string | replace('\"', '\\\"') }}"
example_pipeline = "{{ cookiecutter.example_pipeline }}"
source_dir = "src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ipython>=8.10
jupyterlab>=3.0
notebook
kedro~={{ cookiecutter.kedro_version}}
kedro~={{ cookiecutter.kedro_version }}
kedro-datasets[pandas-csvdataset]
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
requires-python = ">=3.9"
name = "{{ cookiecutter.python_package }}"
readme = "README.md"
dynamic = ["dependencies", "version"]
dynamic = ["version"]
dependencies = [
"ipython>=8.10",
"jupyterlab>=3.0",
"notebook",
"kedro~={{ cookiecutter.kedro_version }}"
]

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

[project.entry-points."kedro.hooks"]

Expand All @@ -31,9 +38,7 @@ dev = [
"ruff~=0.1.8"
]


[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
version = {attr = "{{ cookiecutter.python_package }}.__version__"}

[tool.setuptools.packages.find]
Expand All @@ -44,7 +49,7 @@ namespaces = false
package_name = "{{ cookiecutter.python_package }}"
project_name = "{{ cookiecutter.project_name }}"
kedro_init_version = "{{ cookiecutter.kedro_version }}"
tools = {{ cookiecutter.tools | default('') | string | replace('\"', '\\\"') }}
tools = "{{ cookiecutter.tools | default('') | string | replace('\"', '\\\"') }}"
example_pipeline = "{{ cookiecutter.example_pipeline }}"
source_dir = "src"

Expand Down

0 comments on commit 9464dc7

Please sign in to comment.