From 9caf6a81b988bd9ab9ce878a2cd5ebf90d9b9528 Mon Sep 17 00:00:00 2001 From: Van Go <35277477+van-go@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:45:03 -0500 Subject: [PATCH 1/2] Task/wp 209 fix deprecated warnings (part II) (#852) * urls and gettext_lazy * server-side linting fix * task/wp-171-fix-deprecated-django-warnings * task/wp-209-fix-deprecated-warnings * removed commented out code * Update signals.py * Update pytest.ini --------- Co-authored-by: Shayan Khan Co-authored-by: Chandra Y --- server/portal/apps/signals/signals.py | 3 +-- server/pytest.ini | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/server/portal/apps/signals/signals.py b/server/portal/apps/signals/signals.py index 5b605e70f..0993e637f 100644 --- a/server/portal/apps/signals/signals.py +++ b/server/portal/apps/signals/signals.py @@ -1,4 +1,3 @@ from django.dispatch import Signal -# Generic event signal. Not in use as of 6.29.20 -portal_event = Signal(providing_args=['event_type', 'event_data', 'event_users']) +portal_event = Signal() diff --git a/server/pytest.ini b/server/pytest.ini index 7f9c0a6d5..2e8f63f32 100644 --- a/server/pytest.ini +++ b/server/pytest.ini @@ -1,3 +1,17 @@ [pytest] DJANGO_SETTINGS_MODULE = portal.settings.unit_test_settings python_files = tests.py *unit_test.py + +filterwarnings = + ignore::DeprecationWarning:django.*: + ignore::DeprecationWarning:openapi_schema_validator.*: + ignore::DeprecationWarning:openapi_spec_validator.*: + ignore::DeprecationWarning:openapi_core.*: + ignore::DeprecationWarning:kombu.*: + ignore::DeprecationWarning:pkg_resources.*: + ignore:.*Django now detects this configuration.*:django.utils.deprecation.RemovedInDjango41Warning + +markers = + asyncio: mark a test as asyncio. + +# refer to WP-271 for follow up on Deprecation Warnings From 9b5358917d7e9894d31e030274009dba98bd4136 Mon Sep 17 00:00:00 2001 From: Shayan Khan Date: Fri, 29 Sep 2023 12:14:46 -0500 Subject: [PATCH 2/2] fixed bug for move and rename file operations in root of a system (#862) Co-authored-by: Sal Tijerina --- .../DataFiles/DataFilesModals/DataFilesMoveModal.jsx | 7 ++----- client/src/redux/sagas/datafiles.sagas.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/components/DataFiles/DataFilesModals/DataFilesMoveModal.jsx b/client/src/components/DataFiles/DataFilesModals/DataFilesMoveModal.jsx index 0f079795a..1faa2995e 100644 --- a/client/src/components/DataFiles/DataFilesModals/DataFilesMoveModal.jsx +++ b/client/src/components/DataFiles/DataFilesModals/DataFilesMoveModal.jsx @@ -50,10 +50,7 @@ const DataFilesMoveModal = React.memo(() => { const onOpened = () => { fetchListing({ - api: 'tapis', - scheme: 'private', - system: selectedSystem.system, - path: `${selectedSystem.homeDir || ''}`, + ...params, }); }; @@ -68,7 +65,7 @@ const DataFilesMoveModal = React.memo(() => { setDisabled(true); move({ destSystem: system, - destPath: path, + destPath: path || '/', callback: reloadPage, }); }, diff --git a/client/src/redux/sagas/datafiles.sagas.js b/client/src/redux/sagas/datafiles.sagas.js index 730a63c44..2ef66a565 100644 --- a/client/src/redux/sagas/datafiles.sagas.js +++ b/client/src/redux/sagas/datafiles.sagas.js @@ -254,7 +254,7 @@ export function* renameFile(action) { action.payload.api, action.payload.scheme, file.system, - file.path, + '/' + file.path, action.payload.newName ); yield put({