imarina_excel¶
imarina_excel ¶
normalized_dni ¶
Normalizes a DNI/NIE/NIF into a comparable canonical form.
Strips everything but letters and digits, uppercases the result, and drops leading zeros, so equivalent DNIs written with different formatting (dashes, spaces, leading zeros) compare equal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dni | str | The raw DNI/NIE/NIF value. | required |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The normalized value, or |
Source code in source/src/imarina_load_researchers/core/imarina_excel.py
build_upload_excel ¶
build_upload_excel(output_path: Path, imarina_path: Path, a3_path: Path, translation_paths: TranslationDictionaryPaths) -> None
Build the next iMarina upload as an update on top of the previous one.
See _match_last_upload_against_a3's docstring for the exact per-case policy (left ICIQ / changed position) and _find_new_researchers_in_a3 for new hires.
Source code in source/src/imarina_load_researchers/core/imarina_excel.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |