Files
dataset-uploader/features/upload_datasets/huggingface_checks.feature

45 lines
1.5 KiB
Gherkin

Feature: HuggingFace Existence Checks
As a data engineer
I want to skip datasets that already exist on HuggingFace
So that I avoid redundant uploads
Background:
Given a configured HuggingFace organization
Scenario: Skip dataset that exists on HuggingFace
Given "wordnet" already exists on HuggingFace
When I check if "wordnet" exists on HF
Then the result should be True
And the repo ID should be set
Scenario: Process dataset that does not exist
Given "new-dataset" does not exist on HuggingFace
When I check if "new-dataset" exists on HF
Then the result should be False
And the repo ID should be None
Scenario: Check dataset with -v1 suffix
Given a configured HuggingFace organization
Given "wordnet-v1" exists on HuggingFace
When I check if "wordnet" exists on HF
Then the result should be True
And the repo ID should be "test-organization/wordnet-v1"
Scenario: Handle missing organization configuration
Given no organization is configured
When I check if "wordnet" exists on HF
Then the result should be False
Scenario: Handle authentication errors gracefully
Given HuggingFace authentication fails
When I check if "wordnet" exists on HF
Then the result should be False
Scenario: Skip processing when dataset exists
Given "wordnet" already exists on HuggingFace
And sheets tracking is enabled
When I process "wordnet"
Then processing should be skipped
And the sheet status should remain "DONE"