Skip to content

refactor(hf): use the official hf scheme instead of huggingface#7193

Merged
tisonkun merged 3 commits intoapache:mainfrom
kszucs:huggingface-to-hf
Feb 18, 2026
Merged

refactor(hf): use the official hf scheme instead of huggingface#7193
tisonkun merged 3 commits intoapache:mainfrom
kszucs:huggingface-to-hf

Conversation

@kszucs
Copy link
Member

@kszucs kszucs commented Feb 17, 2026

Which issue does this PR close?

Closes #.

Rationale for this change

The official Hugging Face scheme is hf://. Aligning OpenDAL's naming with the official convention makes the API more intuitive and consistent with the broader Hugging Face ecosystem.

What changes are included in this PR?

  • Renamed all code constructs from Huggingface* to Hf* (e.g. HuggingfaceBuilder -> HfBuilder, HuggingfaceConfig -> HfConfig, etc.)
  • Moved the services/huggingface directory to services/hf and renamed the crate from opendal-service-huggingface to opendal-service-hf
  • Registered both hf:// (primary) and huggingface:// (alias) URI schemes
  • Introduced services-hf feature flag as the primary, with services-huggingface kept as a backward-compatible alias (services-huggingface = ["services-hf"])
  • Updated Python, Java, and Node.js bindings to use the new naming convention
  • Updated CI workflow to use the services-hf feature flag

Are there any user-facing changes?

Yes. The public API types are renamed:

  • Huggingface -> Hf
  • HuggingfaceConfig -> HfConfig
  • Feature flag services-hf is now primary (old services-huggingface still works as alias)
  • Python Scheme.Huggingface -> Scheme.Hf
  • Both hf:// and huggingface:// URI schemes are supported

AI Usage Statement

This PR was authored with the assistance of Claude Code.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Feb 17, 2026
@kszucs kszucs changed the title refactor(hf): use the official hf scheme instead of huggingface refactor(hf): use the official hf scheme instead of huggingface Feb 17, 2026
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! LGTM.

cc @Xuanwo if you'd take a look.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 17, 2026
@kszucs
Copy link
Member Author

kszucs commented Feb 17, 2026

cc @lhoestq

@tisonkun
Copy link
Member

The Go CI failure seems to be unrelated - need to bump toolchain version separately.

@tisonkun
Copy link
Member

@Xuanwo you may track an item to add a changelog entry.

@tisonkun tisonkun merged commit 7f04d92 into apache:main Feb 18, 2026
335 of 337 checks passed
@kszucs
Copy link
Member Author

kszucs commented Feb 18, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants