Skip to content

Commit

Permalink
Don't handle untested and bugged case for excludes. (#771)
Browse files Browse the repository at this point in the history
At the moment, there's a bug. We should properly test this feature. For
the time being, I remove the condition with the bug.
  • Loading branch information
marcenacp authored Nov 29, 2024
1 parent 0b80f67 commit 4e30d0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def call(self, *paths: Path) -> list[Path]:
filepath = epath.Path(basepath) / file
fullpath = get_fullpath(filepath, path.filepath)
match_includes = match_path(self.node.includes, fullpath)
match_excludes = match_path(self.node.excludes, fullpath)
if match_includes and match_excludes:
if match_includes:
included_files.append(
Path(
filepath=filepath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ class FileSet(Node):
input_types=[SDO.Text],
url=SDO.encodingFormat,
)
# TODO(https://github.com/mlcommons/croissant/issues/772): Support in mlcroissant.
excludes: list[str] | None = mlc_dataclasses.jsonld_field(
cardinality="MANY",
default=None,
description="A glob pattern that specifies the files to exclude.",
description=(
"A glob pattern that specifies the files to exclude. Warning: This feature"
" is not implemented yet in mlcroissant, so this is a no-op."
),
input_types=[SDO.Text],
url=lambda ctx: constants.ML_COMMONS_EXCLUDES(ctx),
)
Expand Down

0 comments on commit 4e30d0d

Please sign in to comment.