Get the MNE-Python installer package list YAML.
()
| 93 | |
| 94 | @_memory.cache(cache_validation_callback=joblib.expires_after(days=7)) |
| 95 | def _get_installer_packages(): |
| 96 | """Get the MNE-Python installer package list YAML.""" |
| 97 | with urllib.request.urlopen( |
| 98 | "https://raw.githubusercontent.com/mne-tools/mne-installers/main/recipes/mne-python/construct.yaml" |
| 99 | ) as url: |
| 100 | data = url.read().decode("utf-8") |
| 101 | # Parse data for list of names of packages |
| 102 | lines = [line.strip() for line in data.splitlines()] |
| 103 | start_idx = lines.index("# <<< BEGIN RELATED SOFTWARE LIST >>>") + 1 |
| 104 | stop_idx = lines.index("# <<< END RELATED SOFTWARE LIST >>>") |
| 105 | packages = [ |
| 106 | # Lines look like |
| 107 | # - mne-ari =0.0.0 |
| 108 | # or similar. |
| 109 | line.split()[1] |
| 110 | for line in lines[start_idx:stop_idx] |
| 111 | if not line.startswith("#") |
| 112 | ] |
| 113 | return packages |
| 114 | |
| 115 | |
| 116 | @functools.lru_cache |
no test coverage detected