From d12ac07b8085c8a04aff82fcccf73277d4c625d6 Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Wed, 5 Jun 2024 11:56:43 -0700 Subject: [PATCH 1/3] Fix atomic Inspector time zone issue --- src/pyflask/manageNeuroconv/manage_neuroconv.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pyflask/manageNeuroconv/manage_neuroconv.py b/src/pyflask/manageNeuroconv/manage_neuroconv.py index a65185f5c..58c330926 100644 --- a/src/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/src/pyflask/manageNeuroconv/manage_neuroconv.py @@ -662,7 +662,7 @@ def validate_subject_metadata( subject_metadata["date_of_birth"] = datetime.fromisoformat(subject_metadata["date_of_birth"]) if timezone is not None: subject_metadata["date_of_birth"] = subject_metadata["date_of_birth"].replace( - tzinfo=pytz.timezone(timezone) + tzinfo=zoneinfo.ZoneInfo(timezone) ) return run_check_function(check_function, Subject(**subject_metadata)) @@ -672,7 +672,6 @@ def validate_nwbfile_metadata( nwbfile_metadata: dict, check_function_name: str, timezone: Optional[str] = None ): # -> Union[None, InspectorMessage, List[InspectorMessage]]: """Function used to validate NWBFile metadata.""" - import pytz from pynwb.testing.mock.file import mock_NWBFile check_function = get_check_function(check_function_name) @@ -681,7 +680,7 @@ def validate_nwbfile_metadata( nwbfile_metadata["session_start_time"] = datetime.fromisoformat(nwbfile_metadata["session_start_time"]) if timezone is not None: nwbfile_metadata["session_start_time"] = nwbfile_metadata["session_start_time"].replace( - tzinfo=pytz.timezone(timezone) + tzinfo=zoneinfo.ZoneInfo(timezone) ) return run_check_function(check_function, mock_NWBFile(**nwbfile_metadata)) From 37b025e8ea5d9bc0d2dfb91acbf50a4688bd2be9 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:53:55 -0400 Subject: [PATCH 2/3] version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64f15c4ec..b63394d92 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nwb-guide", "productName": "NWB GUIDE", - "version": "0.0.16", + "version": "1.0.0", "description": "NWB GUIDE is a desktop app that provides a no-code user interface for converting neurophysiology data to NWB.", "main": "./build/main/index.js", "engine": { From 247c7423183857ddebc8e17a24ce4cc042167507 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 5 Jun 2024 20:15:33 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/electron/frontend/core/components/DandiResults.js | 2 +- .../components/pages/guided-mode/options/GuidedUpload.js | 2 +- .../frontend/core/components/pages/uploads/UploadsPage.js | 2 +- .../frontend/core/components/pages/uploads/utils.ts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/electron/frontend/core/components/DandiResults.js b/src/electron/frontend/core/components/DandiResults.js index 826cdc610..210757647 100644 --- a/src/electron/frontend/core/components/DandiResults.js +++ b/src/electron/frontend/core/components/DandiResults.js @@ -42,7 +42,7 @@ export class DandiResults extends LitElement { const type = staging ? "staging" : undefined; const api_key = await getAPIKey.call(this, staging); - const dandiset = await get(this.id, { + const dandiset = await get(this.id, { type, token: api_key, }); diff --git a/src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js index fe238c251..50f400bc8 100644 --- a/src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js +++ b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js @@ -182,7 +182,7 @@ export class GuidedUploadPage extends Page { }, onUpdate: () => (this.unsavedUpdates = true), onThrow, - validateOnChange: (...args) => validate.call(this, ...args) + validateOnChange: (...args) => validate.call(this, ...args), })); }) .catch((error) => html`

${error}

`); diff --git a/src/electron/frontend/core/components/pages/uploads/UploadsPage.js b/src/electron/frontend/core/components/pages/uploads/UploadsPage.js index f71fe66ab..4a64867e5 100644 --- a/src/electron/frontend/core/components/pages/uploads/UploadsPage.js +++ b/src/electron/frontend/core/components/pages/uploads/UploadsPage.js @@ -355,7 +355,7 @@ export class UploadsPage extends Page { error.message = "Please select at least one file or folder to upload."; }, - validateOnChange: (...args) => validate.call(this, ...args) + validateOnChange: (...args) => validate.call(this, ...args), })); }) .catch((error) => html`

${error}

`); diff --git a/src/electron/frontend/core/components/pages/uploads/utils.ts b/src/electron/frontend/core/components/pages/uploads/utils.ts index 8d2e3c167..cc5b398c1 100644 --- a/src/electron/frontend/core/components/pages/uploads/utils.ts +++ b/src/electron/frontend/core/components/pages/uploads/utils.ts @@ -46,8 +46,8 @@ function isNumeric(str: string) { const staging = isStaging(value) const type = staging ? "staging" : undefined; const token = await getAPIKey.call(this, staging); - - const dandiset = await get(value, { + + const dandiset = await get(value, { type, token }) @@ -96,7 +96,7 @@ export function awardNumberValidator(awardNumber: string): boolean { export const AWARD_VALIDATION_FAIL_MESSAGE = 'Award number must be properly space-delimited.\n\nExample (exclude quotes):\n"1 R01 CA 123456-01A1"'; -// this: +// this: export async function getAPIKey( // this: Page, staging = false