Commit 6e88cd6
refactor(waterdata.xarray): move CF vocabulary maps to types
The CF lookup tables (USGS units -> UDUNITS, statistic_id -> cell_methods
operator, parameter_code -> standard_name) are plain reference data, so move
them out of the converter module into types.py as public, extensible
constants (CF_UNIT_MAP, CF_CELL_METHODS, CF_STANDARD_NAMES) alongside the
existing PROFILE_LOOKUP. They carry no xarray dependency, so types.py stays
import-light and the tables can be extended without importing the
xarray-optional converter. xarray.py imports them at the top; behavior is
unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 35f6e02 commit 6e88cd6
2 files changed
Lines changed: 53 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
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 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
106 | 70 | | |
107 | 71 | | |
108 | 72 | | |
| |||
179 | 143 | | |
180 | 144 | | |
181 | 145 | | |
182 | | - | |
| 146 | + | |
183 | 147 | | |
184 | 148 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 149 | + | |
188 | 150 | | |
189 | 151 | | |
190 | 152 | | |
191 | 153 | | |
192 | 154 | | |
193 | 155 | | |
194 | | - | |
| 156 | + | |
195 | 157 | | |
196 | 158 | | |
197 | 159 | | |
| |||
289 | 251 | | |
290 | 252 | | |
291 | 253 | | |
292 | | - | |
| 254 | + | |
293 | 255 | | |
294 | 256 | | |
295 | 257 | | |
| |||
0 commit comments