Skip to content

Commit

Permalink
fix(PythonBindgen): Add missing os import for dispatch package
Browse files Browse the repository at this point in the history
For `os.PathLike` type annotations.
  • Loading branch information
thewtex committed May 20, 2023
1 parent fc6a6e3 commit a2e4f2b
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 35 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"build:bindgen:typescript:compress-stringify": "./src/itk-wasm-cli.js -s packages/compress-stringify -b emscripten-build bindgen --package-version 0.4.5 --package-name @itk-wasm/compress-stringify --package-description \"Zstandard compression and decompression and base64 encoding and decoding in WebAssembly.\" --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:bindgen:python:compress-stringify": "./src/itk-wasm-cli.js -s packages/compress-stringify -b wasi-build bindgen --language python --package-name itkwasm-compress-stringify --package-description \"Zstandard compression and decompression and base64 encoding and decoding in WebAssembly.\" --package-version 0.4.5 --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:emscripten:dicom": "node ./src/itk-wasm-cli.js -s packages/dicom -b emscripten-build build ",
"build:bindgen:typescript:dicom": "./src/itk-wasm-cli.js -s packages/dicom -b emscripten-build bindgen --package-version 2.0.2 --package-name @itk-wasm/dicom --package-description \"Read files and images related to DICOM file format.\" --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:bindgen:python:dicom": "./src/itk-wasm-cli.js -s packages/dicom -b wasi-build bindgen --package-version 2.0.2 --language python --package-name itkwasm-dicom --package-description \"Read files and images related to DICOM file format.\" --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:bindgen:typescript:dicom": "./src/itk-wasm-cli.js -s packages/dicom -b emscripten-build bindgen --package-version 2.0.3 --package-name @itk-wasm/dicom --package-description \"Read files and images related to DICOM file format.\" --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:bindgen:python:dicom": "./src/itk-wasm-cli.js -s packages/dicom -b wasi-build bindgen --package-version 2.0.3 --language python --package-name itkwasm-dicom --package-description \"Read files and images related to DICOM file format.\" --repository 'https://github.com/InsightSoftwareConsortium/itk-wasm'",
"build:emscripten:packages": "npm run build:emscripten:compress-stringify && npm run build:bindgen:typescript:compress-stringify && npm run build:emscripten:dicom && npm run build:bindgen:typescript:dicom",
"build:wasi": "node ./src/build-wasi.js && npm run build:wasi:packages",
"build:wasi:compress-stringify": "node ./src/itk-wasm-cli.js -i itkwasm/wasi:latest -s packages/compress-stringify -b wasi-build build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.2"
__version__ = "2.0.3"
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,13 @@ async def structured_report_to_html_async(
:param unknown_relationship: accept unknown/missing relationship type
:type unknown_relationship: bool
:param invalid_item_value: accept invalid content item value
(e.g. violation of VR or VM definition)
:param invalid_item_value: accept invalid content item value (e.g. violation of VR or VM definition)
:type invalid_item_value: bool
:param ignore_constraints: ignore relationship content constraints
:type ignore_constraints: bool
:param ignore_item_errors: do not abort on content item errors, just warn
(e.g. missing value type specific attributes)
:param ignore_item_errors: do not abort on content item errors, just warn (e.g. missing value type specific attributes)
:type ignore_item_errors: bool
:param skip_invalid_items: skip invalid content items (incl. sub-tree)
Expand All @@ -116,12 +114,10 @@ async def structured_report_to_html_async(
:param charset_assume: [c]harset: string, assume charset c if no extended charset declared
:type charset_assume: str
:param charset_check_all: check all data elements with string values
(default: only PN, LO, LT, SH, ST, UC and UT)
:param charset_check_all: check all data elements with string values (default: only PN, LO, LT, SH, ST, UC and UT)
:type charset_check_all: bool
:param convert_to_utf8: convert all element values that are affected
by Specific Character Set (0008,0005) to UTF-8
:param convert_to_utf8: convert all element values that are affected by Specific Character Set (0008,0005) to UTF-8
:type convert_to_utf8: bool
:param url_prefix: URL: string. Append specificed URL prefix to hyperlinks of referenced composite objects in the document.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.2"
__version__ = "2.0.3"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down Expand Up @@ -91,15 +91,13 @@ def structured_report_to_html(
:param unknown_relationship: accept unknown/missing relationship type
:type unknown_relationship: bool
:param invalid_item_value: accept invalid content item value
(e.g. violation of VR or VM definition)
:param invalid_item_value: accept invalid content item value (e.g. violation of VR or VM definition)
:type invalid_item_value: bool
:param ignore_constraints: ignore relationship content constraints
:type ignore_constraints: bool
:param ignore_item_errors: do not abort on content item errors, just warn
(e.g. missing value type specific attributes)
:param ignore_item_errors: do not abort on content item errors, just warn (e.g. missing value type specific attributes)
:type ignore_item_errors: bool
:param skip_invalid_items: skip invalid content items (incl. sub-tree)
Expand All @@ -114,12 +112,10 @@ def structured_report_to_html(
:param charset_assume: [c]harset: string, assume charset c if no extended charset declared
:type charset_assume: str
:param charset_check_all: check all data elements with string values
(default: only PN, LO, LT, SH, ST, UC and UT)
:param charset_check_all: check all data elements with string values (default: only PN, LO, LT, SH, ST, UC and UT)
:type charset_check_all: bool
:param convert_to_utf8: convert all element values that are affected
by Specific Character Set (0008,0005) to UTF-8
:param convert_to_utf8: convert all element values that are affected by Specific Character Set (0008,0005) to UTF-8
:type convert_to_utf8: bool
:param url_prefix: URL: string. Append specificed URL prefix to hyperlinks of referenced composite objects in the document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.2"
__version__ = "2.0.3"
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
2 changes: 1 addition & 1 deletion packages/dicom/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itk-wasm/dicom",
"version": "2.0.2",
"version": "2.0.3",
"description": "Read files and images related to DICOM file format.",
"type": "module",
"module": "./dist/bundles/dicom.js",
Expand Down
3 changes: 2 additions & 1 deletion src/bindgen/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ function dispatchFunctionModule(interfaceJson, pypackage, modulePath) {
const functionName = snakeCase(interfaceJson.name)
let moduleContent = `# Generated file. Do not edit.
from typing import Optional
import os
from typing import Dict, Tuple, Optional
from itkwasm import (
environment_dispatch,`
Expand Down

0 comments on commit a2e4f2b

Please sign in to comment.