{"id":16897545,"url":"https://github.com/cooperlees/black-primer","last_synced_at":"2025-03-20T11:19:53.483Z","repository":{"id":38210765,"uuid":"469970351","full_name":"cooperlees/black-primer","owner":"cooperlees","description":"primer - prime projects for blackening... 🏴","archived":false,"fork":false,"pushed_at":"2022-07-12T02:06:10.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T23:34:51.369Z","etag":null,"topics":["python-black"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cooperlees.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-15T01:58:01.000Z","updated_at":"2022-03-29T13:55:09.000Z","dependencies_parsed_at":"2022-07-12T17:12:28.901Z","dependency_job_id":null,"html_url":"https://github.com/cooperlees/black-primer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooperlees%2Fblack-primer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooperlees%2Fblack-primer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooperlees%2Fblack-primer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cooperlees%2Fblack-primer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cooperlees","download_url":"https://codeload.github.com/cooperlees/black-primer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244600725,"owners_count":20479307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-black"],"created_at":"2024-10-13T17:37:54.220Z","updated_at":"2025-03-20T11:19:53.439Z","avatar_url":"https://github.com/cooperlees.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## black-primer\n\n\u003e NOTICE: **This repository exists as a historical record, active development is not\n\u003e planned.**\n\u003e\n\u003e `black-primer` is an obsolete tool (now replaced with [diff-shades]) that was used to\n\u003e gauge the impact of changes in _Black_ on open-source code. It is no longer used\n\u003e internally and was moved into its own repository in March 2022.\n\n`black-primer` is a tool built for CI (and humans) to have _Black_ `--check` a number of\nGit accessible projects in parallel. (configured in `primer.json`) _(A PR will be\naccepted to add Mercurial support.)_\n\n## Run flow\n\n- Ensure we have a `black` + `git` in PATH\n- Load projects from `primer.json`\n- Run projects in parallel with `--worker` workers (defaults to CPU count / 2)\n  - Checkout projects\n  - Run black and record result\n  - Clean up repository checkout _(can optionally be disabled via `--keep`)_\n- Display results summary to screen\n- Default to cleaning up `--work-dir` (which defaults to tempfile schemantics)\n- Return\n  - 0 for successful run\n  - \\\u003c 0 for environment / internal error\n  - \\\u003e 0 for each project with an error\n\n## Speed up runs 🏎\n\nIf you're running locally yourself to test black on lots of code try:\n\n- Using `-k` / `--keep` + `-w` / `--work-dir` so you don't have to re-checkout the repo\n  each run\n\n## CLI arguments\n\n```\nUsage: black-primer [OPTIONS]\n\n  primer - prime projects for blackening... 🏴\n\nOptions:\n  -c, --config PATH      JSON config file path  [default:\n                         /home/ichard26/programming/oss/black-\n                         primer/src/black_primer/primer.json]\n\n  --debug                Turn on debug logging  [default: False]\n  -k, --keep             Keep workdir + repos post run  [default: False]\n  -L, --long-checkouts   Pull big projects to test  [default: False]\n  --no-diff              Disable showing source file changes in black output\n                         [default: False]\n\n  --projects TEXT        Comma separated list of projects to run  [default: ST\n                         DIN,aioexabgp,attrs,bandersnatch,channels,cpython,dja\n                         ngo,flake8-bugbear,hypothesis,pandas,pillow,poetry,pt\n                         r,pyanalyze,pyramid,pytest,scikit-\n                         lego,tox,typeshed,virtualenv,warehouse]\n\n  -R, --rebase           Rebase project if already checked out  [default:\n                         False]\n\n  -w, --workdir PATH     Directory path for repo checkouts  [default:\n                         /tmp/primer.20220314212941]\n\n  -W, --workers INTEGER  Number of parallel worker coroutines  [default: 2]\n  -h, --help             Show this message and exit.\n```\n\n[diff-shades]: https://github.com/ichard26/diff-shades\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcooperlees%2Fblack-primer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcooperlees%2Fblack-primer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcooperlees%2Fblack-primer/lists"}