Skip to content
Snippets Groups Projects

Bump Python requirement imageio to 2.37.0

Open Teklia Bot requested to merge bump-imageio into main
Compare and Show latest version
16 files
+ 542
358
Compare changes
  • Side-by-side
  • Inline
Files
16
@@ -5,6 +5,7 @@ Extract dataset from Arkindex using a corpus export.
import argparse
import pathlib
from typing import Union
from uuid import UUID
from dan.datasets.extract.arkindex import run
@@ -12,18 +13,15 @@ from dan.datasets.extract.arkindex import run
MANUAL_SOURCE = "manual"
def validate_uuid(arg_uuid):
try:
return UUID(arg_uuid)
except ValueError:
raise argparse.ArgumentTypeError(f"`{arg_uuid}` is not a valid UUID.")
def parse_worker_version(worker_version_id):
def parse_worker_version(worker_version_id) -> Union[str, bool]:
if worker_version_id == MANUAL_SOURCE:
return False
validate_uuid(worker_version_id)
try:
UUID(worker_version_id)
except ValueError:
raise argparse.ArgumentTypeError(f"`{worker_version_id}` is not a valid UUID.")
return worker_version_id
@@ -79,19 +77,19 @@ def add_extract_parser(subcommands) -> None:
parser.add_argument(
"--train-folder",
type=validate_uuid,
type=UUID,
help="ID of the training folder to extract from Arkindex.",
required=True,
)
parser.add_argument(
"--val-folder",
type=validate_uuid,
type=UUID,
help="ID of the validation folder to extract from Arkindex.",
required=True,
)
parser.add_argument(
"--test-folder",
type=validate_uuid,
type=UUID,
help="ID of the testing folder to extract from Arkindex.",
required=True,
)
@@ -106,8 +104,6 @@ def add_extract_parser(subcommands) -> None:
If several separators follow each other, keep only the first to appear in the list.
Do not give any arguments to keep the whole text.
""",
required=False,
default=list(map(validate_char, ("\n", " "))),
)
parser.add_argument(
"--unknown-token",
Loading