From 03d4c9b961dd00fc91cf0486248f050e85ec6750 Mon Sep 17 00:00:00 2001 From: Sajid Alam <90610031+SajidAlamQB@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:17:37 +0100 Subject: [PATCH] Add troubleshooting note in `CONTRIBUTING.md` (#2110) * Update CONTRIBUTING.md Signed-off-by: Sajid Alam * add suppressions for too many args Signed-off-by: Sajid Alam * lint Signed-off-by: Sajid Alam * remove useless suppressions Signed-off-by: Sajid Alam * Update apps.py Signed-off-by: Sajid Alam * Update Makefile Signed-off-by: Sajid Alam * fix Signed-off-by: Sajid Alam * Update catalog.py Signed-off-by: Sajid Alam * Update catalog.py Signed-off-by: Sajid Alam * Update catalog.py Signed-off-by: Sajid Alam * revert and change max positional args Signed-off-by: Sajid Alam * disable too-many-positional-arguments Signed-off-by: Sajid Alam * Update Makefile Signed-off-by: Sajid Alam --------- Signed-off-by: Sajid Alam --- CONTRIBUTING.md | 5 +++++ package/.pylintrc | 2 +- package/kedro_viz/api/apps.py | 2 +- package/kedro_viz/data_access/repositories/catalog.py | 3 +-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9886fdf58b..eb3458d2c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -139,6 +139,11 @@ Now you're ready to begin development. Start the development server: npm start ``` +> _*Note*_: If you face any issues running this, we recommend installing Node.js v18: +> +> 1. Delete `package-lock.json` and `node_modules`. +> 2. Run `npm install` to reinstall dependencies. + This will serve the app at [localhost:4141](http://localhost:4141/), and watch files in `/src` for changes. It will also update the `/lib` directory, which contains a Babel-compiled copy of the source. This directory is exported to `npm`, and is used when importing as a React component into another application. It is updated automatically when you save in case you need to test/debug it locally (e.g. with `npm link`). You can also update it manually, by running ```bash diff --git a/package/.pylintrc b/package/.pylintrc index a14d86bd4d..e8ae443c08 100644 --- a/package/.pylintrc +++ b/package/.pylintrc @@ -50,7 +50,7 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=ungrouped-imports,attribute-defined-outside-init,too-many-arguments,duplicate-code,fixme +disable=ungrouped-imports,attribute-defined-outside-init,too-many-arguments,duplicate-code,too-many-positional-arguments,fixme # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option diff --git a/package/kedro_viz/api/apps.py b/package/kedro_viz/api/apps.py index 7200ad4ab7..aef4d44715 100644 --- a/package/kedro_viz/api/apps.py +++ b/package/kedro_viz/api/apps.py @@ -42,7 +42,7 @@ def _create_base_api_app() -> FastAPI: @app.middleware("http") async def set_secure_headers(request, call_next): response = await call_next(request) - secure_headers.framework.fastapi(response) + secure_headers.framework.fastapi(response) # pylint: disable=no-member return response return app diff --git a/package/kedro_viz/data_access/repositories/catalog.py b/package/kedro_viz/data_access/repositories/catalog.py index 50fc5dce04..a7d568ca8a 100644 --- a/package/kedro_viz/data_access/repositories/catalog.py +++ b/package/kedro_viz/data_access/repositories/catalog.py @@ -131,8 +131,7 @@ def get_dataset(self, dataset_name: str) -> Optional["AbstractDataset"]: else: # pragma: no cover dataset_obj = self._catalog._get_dataset(dataset_name) except DatasetNotFoundError: - # pylint: disable=abstract-class-instantiated - dataset_obj = MemoryDataset() # type: ignore[abstract] + dataset_obj = MemoryDataset() # pylint: disable=abstract-class-instantiated return dataset_obj