From ca33d5306b4e44b1ccec03d0d614979995ff95b6 Mon Sep 17 00:00:00 2001 From: "Y.D.X" <73375426+YDX-2147483647@users.noreply.github.com> Date: Sun, 18 Jun 2023 20:42:41 +0800 Subject: [PATCH] Fix typos (#68) --- build.py | 2 +- docs/best_of.generators.base_generator.md | 2 +- docs/best_of.utils.md | 2 +- scripts/best-of-update-utility.ipynb | 20 +++++++++---------- src/best_of/generators/markdown_list.py | 2 +- src/best_of/integrations/cargo_integration.py | 4 ++-- src/best_of/integrations/conda_integration.py | 4 ++-- .../integrations/dockerhub_integration.py | 4 ++-- .../integrations/github_integration.py | 4 ++-- src/best_of/integrations/go_integration.py | 4 ++-- src/best_of/integrations/maven_integration.py | 4 ++-- src/best_of/integrations/npm_integration.py | 4 ++-- src/best_of/integrations/pypi_integration.py | 4 ++-- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/build.py b/build.py index 1361577..c89437d 100644 --- a/build.py +++ b/build.py @@ -60,7 +60,7 @@ def main(args: dict) -> None: # Run pytest in pipenv environment build_utils.run("pipenv run pytest", exit_on_error=True) - # Update pipfile.lock when all tests are successfull (lock environment) + # Update pipfile.lock when all tests are successful (lock environment) build_utils.run("pipenv lock", exit_on_error=True) else: # Run fast tests diff --git a/docs/best_of.generators.base_generator.md b/docs/best_of.generators.base_generator.md index dd3df26..ac3c1c6 100644 --- a/docs/best_of.generators.base_generator.md +++ b/docs/best_of.generators.base_generator.md @@ -51,7 +51,7 @@ Generates the markdown output and writes into files. - `categories` (OrderedDict): Projects categorized into configured categories. - `projects` (list): List of projects. - `config` (Dict): Best-of configuration. - - `labels` (list): List of avaialable labels. + - `labels` (list): List of available labels. diff --git a/docs/best_of.utils.md b/docs/best_of.utils.md index 3d50c79..2e12d28 100644 --- a/docs/best_of.utils.md +++ b/docs/best_of.utils.md @@ -93,7 +93,7 @@ remove_special_chars(text: str) → str ## function `process_description` ```python -process_description(text: str, max_lenght: int) → str +process_description(text: str, max_length: int) → str ``` diff --git a/scripts/best-of-update-utility.ipynb b/scripts/best-of-update-utility.ipynb index b84e7e0..b780ffb 100644 --- a/scripts/best-of-update-utility.ipynb +++ b/scripts/best-of-update-utility.ipynb @@ -336,7 +336,7 @@ "# CHANGE: Select a file via URL, file-path, or provide the string content here:\n", "EXTRACT_FROM_DATA = [\n", " TEXT_DATA,\n", - " # add additiona URLS or files\n", + " # add additional URLS or files\n", "]\n", "\n", "# Run github link extraction on the provided file\n", @@ -406,7 +406,7 @@ "# CHANGE: Select a file via URL, file-path, or provide the string content here:\n", "EXTRACT_FROM_DATA = [\n", " TEXT_DATA,\n", - " # add additiona URLS or files\n", + " # add additional URLS or files\n", "]\n", "\n", "# Extract projects\n", @@ -475,7 +475,7 @@ "# CHANGE: Select a file via URL, file-path, or provide the string content here:\n", "EXTRACT_FROM_DATA = [\n", " TEXT_DATA,\n", - " # add additiona URLS or files\n", + " # add additional URLS or files\n", "]\n", "\n", "# Extract projects\n", @@ -661,7 +661,7 @@ "outputs": [], "source": [ "# Select columns to show\n", - "selected_colum = [\n", + "selected_column = [\n", " \"name\",\n", " \"description\",\n", " \"github_id\",\n", @@ -683,7 +683,7 @@ " )\n", ")\n", "\n", - "selected_colum.extend(package_columns)\n", + "selected_column.extend(package_columns)\n", "\n", "if \"group_id\" not in df_updated_projects:\n", " df_updated_projects[\"group_id\"] = None\n", @@ -744,7 +744,7 @@ "source": [ "# Show updated projects\n", "qgrid_updated_projects = qgrid.show_grid(\n", - " df_updated_projects[selected_colum], show_toolbar=True\n", + " df_updated_projects[selected_column], show_toolbar=True\n", ")\n", "qgrid_updated_projects" ] @@ -792,7 +792,7 @@ "outputs": [], "source": [ "# Select columns to show\n", - "selected_colums = [\n", + "selected_columns = [\n", " \"name\",\n", " \"description\",\n", " \"github_id\",\n", @@ -804,7 +804,7 @@ " \"group_id\",\n", "]\n", "\n", - "selected_colums.extend(package_columns)\n", + "selected_columns.extend(package_columns)\n", "\n", "# Print all available categories\n", "if \"category\" in df_existing_projects:\n", @@ -812,7 +812,7 @@ "\n", "# Show updated projects\n", "qgrid_finalized_projects = qgrid.show_grid(\n", - " df_selected_projects[selected_colums], show_toolbar=True\n", + " df_selected_projects[selected_columns], show_toolbar=True\n", ")\n", "qgrid_finalized_projects" ] @@ -823,7 +823,7 @@ "source": [ "### Export selected projects as YAML\n", "\n", - "Export all select projects (interactivly in qgrid table above) to yaml. This output can be easily added to a best-of `projects.yaml`." + "Export all select projects (interactively in qgrid table above) to yaml. This output can be easily added to a best-of `projects.yaml`." ] }, { diff --git a/src/best_of/generators/markdown_list.py b/src/best_of/generators/markdown_list.py index e64195e..5be04fe 100644 --- a/src/best_of/generators/markdown_list.py +++ b/src/best_of/generators/markdown_list.py @@ -85,7 +85,7 @@ def generate_metrics_info(project: Dict, configuration: Dict) -> str: if metrics_md: # add divider if metrics are available metrics_md = "(" + metrics_md + ")" - # remove unneccesary whitespaces + # remove unnecessary whitespaces utils.clean_whitespaces(metrics_md) # Add whitespace metrics_md = metrics_md + " " diff --git a/src/best_of/integrations/cargo_integration.py b/src/best_of/integrations/cargo_integration.py index 8d54f79..523931a 100644 --- a/src/best_of/integrations/cargo_integration.py +++ b/src/best_of/integrations/cargo_integration.py @@ -115,14 +115,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: cargo_url = project.cargo_url or "" # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [Cargo](" + cargo_url + ")" + metrics_md + seperator + "\n" + details_md = "- [Cargo](" + cargo_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: # TODO: Cargo install only works for binary packages diff --git a/src/best_of/integrations/conda_integration.py b/src/best_of/integrations/conda_integration.py index c6a7271..83473b1 100644 --- a/src/best_of/integrations/conda_integration.py +++ b/src/best_of/integrations/conda_integration.py @@ -81,14 +81,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: conda_package = project.conda_id.split("/")[1] # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [Conda](" + conda_url + ")" + metrics_md + seperator + "\n" + details_md = "- [Conda](" + conda_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += ( diff --git a/src/best_of/integrations/dockerhub_integration.py b/src/best_of/integrations/dockerhub_integration.py index 9c9d5e3..5f62835 100644 --- a/src/best_of/integrations/dockerhub_integration.py +++ b/src/best_of/integrations/dockerhub_integration.py @@ -138,7 +138,7 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: dockerhub_url = project.dockerhub_url # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints @@ -146,7 +146,7 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: ) details_md = ( - "- [Docker Hub](" + dockerhub_url + ")" + metrics_md + seperator + "\n" + "- [Docker Hub](" + dockerhub_url + ")" + metrics_md + separator + "\n" ) if configuration.generate_install_hints: diff --git a/src/best_of/integrations/github_integration.py b/src/best_of/integrations/github_integration.py index 41b025f..911d12d 100644 --- a/src/best_of/integrations/github_integration.py +++ b/src/best_of/integrations/github_integration.py @@ -561,14 +561,14 @@ def generate_github_details(project: Dict, configuration: Dict) -> str: # https://badgen.net/#github # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [GitHub](" + github_url + ")" + metrics_md + seperator + "\n" + details_md = "- [GitHub](" + github_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += "\n\t```\n\tgit clone https://github.com/{github_id}\n\t```\n" diff --git a/src/best_of/integrations/go_integration.py b/src/best_of/integrations/go_integration.py index 93e9d46..a003710 100644 --- a/src/best_of/integrations/go_integration.py +++ b/src/best_of/integrations/go_integration.py @@ -49,14 +49,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: go_url = project.go_url or "" # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [Go](" + go_url + ")" + metrics_md + seperator + "\n" + details_md = "- [Go](" + go_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += "\t```\n\tgo install {go_id}\n\t```\n" diff --git a/src/best_of/integrations/maven_integration.py b/src/best_of/integrations/maven_integration.py index d04041d..720fe66 100644 --- a/src/best_of/integrations/maven_integration.py +++ b/src/best_of/integrations/maven_integration.py @@ -55,14 +55,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: maven_url = project.maven_url # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [Maven](" + maven_url + ")" + metrics_md + seperator + "\n" + details_md = "- [Maven](" + maven_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += "\t```\n\t\n\t\t{maven_group_id}\n\t\t{maven_artifact_id}\n\t\t[VERSION]\n\t\n\t```\n" diff --git a/src/best_of/integrations/npm_integration.py b/src/best_of/integrations/npm_integration.py index 992bcec..98d71b0 100644 --- a/src/best_of/integrations/npm_integration.py +++ b/src/best_of/integrations/npm_integration.py @@ -100,14 +100,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: npm_url = project.npm_url # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [npm](" + npm_url + ")" + metrics_md + seperator + "\n" + details_md = "- [npm](" + npm_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += "\t```\n\tnpm install {npm_id}\n\t```\n" diff --git a/src/best_of/integrations/pypi_integration.py b/src/best_of/integrations/pypi_integration.py index b8990c3..b276d70 100644 --- a/src/best_of/integrations/pypi_integration.py +++ b/src/best_of/integrations/pypi_integration.py @@ -70,14 +70,14 @@ def generate_md_details(self, project: Dict, configuration: Dict) -> str: # https://badgen.net/#pypi # only show : if details are available - seperator = ( + separator = ( "" if not configuration.generate_badges and not configuration.generate_install_hints else ":" ) - details_md = "- [PyPi](" + pypi_url + ")" + metrics_md + seperator + "\n" + details_md = "- [PyPi](" + pypi_url + ")" + metrics_md + separator + "\n" if configuration.generate_install_hints: details_md += "\t```\n\tpip install {pypi_id}\n\t```\n"