Skip to content

Commit f270a53

Browse files
committed
stuff
1 parent 1d89829 commit f270a53

File tree

2 files changed

+58
-9
lines changed

2 files changed

+58
-9
lines changed

all_repos.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,49 @@ jupyter-book/jupyterlab-myst : https://pypi.org/project/jupyterlab-myst
198198
jupyter-book/myst-spec : https://pypi.org/project/myst-spec
199199
jupyter-book/mystmd : https://pypi.org/project/mystmd
200200
jupyter-book/sphinx-ext-mystmd : https://pypi.org/project/sphinx-ext-mystmd
201+
202+
# jupyter widgets
203+
204+
jupyter-widgets/ipydatagrid : https://pypi.org/project/ipydatagrid
205+
jupyter-widgets/ipyleaflet : https://pypi.org/project/ipyleaflet
206+
jupyter-widgets/pythreejs : https://pypi.org/project/pythreejs
207+
jupyter-widgets/traittypes : https://pypi.org/project/traittypes
208+
209+
210+
# jupyterhub
211+
jupyterhub/design :
212+
213+
jupyterhub/alabaster-jupyterhub : https://pypi.org/project/alabaster-jupyterhub
214+
jupyterhub/batchspawner : https://pypi.org/project/batchspawner
215+
jupyterhub/binderhub : https://pypi.org/project/binderhub
216+
jupyterhub/chartpress : https://pypi.org/project/chartpress
217+
jupyterhub/configurable-http-proxy : https://pypi.org/project/configurable-http-proxy
218+
jupyterhub/docker-image-cleaner : https://pypi.org/project/docker-image-cleaner
219+
jupyterhub/dockerspawner : https://pypi.org/project/dockerspawner
220+
jupyterhub/gh-scoped-creds : https://pypi.org/project/gh-scoped-creds
221+
jupyterhub/jupyter-remote-desktop-proxy : https://pypi.org/project/jupyter-remote-desktop-proxy
222+
jupyterhub/jupyter-rsession-proxy : https://pypi.org/project/jupyter-rsession-proxy
223+
jupyterhub/jupyter-server-proxy : https://pypi.org/project/jupyter-server-proxy
224+
jupyterhub/jupyterhub : https://pypi.org/project/jupyterhub
225+
jupyterhub/jupyterhub-idle-culler : https://pypi.org/project/jupyterhub-idle-culler
226+
jupyterhub/jupyterhub-sphinx-theme : https://pypi.org/project/jupyterhub-sphinx-theme
227+
jupyterhub/nbgitpuller : https://pypi.org/project/nbgitpuller
228+
jupyterhub/nbgitpuller-downloader-dropbox : https://pypi.org/project/nbgitpuller-downloader-dropbox
229+
jupyterhub/nbgitpuller-downloader-generic-web : https://pypi.org/project/nbgitpuller-downloader-generic-web
230+
jupyterhub/nbgitpuller-downloader-googledrive : https://pypi.org/project/nbgitpuller-downloader-googledrive
231+
jupyterhub/nullauthenticator : https://pypi.org/project/nullauthenticator
232+
jupyterhub/oauthenticator : https://pypi.org/project/oauthenticator
233+
jupyterhub/pytest-jupyterhub : https://pypi.org/project/pytest-jupyterhub
234+
jupyterhub/simpervisor : https://pypi.org/project/simpervisor
235+
jupyterhub/sudospawner : https://pypi.org/project/sudospawner
236+
jupyterhub/wrapspawner : https://pypi.org/project/wrapspawner
237+
238+
239+
# misc name don't match
240+
jupyter-widgets/jupyterlab-sidecar: https://pypi.org/project/sidecar
241+
jupyter-widgets/midicontrols : https://pypi.org/project/wrapspawner/ipymidicontrols
242+
jupyter-widgets/xeus : https://pypi.org/project/xeus-python
243+
244+
jupyter/declarativewidgets : https://pypi.org/project/jupyter_declarativewidgets/
245+
246+
jupyter/kernel_gateway_bundlers : https://pypi.org/project/jupyter_kernel_gateway_bundlers/

tools/all_repos.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,29 +130,29 @@ async def list_repos_for_org(org):
130130
return reps
131131

132132

133-
async def get_package_maintainers(package: str) -> list[str]:
133+
async def get_package_maintainers(package: str) -> tuple[list[str], bool]:
134134
"""Get the maintainers of a package from PyPI.
135135
136136
The json does not have the right information, so we need to scrape the page.
137137
"""
138138
url = f"https://pypi.org/project/{package}/"
139139
if package in cache:
140140
print("c", end="", flush=True)
141-
return cache[package]
141+
return cache[package], True
142142
response = await asks.get(url)
143143
if response.status_code == 200:
144144
html = response.text
145145
soup = BeautifulSoup(html, "html.parser")
146146
maintainers = soup.find_all("span", class_="sidebar-section__maintainer")
147147
if not maintainers:
148148
print("x", end="", flush=True)
149-
return set(["unknown (blocked by fastly?)"])
149+
return set(["unknown (blocked by fastly?)"]), False
150150
res = set(a.text.strip() for a in maintainers)
151151
cache[package] = res
152152
print(".", end="", flush=True)
153-
return res
153+
return res, True
154154
print("f", end="", flush=True)
155-
return set(["unknown (status code: " + str(response.status_code) + ")"])
155+
return set(["unknown (status code: " + str(response.status_code) + ")"]), False
156156

157157

158158
async def main(config_file: str = "all_repos.txt"):
@@ -188,11 +188,12 @@ async def main(config_file: str = "all_repos.txt"):
188188
async def _loc(targets, package_url):
189189
async with semaphore: # Wait for semaphore to be available
190190
package = package_url.split("/")[-1]
191-
maintainers = await get_package_maintainers(package)
191+
maintainers, is_ok = await get_package_maintainers(package)
192192
targets.append(
193193
(
194194
package_url,
195195
maintainers,
196+
is_ok,
196197
)
197198
)
198199

@@ -204,10 +205,12 @@ async def _loc(targets, package_url):
204205
"TO add to PiPy org – they are listed on the config file, with a "
205206
"corresponding Pypi package, but the package is not part of Pypi org:"
206207
)
207-
for package_url, maintainers in targets:
208-
print(f" [red]{package_url}[/red] maintained by")
208+
for package_url, maintainers, is_ok in targets:
209+
print(f" [yellow]{package_url}[/yellow] maintained by")
209210
for maintainer in maintainers:
210-
print(f" pypi: `@{maintainer}`")
211+
color = "[green]" if is_ok else "[red]"
212+
end = "[/green]" if is_ok else "[/red]"
213+
print(f"{color} pypi: `@{maintainer}` {end}")
211214
print()
212215

213216
missing_from_github_org = set(packages_urls) - set([p for _, p in known_mapping])

0 commit comments

Comments
 (0)