Skip to content

Implement ignore_patterns in uploading (combined)#1130

Merged
stevemessick merged 14 commits into
mainfrom
feature/ignore-patterns-combined
Jul 16, 2026
Merged

Implement ignore_patterns in uploading (combined)#1130
stevemessick merged 14 commits into
mainfrom
feature/ignore-patterns-combined

Conversation

@stevemessick

Copy link
Copy Markdown
Contributor

This PR combines all the work for implementing ignore_patterns in model, dataset, and competition uploading, along with documentation.

It contains changes from the following PRs (kept open for reference):

Key Changes:

  • Core: Define DEFAULT_IGNORE_PATTERNS and should_ignore(). Update DirectoryArchive to filter files/dirs.
  • Models: Integrate ignore_patterns into model uploading API and CLI (--ignore-patterns).
  • Datasets: Integrate ignore_patterns into dataset uploading API and CLI (--ignore-patterns).
  • Competitions: Integrate ignore_patterns into competition data update walk. Bypass defaults if include_hidden is True. Add CLI support.
  • Docs: Document the new option for all commands.

TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322

- Define DEFAULT_IGNORE_PATTERNS.
- Implement should_ignore helper.
- Update DirectoryArchive to support filtering for zip/tar formats.
- Add unit tests for should_ignore and DirectoryArchive.

TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update KaggleApi.upload_files to accept ignore_patterns.
- Update model_instance_create and model_instance_version_create to accept and pass ignore_patterns.
- Add --ignore-patterns CLI argument to model creation commands.
- Add unit tests for model creation with ignore_patterns.

TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update dataset_create_new and dataset_create_version to accept and pass ignore_patterns.
- Add --ignore-patterns CLI argument to datasets create and version commands.

TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
- Update competition_data_update to accept and apply ignore_patterns during directory walk.
- Add --ignore-patterns CLI argument to competitions data update command.

TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
TAG=agy
CONV=2a820637-152b-46a6-9a45-e29918f1e322
@stevemessick

stevemessick commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Let me know if you prefer this single, combined PR or if the separate PRs for each entity (linked above) are easier to work with. I just noticed a lot of duplicated code in the separate PRs so I thought this might be easier. And if you prefer the others, go ahead and review them instead.

http://b/356890055

@rosbo rosbo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature. Thanks for ensuring consistency across resources.

@stevemessick stevemessick merged commit 2856c88 into main Jul 16, 2026
15 checks passed
@stevemessick stevemessick deleted the feature/ignore-patterns-combined branch July 16, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants