Skip to content

Commit

Permalink
Fix numpy 2.0 e2e test fail with lower requirements (#1949)
Browse files Browse the repository at this point in the history
* merge main from remote

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* pin numpy for lower_requirements

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* fix file permissions

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* update release note

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* testing 3.9 e2e test fail

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* pin numpy in requirements

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* pin numpy during e2e test

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* address PR comments1

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* overkill

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

* add sphinx doc build fix

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>

---------

Signed-off-by: ravi-kumar-pilla <ravi_kumar_pilla@mckinsey.com>
  • Loading branch information
ravi-kumar-pilla authored Jun 21, 2024
1 parent 8b8e6b3 commit 3af6144
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 1 addition & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ Please follow the established format:
# Release 9.2.0

## Major features and improvements

- Enable/disable preview for all the datasets when publishing Kedro-Viz from CLI. (#1894)
- Enable/disable preview for all the datasets when publishing Kedro-Viz from UI. (#1895)

## Bug fixes and other changes

## Major features and improvements
- Display published URLs. (#1907)

## Bug fixes and other changes
Expand Down
2 changes: 1 addition & 1 deletion docs/source/publish_and_share_kedro_viz_on_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The process of uploading your site's files will be done through Kedro-Viz.

3. Obtain parameters: In the app registration's overview pane, note down the Application (Client) ID and Directory (Tenant) ID.

4. Add client secret: Create a [client secret](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-a-client-secret)
4. Add client secret: Create a [client secret](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=client-secret#add-credentials)
for the app registration.

5. Assign IAM role: Assign an [Access Control (IAM) role](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=delegate-condition) to the storage account.
Expand Down
14 changes: 14 additions & 0 deletions package/features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ def _create_config_file(context, include_example):
yaml.dump(config, config_file, default_flow_style=False)


def _add_package_pin(requirements_path: str, package_name: str, version: str) -> None:
"""Adds a package pin to the requirements file"""
with open(requirements_path, "r") as req_file:
requirements = req_file.readlines()

requirements.append(f"{package_name}=={version}")

with open(requirements_path, "w") as req_file:
req_file.writelines(requirements)


@given("I have prepared a config file with example code")
def create_config_file_with_example(context):
"""Behave step to create a temporary config file
Expand Down Expand Up @@ -80,6 +91,9 @@ def install_project_requirements(context):
"""Run ``pip install -r requirements.txt``."""
if context.kedro_version != "latest":
requirements_path = str(context.root_project_dir) + "/src/requirements.txt"
# numpy 2.0 breaks with old versions of pandas and this
# could be removed when the lowest version supported is updated
_add_package_pin(requirements_path, "numpy", "1.26.4")
else:
requirements_path = str(context.root_project_dir) + "/requirements.txt"

Expand Down
3 changes: 3 additions & 0 deletions package/features/steps/lower_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ strawberry-graphql==0.192.0
networkx==2.5
orjson==3.9
secure==0.3.0
# numpy 2.0 breaks with old versions of pandas and this
# could be removed when the lowest version supported is updated
numpy==1.26.4

0 comments on commit 3af6144

Please sign in to comment.