File: use-local-reference-yaml.patch

package info (click to toggle)
dask 2021.01.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,172 kB
  • sloc: python: 74,608; javascript: 186; makefile: 150; sh: 94
file content (131 lines) | stat: -rw-r--r-- 5,019 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Author: Diane Trout <diane@ghic.org>
Description: Use local files for building documentation instead of
 downloading them from github.
Forwarded: no

--- a/docs/source/configuration-reference.rst
+++ b/docs/source/configuration-reference.rst
@@ -12,8 +12,8 @@
 
 .. dask-config-block::
     :location: dask
-    :config: https://raw.githubusercontent.com/dask/dask/master/dask/dask.yaml
-    :schema: https://raw.githubusercontent.com/dask/dask/master/dask/dask-schema.yaml
+    :config: file:///../debian/dask-config-blocks/dask.yaml
+    :schema: file:///../debian/dask-config-blocks/dask-schema.yaml
 
 
 Distributed
@@ -24,16 +24,16 @@
 
 .. dask-config-block::
     :location: distributed.client
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 Comm
 ~~~~
 
 .. dask-config-block::
     :location: distributed.comm
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 Dashboard
@@ -41,8 +41,8 @@
 
 .. dask-config-block::
     :location: distributed.dashboard
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 Deploy
@@ -50,8 +50,8 @@
 
 .. dask-config-block::
     :location: distributed.deploy
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 
@@ -60,8 +60,8 @@
 
 .. dask-config-block::
     :location: distributed.scheduler
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 Worker
@@ -69,8 +69,8 @@
 
 .. dask-config-block::
     :location: distributed.worker
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 Admin
@@ -78,8 +78,8 @@
 
 .. dask-config-block::
     :location: distributed.admin
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 UCX
@@ -87,8 +87,8 @@
 
 .. dask-config-block::
    :location: ucx
-   :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-   :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+   :config: file:///../debian/dask-config-blocks/distributed.yaml
+   :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
 
 
 RMM
@@ -96,5 +96,5 @@
 
 .. dask-config-block::
     :location: rmm
-    :config: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed.yaml
-    :schema: https://raw.githubusercontent.com/dask/distributed/master/distributed/distributed-schema.yaml
+    :config: file:///../debian/dask-config-blocks/distributed.yaml
+    :schema: file:///../debian/dask-config-blocks/distributed-schema.yaml
--- a/docs/source/ext/dask_config_sphinx_ext.py
+++ b/docs/source/ext/dask_config_sphinx_ext.py
@@ -6,8 +6,13 @@
 
 
 def get_remote_yaml(url):
-    r = requests.get(url)
-    return yaml.safe_load(r.text)
+    if url.startswith('file:///'):
+        with open(url[len('file:///'):], 'rt') as instream:
+            text = instream.read()
+    else:
+        r = requests.get(url)
+        text = r.text
+    return yaml.safe_load(text)
 
 
 class DaskConfigDirective(Directive):