]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

black-primer: stop running it (#2809)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Thu, 27 Jan 2022 01:18:43 +0000 (17:18 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 01:18:43 +0000 (17:18 -0800)
At the moment, it's just a source of spurious CI failures and busywork
updating the configuration file.

Unlike diff-shades, it is run across many different platforms and
Python versions, but that doesn't seem essential. We already run unit
tests across platforms and versions.

I chose to leave the code around for now in case somebody is using it,
but CI will no longer run it.

.github/workflows/primer.yml [deleted file]
.github/workflows/uvloop_test.yml
CHANGES.md
README.md
docs/contributing/gauging_changes.md
docs/contributing/the_basics.md

diff --git a/.github/workflows/primer.yml b/.github/workflows/primer.yml
deleted file mode 100644 (file)
index 5fa6ac0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Primer
-
-on:
-  push:
-    paths-ignore:
-      - "docs/**"
-      - "*.md"
-
-  pull_request:
-    paths-ignore:
-      - "docs/**"
-      - "*.md"
-
-jobs:
-  build:
-    # We want to run on external PRs, but not on our own internal PRs as they'll be run
-    # by the push to the branch. Without this if check, checks are duplicated since
-    # internal PRs match both the push and pull_request events.
-    if:
-      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
-      github.repository
-
-    runs-on: ${{ matrix.os }}
-    strategy:
-      fail-fast: false
-      matrix:
-        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
-        os: [ubuntu-latest, windows-latest]
-
-    steps:
-      - uses: actions/checkout@v2
-
-      - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v2
-        with:
-          python-version: ${{ matrix.python-version }}
-
-      - name: Install dependencies
-        run: |
-          python -m pip install --upgrade pip
-          python -m pip install -e ".[d,jupyter]"
-
-      - name: Primer run
-        env:
-          pythonioencoding: utf-8
-        run: |
-          black-primer
index 5d23ec64299888b2d8cd0df5ca5bfe6ca1e045a4..a639bbd1b971adda5312e9e71f847ac3532f21a2 100644 (file)
@@ -40,6 +40,6 @@ jobs:
         run: |
           python -m pip install -e ".[uvloop]"
 
-      - name: Primer uvloop run
+      - name: Format ourselves
         run: |
-          black-primer
+          python -m black --check src/
index 379906865085bb9ca9de2137f1a3cf95f8456b2d..0dc4952f0693d81326cec53b06ab60b2f9dd876d 100644 (file)
@@ -42,6 +42,7 @@
 - Make passing `SRC` or `--code` mandatory and mutually exclusive (#2804)
 - Work around bug that causes unstable formatting in some cases in the presence of the
   magic trailing comma (#2807)
+- Deprecate the `black-primer` tool (#2809)
 
 ### Packaging
 
index e900d2d75a29be7859567c82ce30dde5b7b029f3..a00495c8858bb6d4808c9e29aef1503448206f30 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,7 +4,6 @@
 
 <p align="center">
 <a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Test/badge.svg"></a>
-<a href="https://github.com/psf/black/actions"><img alt="Actions Status" src="https://github.com/psf/black/workflows/Primer/badge.svg"></a>
 <a href="https://black.readthedocs.io/en/stable/?badge=stable"><img alt="Documentation Status" src="https://readthedocs.org/projects/black/badge/?version=stable"></a>
 <a href="https://coveralls.io/github/psf/black?branch=main"><img alt="Coverage Status" src="https://coveralls.io/repos/github/psf/black/badge.svg?branch=main"></a>
 <a href="https://github.com/psf/black/blob/main/LICENSE"><img alt="License: MIT" src="https://black.readthedocs.io/en/stable/_static/license.svg"></a>
index 9b38fe1b6287f98fe1b3464206693e855459af9f..59c40eb390902abc71c6cbd8774451b1158e05c9 100644 (file)
@@ -9,51 +9,16 @@ enough to cause frustration to projects that are already "black formatted".
 
 ## black-primer
 
-`black-primer` is a tool built for CI (and humans) to have _Black_ `--check` a number of
-Git accessible projects in parallel. (configured in `primer.json`) _(A PR will be
-accepted to add Mercurial support.)_
-
-### Run flow
-
-- Ensure we have a `black` + `git` in PATH
-- Load projects from `primer.json`
-- Run projects in parallel with `--worker` workers (defaults to CPU count / 2)
-  - Checkout projects
-  - Run black and record result
-  - Clean up repository checkout _(can optionally be disabled via `--keep`)_
-- Display results summary to screen
-- Default to cleaning up `--work-dir` (which defaults to tempfile schemantics)
-- Return
-  - 0 for successful run
-  - \< 0 for environment / internal error
-  - \> 0 for each project with an error
-
-### Speed up runs 🏎
-
-If you're running locally yourself to test black on lots of code try:
-
-- Using `-k` / `--keep` + `-w` / `--work-dir` so you don't have to re-checkout the repo
-  each run
-
-### CLI arguments
-
-```{program-output} black-primer --help
-
-```
+`black-primer` is an obsolete tool (now replaced with `diff-shades`) that was used to
+gauge the impact of changes in _Black_ on open-source code. It is no longer used
+internally and will be removed from the _Black_ repository in the future.
 
 ## diff-shades
 
-diff-shades is a tool similar to black-primer, it also runs _Black_ across a list of Git
-cloneable OSS projects recording the results. The intention is to eventually fully
-replace black-primer with diff-shades as it's much more feature complete and supports
-our needs better.
-
-The main highlight feature of diff-shades is being able to compare two revisions of
-_Black_. This is incredibly useful as it allows us to see what exact changes will occur,
-say merging a certain PR. Black-primer's results would usually be filled with changes
-caused by pre-existing code in Black drowning out the (new) changes we want to see. It
-operates similarly to black-primer but crucially it saves the results as a JSON file
-which allows for the rich comparison features alluded to above.
+diff-shades is a tool that runs _Black_ across a list of Git cloneable OSS projects
+recording the results. The main highlight feature of diff-shades is being able to
+compare two revisions of _Black_. This is incredibly useful as it allows us to see what
+exact changes will occur, say merging a certain PR.
 
 For more information, please see the [diff-shades documentation][diff-shades].
 
index 23fbb8a3d7e1d939a2286caf5b4a095ac900168b..9325a9e44edc83dcd0b879601812b188ce962219 100644 (file)
@@ -30,9 +30,6 @@ the root of the black repo:
 
 # Optional Fuzz testing
 (.venv)$ tox -e fuzz
-
-# Optional CI run to test your changes on many popular python projects
-(.venv)$ black-primer [-k -w /tmp/black_test_repos]
 ```
 
 ### News / Changelog Requirement
@@ -69,18 +66,6 @@ If you make changes to docs, you can test they still build locally too.
 (.venv)$ sphinx-build -a -b html -W docs/ docs/_build/
 ```
 
-## black-primer
-
-`black-primer` is used by CI to pull down well-known _Black_ formatted projects and see
-if we get source code changes. It will error on formatting changes or errors. Please run
-before pushing your PR to see if you get the actions you would expect from _Black_ with
-your PR. You may need to change
-[primer.json](https://github.com/psf/black/blob/main/src/black_primer/primer.json)
-configuration for it to pass.
-
-For more `black-primer` information visit the
-[documentation](./gauging_changes.md#black-primer).
-
 ## Hygiene
 
 If you're fixing a bug, add a test. Run it first to confirm it fails, then fix the bug,