Cache data are stored in the wrong directory if GMT_DATA_SERVER is set via environmental variable or via "gmt set"
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Tái hiện vấn đề với GMT_DATA_SERVER=static và khi gmt được thiết lập, sử dụng gmt which và gmt get -Dcache với đầu ra chi tiết. Theo dõi cách máy chủ dữ liệu được chọn xác định các đường dẫn tải xuống và bộ nhớ đệm, sau đó xác minh rằng các tệp đã tải xuống và gmt_hash_server.txt được lưu trữ và đọc nhất quán trong thư mục máy chủ static.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When GMT is built with the default GMT_DATA_SERVER settings, the default data server is oceania.
$ gmt --version
6.6.0_6d36f98_2024.04.09
$ gmt --show-dataserver
http://oceania.generic-mapping-tools.org
For testing, we want to use the static data server, so that the GMT tests won't fail due to updates of cache files or remote files. This can be done by either setting the environmental variable GMT_DATA_SERVER or via CLI option --GMT_DATA_SERVER=static, but it doesn't work well.
$ export GMT_DATA_SERVER=static # Set via environmental variable
$ gmt --show-dataserver
http://static.generic-mapping-tools.org # The URL is correct
Now running gmt which to download a remote file. The debug messages are long, but the most important messages are shown below:
$ gmt which -Ga @earth_relief_01d_g -Vd
...
gmtwhich [DEBUG]: Get remote file http://static.generic-mapping-tools.org/server/earth/earth_relief/earth_relief_01d_g.grd and write to /Users/seisman/.gmt/server/earth/earth_relief/earth_relief_01d_g.grd
gmtwhich [DEBUG]: Download http://static.generic-mapping-tools.org/server/earth/earth_relief/earth_relief_01d_g.grd to /Users/seisman/.gmt/server/earth/earth_relief/earth_relief_01d_g.grd
gmtwhich [NOTICE]: Remote data courtesy of GMT data server static [http://static.generic-mapping-tools.org]
...
As you can see, GMT tries to download from the static data server, but save the file into ~/.gmt/server/ rather than ~/.gmt/static/server.
The same thing happens when set GMT_DATA_SERVER configuration:
$ gmt set GMT_DATA_SERVER=static
$ gmt --show-dataserver
http://static.generic-mapping-tools.org
$ gmt which -Ga @earth_relief_01d_g -Vd
$ gmt which -Ga @earth_relief_01d_g -Vd --GMT_DATA_SERVER=static
Similarly,
export GMT_DATA_SERVER=static
$ gmt get -Dcache -V
gmtget [INFORMATION]: Downloading file http://static.generic-mapping-tools.org/gmt_data_server.txt ...
gmtget [INFORMATION]: Downloading file http://static.generic-mapping-tools.org/gmt_hash_server.txt ...
gmtget [ERROR]: Unable to access or read /Users/seisman/.gmt/server/gmt_hash_server.txt
gmt_hash_server.txt is downloaded to ~/.gmt/gmt_hash_server.txt, but GMT tries to read it in ~/.gmt/server/gmt_hash_server.txt.
I think this explains why @joa-quim has trouble using the static server https://github.com/GenericMappingTools/gmt/pull/8425#issuecomment-2040848702.
- Ngôn ngữ chính
- C
- Star
- 997
- Fork
- 420
- Merge trung bình
- 13 giờ 27 phút
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GenericMappingTools/gmt
-
Add support for SCM 9.0.0 to GMTCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
GenericMappingTools/gmt#9316 · 10 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
GenericMappingTools/gmt#5767 · 15 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discussion
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
GenericMappingTools/gmt#9343 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
GenericMappingTools/gmt#9331 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
histogram: the min/max setting in -T is ignored when -R is setCó thể đã có người làm @seisman đã nhận 1 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
GenericMappingTools/gmt#9330 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của GenericMappingTools/gmt
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
espressif/esp-iot-solution#856 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in reference manualCó thể đã có người làm @farisbasha đã nhận 15 ngày trước. Đang mởcore:meson
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mpv-player/mpv#18934 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100