From 660ff8e03d0a3fd97ecf95f3515e9ad3e5b1ad54 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Tue, 5 Sep 2023 10:46:10 +0100 Subject: [PATCH 1/9] Bump build version Signed-off-by: Ankita Katiyar --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55711a1186..247d6b6e59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ requires-python = ">=3.7" dependencies = [ "anyconfig>=0.10.0", "attrs>=21.3", - "build>=0.7.0", + "build>=0.7.0,<1.0.0", "cachetools>=4.1", "click>=4.0", "cookiecutter>=2.1.1,<3.0", From 2db8e44405bcba1affb3727efc1f23efb01c60c3 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Tue, 5 Sep 2023 11:27:30 +0100 Subject: [PATCH 2/9] Remove telemetry from test default starter Signed-off-by: Ankita Katiyar --- .../test_starter/{{ cookiecutter.repo_name }}/pyproject.toml | 2 +- .../{{ cookiecutter.repo_name }}/src/requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml index ca5524efc1..fa88ab9f64 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml @@ -1,7 +1,7 @@ [tool.kedro] project_name = "{{ cookiecutter.project_name }}" project_version = "{{ cookiecutter.kedro_version }}" -package_name = "{{ cookiecutter.python_package }}" +kedro_init_version = "{{ cookiecutter.python_package }}" [tool.isort] profile = "black" diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt index 7e6f29ac16..b08d0c9acc 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt @@ -7,7 +7,6 @@ jupyter~=1.0 jupyterlab_server>=2.11.1, <2.16.0 jupyterlab~=3.0, <3.6.0 kedro[pandas.CSVDataSet]=={{ cookiecutter.kedro_version }} -kedro-telemetry~=0.2.0 nbstripout~=0.4 pytest-cov~=3.0 pytest-mock>=1.7.1, <2.0 From dc06dd2c08e7b4e47d4ba7ac2742e67d5f04b9be Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Tue, 5 Sep 2023 11:48:13 +0100 Subject: [PATCH 3/9] Add package_name back Signed-off-by: Ankita Katiyar --- .../test_starter/{{ cookiecutter.repo_name }}/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml index fa88ab9f64..ca5524efc1 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml @@ -1,7 +1,7 @@ [tool.kedro] project_name = "{{ cookiecutter.project_name }}" project_version = "{{ cookiecutter.kedro_version }}" -kedro_init_version = "{{ cookiecutter.python_package }}" +package_name = "{{ cookiecutter.python_package }}" [tool.isort] profile = "black" From 3e5ce7efa630c44922c811c07d763cdc1c814188 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Tue, 5 Sep 2023 13:57:44 +0100 Subject: [PATCH 4/9] Pin build only for 3.7 Signed-off-by: Ankita Katiyar --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 247d6b6e59..2341932bea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,8 @@ requires-python = ">=3.7" dependencies = [ "anyconfig>=0.10.0", "attrs>=21.3", - "build>=0.7.0,<1.0.0", + "build>=0.7.0,<1.0.0; python_version < '3.8'", + "build>=0.7.0; python_version >= '3.8'", "cachetools>=4.1", "click>=4.0", "cookiecutter>=2.1.1,<3.0", From f069dacb4a85e0f1a0ce3247bc3cb5a1cc88d115 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Wed, 6 Sep 2023 12:00:08 +0100 Subject: [PATCH 5/9] Try upgrade pip Signed-off-by: Ankita Katiyar --- .github/workflows/e2e-tests.yml | 1 + .../{{ cookiecutter.repo_name }}/src/requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 911498a102..b35ccad0e7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -39,6 +39,7 @@ jobs: uses: microsoft/setup-msbuild@v1 - name: Install dependencies run: | + pip install --upgrade pip make install-test-requirements make install-pre-commit - name: pip freeze diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt index b08d0c9acc..7e6f29ac16 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt @@ -7,6 +7,7 @@ jupyter~=1.0 jupyterlab_server>=2.11.1, <2.16.0 jupyterlab~=3.0, <3.6.0 kedro[pandas.CSVDataSet]=={{ cookiecutter.kedro_version }} +kedro-telemetry~=0.2.0 nbstripout~=0.4 pytest-cov~=3.0 pytest-mock>=1.7.1, <2.0 From dbcdcbf46cbde64d016dc7e266f8f691367059c6 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Wed, 6 Sep 2023 13:37:25 +0100 Subject: [PATCH 6/9] Add constraint Signed-off-by: Ankita Katiyar --- .github/workflows/e2e-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b35ccad0e7..9b0255f806 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -37,6 +37,11 @@ jobs: - name: Add MSBuild to PATH if: inputs.os == 'windows-latest' uses: microsoft/setup-msbuild@v1 + - name: Temporary - constraint build version + run: | + echo "build>=0.7.0,<1.0.0 ; python_version < '3.8'" > constraints.txt + echo "build>=0.7.0 ; python_version >= '3.8'" >> constraints.txt + export PIP_CONSTRAINT=constraints.txt - name: Install dependencies run: | pip install --upgrade pip From a43e416d4f4cf3993719316fec17f43cd723de23 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Wed, 6 Sep 2023 13:44:47 +0100 Subject: [PATCH 7/9] Update for windows Signed-off-by: Ankita Katiyar --- .github/workflows/e2e-tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9b0255f806..961dc28b56 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -38,10 +38,17 @@ jobs: if: inputs.os == 'windows-latest' uses: microsoft/setup-msbuild@v1 - name: Temporary - constraint build version + if: inputs.os != 'windows-latest' run: | echo "build>=0.7.0,<1.0.0 ; python_version < '3.8'" > constraints.txt echo "build>=0.7.0 ; python_version >= '3.8'" >> constraints.txt export PIP_CONSTRAINT=constraints.txt + - name: Temporary - constraint build version + if: inputs.os == 'windows-latest' + run: | + echo "build>=0.7.0,<1.0.0 ; python_version < '3.8'" > constraints.txt + echo "build>=0.7.0 ; python_version >= '3.8'" >> constraints.txt + set PIP_CONSTRAINT=constraints.txt - name: Install dependencies run: | pip install --upgrade pip From 9966638639c8ee832d2f8e69001adc26c3b5f6bc Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Wed, 6 Sep 2023 14:25:53 +0100 Subject: [PATCH 8/9] Run build-reqs with backtracking resolver Signed-off-by: Ankita Katiyar --- .github/workflows/e2e-tests.yml | 12 ------------ features/build_reqs.feature | 4 ++-- features/package.feature | 2 +- pyproject.toml | 3 +-- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 961dc28b56..b35ccad0e7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -37,18 +37,6 @@ jobs: - name: Add MSBuild to PATH if: inputs.os == 'windows-latest' uses: microsoft/setup-msbuild@v1 - - name: Temporary - constraint build version - if: inputs.os != 'windows-latest' - run: | - echo "build>=0.7.0,<1.0.0 ; python_version < '3.8'" > constraints.txt - echo "build>=0.7.0 ; python_version >= '3.8'" >> constraints.txt - export PIP_CONSTRAINT=constraints.txt - - name: Temporary - constraint build version - if: inputs.os == 'windows-latest' - run: | - echo "build>=0.7.0,<1.0.0 ; python_version < '3.8'" > constraints.txt - echo "build>=0.7.0 ; python_version >= '3.8'" >> constraints.txt - set PIP_CONSTRAINT=constraints.txt - name: Install dependencies run: | pip install --upgrade pip diff --git a/features/build_reqs.feature b/features/build_reqs.feature index 085cab2242..a146396e18 100644 --- a/features/build_reqs.feature +++ b/features/build_reqs.feature @@ -5,9 +5,9 @@ Feature: build-reqs target in new project Given I have prepared a config file And I have run a non-interactive kedro new with starter "default" And I have updated kedro requirements - And I have executed the kedro command "build-reqs" + And I have executed the kedro command "build-reqs '--resolver=backtracking'" When I add scrapy>=1.7.3 to the requirements - And I execute the kedro command "build-reqs" + And I execute the kedro command "build-reqs '--resolver=backtracking'" Then I should get a successful exit code And requirements should be generated And scrapy should be in the requirements diff --git a/features/package.feature b/features/package.feature index 21873e775c..98c8700223 100644 --- a/features/package.feature +++ b/features/package.feature @@ -16,7 +16,7 @@ Feature: Package target in new project @fresh_venv Scenario: Install package after running kedro build-reqs Given I have updated kedro requirements - When I execute the kedro command "build-reqs" + When I execute the kedro command "build-reqs '--resolver=backtracking'" Then I should get a successful exit code When I execute the kedro command "package" Then I should get a successful exit code diff --git a/pyproject.toml b/pyproject.toml index 2341932bea..55711a1186 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,8 +14,7 @@ requires-python = ">=3.7" dependencies = [ "anyconfig>=0.10.0", "attrs>=21.3", - "build>=0.7.0,<1.0.0; python_version < '3.8'", - "build>=0.7.0; python_version >= '3.8'", + "build>=0.7.0", "cachetools>=4.1", "click>=4.0", "cookiecutter>=2.1.1,<3.0", From 8986dc688d5f8dab4000591f4ab409414a3022a7 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Wed, 6 Sep 2023 14:58:35 +0100 Subject: [PATCH 9/9] Run build-reqs with backtracking resolver Signed-off-by: Ankita Katiyar --- features/build_reqs.feature | 4 ++-- features/package.feature | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/build_reqs.feature b/features/build_reqs.feature index a146396e18..05bf551961 100644 --- a/features/build_reqs.feature +++ b/features/build_reqs.feature @@ -5,9 +5,9 @@ Feature: build-reqs target in new project Given I have prepared a config file And I have run a non-interactive kedro new with starter "default" And I have updated kedro requirements - And I have executed the kedro command "build-reqs '--resolver=backtracking'" + And I have executed the kedro command "build-reqs --resolver=backtracking" When I add scrapy>=1.7.3 to the requirements - And I execute the kedro command "build-reqs '--resolver=backtracking'" + And I execute the kedro command "build-reqs --resolver=backtracking" Then I should get a successful exit code And requirements should be generated And scrapy should be in the requirements diff --git a/features/package.feature b/features/package.feature index 98c8700223..663ea87c49 100644 --- a/features/package.feature +++ b/features/package.feature @@ -16,7 +16,7 @@ Feature: Package target in new project @fresh_venv Scenario: Install package after running kedro build-reqs Given I have updated kedro requirements - When I execute the kedro command "build-reqs '--resolver=backtracking'" + When I execute the kedro command "build-reqs --resolver=backtracking" Then I should get a successful exit code When I execute the kedro command "package" Then I should get a successful exit code