Skip to content

Commit

Permalink
Normalize pypi_ids to use dashes (#152)
Browse files Browse the repository at this point in the history
The official package index does it
  • Loading branch information
oprypin authored Nov 9, 2023
1 parent 1f66772 commit c395e00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions check_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def check_install_project(project, install_name, errors=None):
if any(key in project for key in _kind_to_label):
if "pypi_id" in project:
install_name = project["pypi_id"]
if "_" in install_name:
install_name = install_name.replace("_", "-")
errors.append(f"'pypi_id' should be '{install_name}' not '{project['pypi_id']}'")
elif "github_id" in project:
install_name = f"git+https://github.com/{project['github_id']}"
else:
Expand Down
18 changes: 9 additions & 9 deletions projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ projects:
mkdocs_plugin: mkdocs_protobuf
description: Mkdocs plugin to render protobuf messages
github_id: rymurr/mkdocs-protobuf
pypi_id: mkdocs_protobuf
pypi_id: mkdocs-protobuf
labels: [plugin]
license: Apache-2
category: code-exec-templating
Expand Down Expand Up @@ -851,7 +851,7 @@ projects:
- name: Wikilink Plus
markdown_extension: mdx_wikilink_plus
github_id: neurobin/mdx_wikilink_plus
pypi_id: mdx_wikilink_plus
pypi_id: mdx-wikilink-plus
labels: [markdown]
category: links-refs
- name: unused-files
Expand Down Expand Up @@ -906,7 +906,7 @@ projects:
- name: Mdx Truly Sane Lists
markdown_extension: mdx_truly_sane_lists
github_id: radude/mdx_truly_sane_lists
pypi_id: mdx_truly_sane_lists
pypi_id: mdx-truly-sane-lists
labels: [markdown]
category: markdown
- name: Breakless Lists
Expand Down Expand Up @@ -948,7 +948,7 @@ projects:
- name: Markdown Inline Graphviz
markdown_extension: markdown_inline_graphviz
github_id: cesaremorel/markdown-inline-graphviz
pypi_id: markdown_inline_graphviz_extension
pypi_id: markdown-inline-graphviz-extension
labels: [markdown]
category: markdown
- name: markdown-katex
Expand Down Expand Up @@ -990,7 +990,7 @@ projects:
- name: markdown_sub_sup
markdown_extension: markdown_sub_sup
github_id: alberic89/markdown_sub_sup
pypi_id: markdown_sub_sup
pypi_id: markdown-sub-sup
labels: [markdown]
category: markdown
- name: KBD Extension
Expand All @@ -1008,19 +1008,19 @@ projects:
- name: Semantic Data Extension
markdown_extension: mdx_semanticdata
github_id: aleray/mdx_semanticdata
pypi_id: mdx_semanticdata
pypi_id: mdx-semanticdata
labels: [markdown]
category: markdown
- name: Semantic WikiLinks Extension
markdown_extension: mdx_semanticwikilinks
github_id: aleray/mdx_semanticwikilinks
pypi_id: mdx_semanticwikilinks
pypi_id: mdx-semanticwikilinks
labels: [markdown]
category: markdown
- name: Cite Extension
markdown_extension: mdx_cite
github_id: aleray/mdx_cite
pypi_id: mdx_cite
pypi_id: mdx-cite
labels: [markdown]
category: markdown
- name: Markdown Grid Tables
Expand Down Expand Up @@ -1420,7 +1420,7 @@ projects:
- name: Mdx Include
markdown_extension: mdx_include
github_id: neurobin/mdx_include
pypi_id: mdx_include
pypi_id: mdx-include
labels: [markdown]
category: snippets-include
- name: mkdocs-version-annotations
Expand Down

0 comments on commit c395e00

Please sign in to comment.