Package: best-of
Best-of Generator🏆  Generates a ranked markdown list of awesome libraries and tools.Getting Started•Documentation•Support•Report a Bug•Contribution•ChangelogThe best-of-generator is a CLI tool to generate a markdown page of ranked open-source projects based on a list of projects defined in ayamlfile. It is integrated with different package managers - such as PyPI, NPM, Conda, and Docker Hub - to automatically collect a variety of project metadata and calculate project-quality scores. It also comes with a GitHub Action workflow for a fully automized update process.🧙‍♂️ Create your own best-of list in just 3 minutes withthis guide.Highlights📇  Generates a beautiful markdown page from ayamllist.🔌  Integrates various package managers (npm, pypi, conda ...).🥇  Calculates a project-quality score based on a variety of metrics.📈  Identifies trending projects based on collected metrics.🔄  GitHub Action workflow for automated weekly updates.Getting Started🧙‍♂️ If you want to create your own best-of list, we strongly recommend to followthis guideinstead of setting up best-of manually. With the guide, it will only take about 3 minutes to get you started. It is already set-up to automatically run the best-of generator via our GitHub Action and includes other useful template files. Installing the best-of CLI tool is not required.Install best-of generator via pip:pipinstallbest-ofCreate aprojects.yamlfile based on thedocumented structure. This file should contain at least one project. For example:projects:-name:"best-of-ml-python"github_id:"ml-tooling/best-of-ml-python"Run best-of generator via command-line:best-ofgenerate-g<GITHUB_API_TOKEN>./projects.yamlYou can find further information on how to configure theprojects.yamlfile and additional features in thedocumentation sectionbelow.Support & FeedbackThis project is maintained byBenjamin Räthlein,Lukas Masuch,Jan Kalkan, andJohannes Rieke. Please understand that we won't be able to provide individual support via email. We also believe that help is much more valuable if it's shared publicly so that more people can benefit from it.TypeChannel🚨Bug Reports🎁Feature Requests👩‍💻Usage Questions📢Announcements❓Other RequestsDocumentationYAML Structure•Projects•Categories•Labels•Configuration•Project Quality Score•Trending Projects•CLI•GitHub Action•Python APIThe best-of generator is a CLI tool to generate a markdown page from a list of projects configured in ayamlfile. The documentation sections below will provide information on theprojects.yamlstructure, on its different sections (projects,labels,categories&configuration), on some of the best-of features (e.g.project-quality score&trending projects), and instructions on how to run the markdown generationvia the command-line interfaceorvia GitHub Actions.projects.yamlStructureTheprojects.yamlfile has the following structure:configurations(optional): Can be used to overwrite the default configuration of the best-of list. More information in theconfiguration section.categories(required): All used categories should be listed here with at least a descriptive title. More information in thecategories section.labels(optional): Used labels can be added here to extend the label with additional aspects (e.g. URL, image, description). More information in thelabels section.projects(required): All projects that are supposed to be shown in the generated markdown page should be listed here. More information in theprojects section.The followingyamlshows a small example:# Optional: change the default configurationconfiguration:markdown_header_file:"config/header.md"markdown_footer_file:"config/footer.md"# Optional: add categoriescategories:-category:"data-engineering"title:"MachineLearning&DataEngineering"subtitle:"Best-oflistsaboutmachinelearning,dataengieering,datascience,orothertopicsrelatedtobigdata."# Optional: add labelslabels:-label:"python"image:"https://www.python.org/static/favicon.ico"description:"Best-oflistwithPythonprojects"# Required: list of all projectsprojects:-name:"best-of-ml-python"github_id:"ml-tooling/best-of-ml-python"labels:["python"]category:"data-engineering"ProjectsA project is the main component of a best-of list. In most cases, a project is hosted on GitHub and released on different package managers. Such a project should be added with thegithub_idand the IDs of all the package managers it is released to. However, it is also possible to add projects which are not hosted on GitHub or released on a package manager, as shown in the example below.Project Examplesprojects:# Projects with different package managers:-name:"Tensorflow"github_id:"tensorflow/tensorflow"pypi_id:"tensorflow"conda_id:"conda-forge/tensorflow"dockerhub_id:"tensorflow/tensorflow"-name:"Best-ofGenerator"pypi_id:"best-of"github_id:"best-of-lists/best-of-generator"# Link to another project collection:-name:"Best-ofOverview"homepage:"https://best-of.org"resource:True# Project that is not on GitHub:-name:"Quart"pypi_id:"quart"homepage:"https://gitlab.com/pgjones/quart"description:"QuartisaPythonASGIwebmicroframeworkwiththesameAPIasFlask."license:"MIT"star_count:772show:TrueThe example above will be rendered as shown below:Every project can also be expanded to show additional project information (by clicking on the project), for example:Project PropertiesPropertyDescriptionnameName of the project. This name is required to be unique on the best-of list.Optional Properties:github_idGitHub ID of the project based on user or organization  and the repository name, e.g.best-of-lists/best-of-generator. If the project is hosted on GitLab, please use thegitlab_idproperty.categoryCategory that this project is most related to. You can find all available category IDs in theprojects.yamlfile. The project will be sorted into theOtherscategory if no category is provided.labelsList of labels that this project is related to. You can find all available label IDs in the projects.yaml file.licenseLicense of the project. If set, license information from GitHub or package managers will be overwritten. Can be a custom URL pointing to more information in case it is not a standard license. `allowed_licenses` must be set to "all" or contain the URL in order to show the project.descriptionShort description of the project. If set, the description from GitHub or package managers will be overwritten.homepageHompage URL of the project. Only use this property if the project homepage is different from the GitHub URL.docs_urlDocumentation URL of the project. Only use this property if the project documentation site is different from the GitHub URL.resourceIfTrue, the project will be marked as a resource. Resources are not ranked and will always be shown on top of the category. You can use this to link to another best-of list section or website that contains additional projects.groupIfTrue, the project will be used as top project for grouping a set of related projects.group_idalso needs to be set to the shared group ID.group_idGroup ID that can be used to group this project to other projects. For every group, there needs to be one project withgroupset toTrue.showIfTrue, the project will always be shown even when the project would be actual hidden (e.g. dead project, risky licenses, to few stars...). Only use this property if you are sure that this project needs to be shown.ignoreIfTrue, the project will be ignored. This also means that it will not be included in the hidden projects section. However, the project metadata will still be collected.Supported Integrations:pypi_idProject ID on the Python package index (PyPi).conda_idProject ID on theconda package manager. If the main package is provided on a different channel, prefix the ID with the given channel: e.g.conda-forge/tensorflownpm_idProject ID on the Node package manager (npm).dockerhub_idProject ID on theDocker Hub container registry.maven_idArtifact ID onMaven central, e.g.org.apache.flink:flink-core.github_idGitHub ID of the project based on user or organization  and the repository name, e.g.best-of-lists/best-of-generator.gitlab_idGitLab ID of the project based on user or organization  and the repository name, e.g.best-of-lists/best-of-generator.While you can theoretically overwrite all project metadata, we suggest to only set the properties which the best-of generator is not able to find on GitHub or the configured package managers. There are also other undocumented properties, but for most projects those properties should not be overwritten.Additional undocumented project metadata(click to expand...)created_atupdate_atgithub_urlgithub_release_downloadsgithub_dependent_project_countlast_commit_pushed_atstar_countcommit_countdependent_project_countcontributor_countfork_countmonthly_downloadsopen_issue_countclosed_issue_countrelease_countlatest_stable_release_published_atlatest_stable_release_numbertrendinghelm_idbrew_idapt_idyum_idsnap_idmaven_iddnf_idyay_id<PACKAGE_MANAGER>_url<PACKAGE_MANAGER>_latest_release_published_at<PACKAGE_MANAGER>_dependent_project_countCategoriesA category allows to add additional structure to the best-of list by grouping related projects into a shared category. Thereby, every project is grouped into exactly one category. If no category is provided with the project metadata, the project will be categorized intoOthers.Category Examplecategories:-category:"data-engineering"title:"MachineLearning&DataEngineering"subtitle:"Best-oflistsaboutmachinelearning,dataengieering,datascience,orothertopicsrelatedtobigdata."projects:-name:"best-of-ml-python"github_id:"ml-tooling/best-of-ml-python"category:"data-engineering"The example above will be rendered as shown below:Category PropertiesPropertyDescriptioncategoryID of the category. This ID should also be used for adding a project to this category.titleCategory name used as the header of the category section.Optional Properties:subtitleShort description about the category shown under the title.ignoreIfTrue, the category and all its projects will be ignored.LabelsA label allows to highlight similarities or special features shared between projects. Compared to categories, a project can have any number of labels. The labels are shown as badges attached to the project description. It can have only an image (favicons are recommended), only a name, or both. We recommend to use image labels (or only very short labels) since the usage of labels will shorten the visible description text of a project.Label Examplelabels:-label:"python"image:"https://www.python.org/static/favicon.ico"description:"Best-oflistwithPythonprojects"-label:"libraries"name:"libraries"projects:-name:"best-of-ml-python"github_id:"ml-tooling/best-of-ml-python"labels:["libraries","python"]category:"data-engineering"The example above will be rendered as shown below:Label PropertiesPropertyDescriptionlabelID of the label. This ID should also be used for adding the label to a project.Optional Properties:imageURL to an image. If a valid URL is provided, the image will be shown wherever the label is used.nameName of the label. If a name is provided, the name will be shown wherever the label is used.descriptionShort description of the label. Ifshow_labels_in_legendconfiguration isTrueand animageis set, this description will also be shown in the legend (explanations).ignoreIfTrue, the label will not be shown anywhere.urlIfurlis set, the label will be a rendered as a link wherever it is used.ConfigurationMany aspects of the best-of list can be configured. Since most default values are selected to support the widest range of different lists, changing the default configuration is not required for most cases.Configuration Exampleconfiguration:min_stars:0min_projectrank:0allowed_licenses:["all"]markdown_header_file:"config/header.md"markdown_footer_file:"config/footer.md"The configuration example above changes the default configuration to show all projects regardless of star count (viamin_stars), projectrank (viamin_projectrank), or license (viaallows_licenses). It also configures a header (viamarkdown_header_file) and footer (viamarkdown_footer_file) markdown files that will be attached to the generated content.Configuration OptionsConfigDescriptionDefaultoutput_fileThe markdown output file../README.mdmarkdown_header_filePath to a markdown file that will be attached above the generated content.markdown_footer_filePath to a markdown file that will be attached below the generated content.output_generatorSelect the markdown generator to use for generating the output markdown page. Currently, onlymarkdown-listis supported.markdown-listproject_inactive_monthsNumber of months without activity until a project is marked as inactive.6project_dead_monthsNumber of months without activity until a project is marked as dead.12project_new_monthsNumber of months since creation to mark a project as newcomer.6min_projectrankProject will be hidden if it has a smaller projectrank (quality score).10min_starsProject will be hidden if it has a less stars on GitHub.100require_licenseIfTrue, all projects without a detected license will be hidden.Truerequire_repoIfTrue, all projects without a source repository - configure viagithub_idorgitlab_id- will be hidden.Falsemin_description_lengthThe minimum length of the project description. If the length is less, the project will not be shown.10max_description_lengthThe maximum length of the project description.55projects_history_folderThe folder used for storing history files (csvfiles with project metadata). Ifnull, no history files will be created../historygenerate_install_hintsIfFalse, the install hint code block for the package managers will not be shown.Truegenerate_tocIfTrue, generate a table of content with all categories.Truegenerate_legendIfTrue, generate a legend containing explanations for the used emojis.Truesort_byThe project property used to sort the projects within a category.projectrankmax_trending_projectsThe number of trending projects to show for trending up as well as down.5hide_empty_categoriesIfTrue, empty categories will not be shown.Falsehide_project_licenseIfTrue, the project license badge will not be shown.Falsehide_license_riskIfTrue, the risk indicator for uncommen or risky licenses will not be shown.Falseshow_labels_in_legendIfTrue, image labels will be listed in the legend (explanation) if they also have a description.Trueallowed_licensesList of allowed licenses (spdx format). A project with a different license will be hidden. Use["all"]to allow all licenses.selection of common open-source licensesextension_scriptPath to a python script which is loaded before project collection or markdown generation to allow extensibility.Project Quality ScoreAll projects in a best-of list are ranked and sorted by a project-quality score (also calledprojectrank). The score is calculated based on various metrics automatically collected from GitHub and different package managers. The score is just a sum of points which a project collects for various aspects and metrics. The score only has a meaning when it is compared to the project-quality score of other projects. We currently use the following aspects to calculate the score:This calculation is just chosen by experience. There is no scientific proof that this really reflects the quality of a project.Has homepage link & description:+ 1Has an existing GitHub repository:+ 1Has a license:+ 1Has a commonly used license (e.g. MIT):+ 1Has multiple releases:+ 1Has stable releases based on semantic version:+ 1Has a release that is less than 6 months old:+ 1Repo was update in the last 3 months:+ 1Is older than 6 months:+ 1Metrics from GitHub & package mangers:Number of stars:+ log(COUNT / 2)Number of contributors:+ log(COUNT / 2) - 1Number of commits:+ log(COUNT / 2) - 1Number of forks:+ log(COUNT / 2)Number of monthly downloads:+ log(COUNT / 2) - 1Number of dependent projects:+ log(COUNT / 1.5)Number of watchers:+ log(COUNT / 2) - 1Number of closed issues:+ log(COUNT / 2) - 1Trending ProjectsThe best-of list is able to automatically identify trending projects by comparingproject-quality scoresbetween the metadata of the current generation with the latest history file. If the history is activated (projects_history_folderis not set tonull), the best-of generation will automatically create a<YYYY-MM-dd>_changes.mdfile in the configured history folder for every update and alatest-changes.mdfile in the folder of the generated markdown page. These files contain a list of projects that are trending up (higher quality score since last update) and down (lower quality score since last update) as well as a list of all added projects since the last update, as shown in the following example:TheGitHub Action workflowuses these markdown files to automatically create releases for every update. This allows to persist a useful changelog over many updates and enables readers to get valuable email updates whenever the list is updated (by watching for release events).Generation via CLITo use the CLI, you need to have the best-of generator installed via pip:pip install best-ofbest-ofgenerate[OPTIONS]PATHGenerates a best-of markdown page from ayamlfile.Arguments:PATH: Path to theyamlfile containing the best-of metadata (e.g../projects.yaml).Options:-g,--github-keyTEXT: GitHub API Token (fromhttps://github.com/settings/tokens).-l,--libraries-keyTEXT: Libraries.io API Key (fromhttps://libraries.io/api).--help: Show this message and exit.Generation via GitHub Action🧙‍♂️ If you want to create your own best-of list, we strongly recommend to followthis guide. With the guide, it will only take about 3 minutes to get you started. It already includes this GitHub Action and some other useful template files. Further manual steps for setting up the GitHub Action are not required.Thebest-of-update-actionmakes it very easy to set-up automated scheduled updates for your best-of markdown page. Please refer to thebest-of-update-action documentationfor more detailed information about the GitHub Action and the workflow.Generation via Python APIUsage of the Python API is not well documented yet and currently not recommended.The best-of generator can also be used and integrated via its Python API. The full Python API documentation can be foundhere.Updating Best-of GeneratorKnown IssuesThe generated README file is not displayed completely(click to expand...)GitHub only renders the first 512 kb of the mainREADME.mdfile and will cut off the rendered version as soon as it has processed the first 512 kb of the raw markdown content. The rendering is only cut off when viewing the readme on the main repo page. If you directly select theREADME.mdfile, it will render in its entirety. To mitigate this issue, we optimized the markdown generation to require the minimum amount of characters. However, if you have a very large list of projects (more than 800), you might reach the 512 kb limit (check the file size of the generatedREADME.mdfile). In this case, we suggest to extract some of the categories or projects into smaller best-of lists.ContributionPull requests are encouraged and always welcome. Read ourcontribution guidelinesand check outhelp-wantedissues.Submit GitHub issues for anyfeature request and enhancement,bugs, ordocumentationproblems.By participating in this project, you agree to abide by itsCode of Conduct.Thedevelopment sectionbelow contains information on how to build and test the project after you have implemented some changes.DevelopmentRequirements:DockerandActare required to be installed on your machine to execute the containerized build process.To simplify the process of building this project from scratch, we provide build-scripts - based onuniversal-build- that run all necessary steps (build, check, test, and release) within a containerized environment. To build and test your changes, execute the following command in the project root folder:act-b-jbuildRefer to ourcontribution guidesfor more detailed information on our build scripts and development process.LicensedMIT. Created and maintained with ❤️  by developers from Berlin.