Deprecation Cycle for `netcdf4` backend URL behavior

Đang mở
#10,951 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với xarray/backends/netCDF4_.py quanh các dòng 718-731 và xem lại các pull request cùng các cuộc thảo luận issue được liên kết về guess_can_open. Xác định xem dự án muốn thay đổi việc suy đoán trên phạm vi rộng hơn hay một phạm vi netcdf4 hẹp hơn, sau đó xác định cảnh báo deprecation và bản phát hành mục tiêu. Hoàn tất khi trạng thái cuối cùng và chu kỳ deprecation đã được thống nhất và ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs triage
What is your issue?

As discussed in https://github.com/pydata/xarray/pull/10931 and https://github.com/pydata/xarray/pull/10804 the netcdf4 backend currently claims all URLs via it's guess_can_open method.

https://github.com/pydata/xarray/blob/6e82a3afa8e47e7ed59441e77f812ceeaeaf5668/xarray/backends/netCDF4_.py#L718-L731

This is overeager and led to issues such as https://github.com/pydata/xarray/issues/10801. Therefore this behavior needs to be deprecated in favor of either more explicit options https://github.com/pydata/xarray/pull/10931#issuecomment-3560387850 or at a minimum a tighter scope for what URLs the backend claims in it's guess method.

However, some users and workflows currently rely on this behavior, which caused failures: https://github.com/pydata/xarray/pull/10804#discussion_r2542097630

Therefore, any changes will require a long deprecation cycle with a warning emitted when a user relies on the to-be-changed guessing behavior.

Questions

  1. What should the end state be?

Is this a wholesale change of guessing behavior for all backends - potentially removing guessing in favor of always explicit speccificaiton? Or is this a smaller descoping of what URLs the netcdf4 backend claims?

  1. What time frame?

I propose the 2026.01.0 release

Additional reading

The URL-pipeline syntax originally proposed in ZEP8, that now lives here: https://github.com/jbms/url-pipeline#url-pipeline-specification seems as though it would be able to solve the issues here (e.g. specifying if something is a dap url)

Ngôn ngữ chính
Python
Star
4.2k
Fork
1.5k
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
74

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pydata/xarray

Tất cả issue của pydata/xarray

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.