From 887e0e09c32bd9d5f0565e0f55627d225d07b5c8 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 00:15:38 +0100 Subject: [PATCH 01/33] Add Vale for content linting to the repo --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/styles/custom/british-spellings.yml | 119 ++++++++++++++++++ .github/styles/custom/dashes.yml | 12 ++ .github/styles/custom/endash.yml | 14 +++ .github/styles/custom/no-contractions.yml | 41 ++++++ .github/styles/custom/oxford-comma.yml | 7 ++ .github/styles/custom/quotes.yml | 10 ++ .github/styles/custom/spaces.yml | 7 ++ .github/workflows/linting.yml | 16 +++ .vale.ini | 14 +++ LICENSE.md | 2 +- README.md | 5 + docs/LICENSE | 2 +- docs/pages/ci.md | 2 +- docs/pages/docs.md | 4 +- docs/pages/libraries/parallel-async.md | 2 +- docs/pages/virtual.md | 2 +- .../.github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../ISSUE_TEMPLATE/feature_request.yml | 2 +- tests/data/test_package_generation/LICENSE.md | 2 +- tutorial.md | 8 +- .../.github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../ISSUE_TEMPLATE/feature_request.yml | 2 +- {{cookiecutter.project_slug}}/LICENSE.md | 10 +- 24 files changed, 267 insertions(+), 22 deletions(-) create mode 100644 .github/styles/custom/british-spellings.yml create mode 100644 .github/styles/custom/dashes.yml create mode 100644 .github/styles/custom/endash.yml create mode 100644 .github/styles/custom/no-contractions.yml create mode 100644 .github/styles/custom/oxford-comma.yml create mode 100644 .github/styles/custom/quotes.yml create mode 100644 .github/styles/custom/spaces.yml create mode 100644 .vale.ini diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index de0b5193..08a57c7f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when [...] + placeholder: I'm always frustrated when […] validations: required: true - id: solution diff --git a/.github/styles/custom/british-spellings.yml b/.github/styles/custom/british-spellings.yml new file mode 100644 index 00000000..bc595889 --- /dev/null +++ b/.github/styles/custom/british-spellings.yml @@ -0,0 +1,119 @@ +--- +# This style is taken from the official GitLab style and updated to use British spelling instead of US spelling +# Error: livewyer.British +# +# Checks that British spelling is used instead of US spelling. +# +# For a list of all options, see https://vale.sh/docs/topics/styles/ +extends: substitution +message: "Use the British spelling '%s' instead of the US '%s'." +link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language +level: error +ignorecase: true +swap: + eon: aeon + airplane: aeroplane + aging: ageing + aluminum: aluminium + anemia: anaemia + minimize: minimise + anesthesia: anaesthesia + analyze: analyse + annex: annexe + apologize: apologise + authorize: authorise + authorized: authorised + authorization: authorisation + authorizing: authorising + behavior: behaviour + buses: busses + caliber: calibre + categorize: categorise + categorized: categorised + categorizes: categorises + categorizing: categorising + center: centre + civilization: civilisation + civilize: civilise + color: colour + cozy: cosy + cipher: cypher + dependent: dependant + defense: defence + distill: distil + draft: draught + encyclopedia: encyclopaedia + inquiry: enquiry + enroll: enrol + enrollment: enrolment + enthrall: enthral + favorite: favourite + fiber: fibre + filet: fillet + flavor: flavour + furor: furore + fulfill: fulfil + jail: gaol + gray: grey + humor: humour + honor: honour + initialed: initialled + initialing: initialling + instill: instil + jewelry: jewellery + labeling: labelling + labeled: labelled + labor: labour + libelous: libellous + license: licence + likable: likeable + livable: liveable + luster: lustre + maneuver: manoeuvre + marvelous: marvellous + matte: matt + meager: meagre + meter: metre + modeling: modelling + mustache: moustache + neighbor: neighbour + normalize: normalise + offense: offence + optimize: optimise + optimized: optimised + optimizing: optimising + organize: organise + oriented: orientated + paralyze: paralyse + plow: plough + pretense: pretence + pajamas: pyjamas + ratable: rateable + realize: realise + recognize: recognise + reconnoiter: reconnoitre + rumor: rumour + saber: sabre + salable: saleable + saltpeter: saltpetre + skeptic: sceptic + sepulcher: sepulchre + signaling: signalling + sizable: sizeable + skillful: skilful + somber: sombre + smolder: smoulder + specialty: speciality + specter: spectre + splendor: splendour + standardize: standardise + standardized: standardised + sulfur: sulphur + theater: theatre + traveled: travelled + traveler: traveller + traveling: travelling + unshakable: unshakeable + willful: wilful + yogurt: yoghurt + authorizer: authoriser diff --git a/.github/styles/custom/dashes.yml b/.github/styles/custom/dashes.yml new file mode 100644 index 00000000..c6f3c885 --- /dev/null +++ b/.github/styles/custom/dashes.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#dashes" +nonword: true +level: warning +action: + name: edit + params: + - remove + - " " +tokens: + - '\s[—–]\s' diff --git a/.github/styles/custom/endash.yml b/.github/styles/custom/endash.yml new file mode 100644 index 00000000..eaef1866 --- /dev/null +++ b/.github/styles/custom/endash.yml @@ -0,0 +1,14 @@ +extends: existence +message: "Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor + parenthesis, use an em dash ('—')." +link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#dashes" +nonword: true +level: error +action: + name: edit + params: + - replace + - "-" + - "—" +tokens: + - "–" diff --git a/.github/styles/custom/no-contractions.yml b/.github/styles/custom/no-contractions.yml new file mode 100644 index 00000000..31075f2a --- /dev/null +++ b/.github/styles/custom/no-contractions.yml @@ -0,0 +1,41 @@ +--- +extends: substitution +message: Use '%s' instead of '%s.' +level: error +ignorecase: true +swap: + aren't: are not, + can't: cannot, + couldn't: could not, + didn't: did not, + doesn't: does not, + don't: do not, + hasn't: has not, + haven't: have not, + how'll: how will, + how's: how is, + isn't: is not, + it'll: it will, + it's: it is, + shouldn't: should not + that'll: that will, + that's: that is, + they'll: they will, + they're: they are, + wasn't: was not, + we'll: we will, + we're: we are, + we've: we have, + weren't: were not, + what'll: what will, + what's: what is, + when'll: when will, + when's: when is, + where'll: where will, + where's: where is, + who'll: who will, + who's: who is, + why'll: why will, + why's: why is, + won't: will not, + you're: you are diff --git a/.github/styles/custom/oxford-comma.yml b/.github/styles/custom/oxford-comma.yml new file mode 100644 index 00000000..64e4e2fa --- /dev/null +++ b/.github/styles/custom/oxford-comma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#commas" +scope: sentence +level: suggestion +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.github/styles/custom/quotes.yml b/.github/styles/custom/quotes.yml new file mode 100644 index 00000000..ec5d6125 --- /dev/null +++ b/.github/styles/custom/quotes.yml @@ -0,0 +1,10 @@ +extends: existence +message: Use straight quotes instead of smart quotes. +level: error +nonword: true +action: +tokens: + - “ + - ” + - ‘ + - ’ diff --git a/.github/styles/custom/spaces.yml b/.github/styles/custom/spaces.yml new file mode 100644 index 00000000..5cc3c6e2 --- /dev/null +++ b/.github/styles/custom/spaces.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use only one space between words and sentences (not two)." +link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#spaces" +level: error +nonword: true +tokens: + - '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3c9ac9c1..6585ad9f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -59,3 +59,19 @@ jobs: git add . pre-commit run --all-files --color always --verbose working-directory: cookie-template/python-template + + lint-prose: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Run Vale + uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + fail_on_error: true + filter_mode: nofilter + reporter: github-check + vale_flags: --glob='!.github/styles/*' diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 00000000..c5b4178c --- /dev/null +++ b/.vale.ini @@ -0,0 +1,14 @@ +StylesPath = .github/styles + +# https://github.com/errata-ai/packages +Packages = proselint + +[formats] +qmd = md + +[*.{md,qmd}] +BasedOnStyles = proselint,\ + Vale + +# Disable +Vale.Spelling = false diff --git a/LICENSE.md b/LICENSE.md index d3598157..42ba92da 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2023-2025 UCL Centre for Advanced Research Computing +Copyright © 2023-2025 UCL Centre for Advanced Research Computing Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 953ce3a6..bf9cac5b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,12 @@ repo, and we welcome questions there or in the `#helpme` channel on the 🍪 Our template is a [cookiecutter] template which automatically creates new Python packages with our recommended tooling set up and ready to go. + + > [!NOTE] + + + > If you're making a package within a community that has an existing > package template (e.g., [`scikit-hep`](https://github.com/scikit-hep/cookie)), > we recommend using their template instead of this one. diff --git a/docs/LICENSE b/docs/LICENSE index 0910402e..e51f0e9d 100644 --- a/docs/LICENSE +++ b/docs/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2025 just-the-docs +Copyright © 2022-2025 just-the-docs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/pages/ci.md b/docs/pages/ci.md index 523fb7aa..ad8825dc 100644 --- a/docs/pages/ci.md +++ b/docs/pages/ci.md @@ -27,7 +27,7 @@ during tests. | Name | Short description | 🚦 | | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------: | | [Codecov](https://docs.codecov.com/docs) | Hosted service to report code coverage metrics. Occasionally slow to update after a report is updated, can be configured to add extra CI checks. This service is probably more widely used and is [free for both open-source and private projects](https://about.codecov.io/pricing/). | Best | -| [Coveralls](https://docs.coveralls.io/) | Hosted service to report code coverage metrics. Very similar to codecov and we don't strongly recommend one over the other. This service is only [free for open-source projects](https://coveralls.io/pricing). | Best | +| [Coveralls](https://docs.coveralls.io/) | Hosted service to report code coverage metrics. Similar to codecov and we don't strongly recommend one over the other. This service is only [free for open-source projects](https://coveralls.io/pricing). | Best |
Best explanation Both services are similar, so both Best. diff --git a/docs/pages/docs.md b/docs/pages/docs.md index c80b5bce..57a87464 100644 --- a/docs/pages/docs.md +++ b/docs/pages/docs.md @@ -5,7 +5,7 @@ layout: default ## Documentation -With Python, as with many other languages, it's very common to automatically +With Python, as with many other languages, it's common to automatically create a web page with documentation. This can include reference for the API taken from your package's [docstrings], tutorials, examples, and more in depth explanation about how the package works. For an in-depth discussion of the @@ -28,7 +28,7 @@ If you're using GitHub, one option is to host your docs on [GitHub pages]. | Name | Short description | 🚦 | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------: | | [MkDocs] | Generates documentation from Markdown files, with a plugin to generate API documentation. A good plugin ecosystem and balance of usability and customisability. | Best | -| [Sphinx] | Generates documentation from reStructuredText or Markdown files, long been the de-facto standard and very widely used. Mature plugin ecosystem. | Good | +| [Sphinx] | Generates documentation from reStructuredText or Markdown files, long been the de-facto standard and widely used. Mature plugin ecosystem. | Good | | [gitbook] | General documentation builder; integrates with GitHub. | Good | | [pdoc] | Auto-generates API documentation from docstrings, beginner friendly but with less of a plugin ecosystem than others. | Good | diff --git a/docs/pages/libraries/parallel-async.md b/docs/pages/libraries/parallel-async.md index 6af45f56..47cef7e3 100644 --- a/docs/pages/libraries/parallel-async.md +++ b/docs/pages/libraries/parallel-async.md @@ -26,7 +26,7 @@ simply due to pre-existing code using a library like [pandas]. | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------: | | [multiprocess] | A fork of [multiprocessing] which uses `dill` instead of `pickle` to allow serializing wider range of object types including nested / anonymous functions. We've found this easier to use than `multiprocessing`. | Best | | [concurrent.futures] | [See the table below](#asynchronous-processing). | Good | -| [dask] | Aims to make scaling existing code in familiar libraries (`numpy`, [pandas], `scikit-learn`, ...) easy. | Good | +| [dask] | Aims to make scaling existing code in familiar libraries (`numpy`, [pandas], `scikit-learn`, …) easy. | Good | | [multiprocessing] | The standard library module for distributing tasks across multiple processes. | Good | | [mpi4py] | Support for MPI based parallelism. | Good | | [threading] | The standard library module for multi-threading. Due to the _global interpreter lock_ [currently][PEP703] only one thread can execute Python code at a time. | Avoid | diff --git a/docs/pages/virtual.md b/docs/pages/virtual.md index f0c5aaa8..c7aea452 100644 --- a/docs/pages/virtual.md +++ b/docs/pages/virtual.md @@ -13,7 +13,7 @@ layout: default | [pixi] | A fast drop-in replacement for `conda`. | Good | | [pyenv] | Lets you easily switch between multiple versions of Python. | Good | | [virtualenv] | Creates isolated Python environments, and offers more features than venv. | Good | -| [venv] | Creates isolated Python environments. Fewer features than other tools, but very widely used and comes built into Python. | Good | +| [venv] | Creates isolated Python environments. Fewer features than other tools, but widely used and comes built into Python. | Good | | [anaconda] | Due to recent [licensing ambiguity][anaconda-problems], we recommend avoiding anaconda and many of the default channels. We recommend installing miniforge and sticking to the `conda-forge` channel. | Avoid | diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml index 073866e0..0ad87f0e 100644 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: value: |- import cookiecutter_test - ... + … render: Python validations: required: true diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml index 8e1ad7fe..1ec4f0cc 100644 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when [...] + placeholder: I'm always frustrated when […] validations: required: true - id: solution diff --git a/tests/data/test_package_generation/LICENSE.md b/tests/data/test_package_generation/LICENSE.md index 7256f96b..254926ea 100644 --- a/tests/data/test_package_generation/LICENSE.md +++ b/tests/data/test_package_generation/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright (c) 2025 Eva Lu Ator +Copyright © 2025 Eva Lu Ator Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/tutorial.md b/tutorial.md index 89a5bb89..eeb8a6a8 100644 --- a/tutorial.md +++ b/tutorial.md @@ -7,7 +7,7 @@ In this tutorial we will go through in detail the steps required to set-up a Pyt ## ⚙️ Setting up dependencies for using template -
Click to expand... +
Click to expand… To use the template you will need to install the following software tools @@ -80,7 +80,7 @@ We will first go through the steps for creating a new package using the `UCL-ARC You will then be shown a series of prompts at the command line asking for details of the project and package. You can choose to use the default placeholder value (shown in parenthesis `()` in prompt) for any question by hitting `Enter`. If you already have a specific project in mind you want to set up a package for using the template you can use this project's details, otherwise you can just use the placeholder values. You should choose `Y` (yes) to the questions on whether to initialise Git repository and automatically deploy HTML documentation to GitHub Pages to allow you to complete the follow on exercises which rely on these options being enabled. For the prompt asking for the GitHub user or organization name to be owner of repository you should supply your GitHub user name. -3. Once you have completed all the cookiecutter prompts some additional instructions will be printed to screen (which we will come back to in the next sections) and your new package will be generated in a directory named `{project_slug}` in the current working directory (where `{project_slug}` is the value entered for the `'Slugified' project name...`[^slug] prompt, this will be `python-template` if you used the default placeholder values). You can see the directory tree of files generated by running +3. Once you have completed all the cookiecutter prompts some additional instructions will be printed to screen (which we will come back to in the next sections) and your new package will be generated in a directory named `{project_slug}` in the current working directory (where `{project_slug}` is the value entered for the `'Slugified' project name…`[^slug] prompt, this will be `python-template` if you used the default placeholder values). You can see the directory tree of files generated by running ```sh tree {project_slug} @@ -129,7 +129,7 @@ GitHub CLI detected, you can create a repo with the following: gh repo create {github_owner}/{project_slug} -d "{project_description}" --public -r origin --source {project_slug} ``` -where `{github_owner}`, `{project_slug}` and `{project_description}` are replaced with the relevant GitHub repository owner (user name), project slug and description that you entered when setting up the package using `cookiecutter`. You should now copy-paste and run the `gh repo create ...` command that was printed out in the message - if you no longer have access to the message you can use the example above, being careful to subsitute the placeholders in braces `{}` with the relevant values. +where `{github_owner}`, `{project_slug}` and `{project_description}` are replaced with the relevant GitHub repository owner (user name), project slug and description that you entered when setting up the package using `cookiecutter`. You should now copy-paste and run the `gh repo create …` command that was printed out in the message - if you no longer have access to the message you can use the example above, being careful to subsitute the placeholders in braces `{}` with the relevant values. If you get an error message at this point it may be because you have not installed the GitHub CLI or set up the authorisation for the GitHub CLI as [described in the setup instructions above](#%EF%B8%8F-setting-up-dependencies-for-using-template). @@ -270,7 +270,7 @@ Once you have activated the environment you should make sure the version of the python -m pip install --upgrade pip ``` -Similar to `uv`, once the the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running +Similar to `uv`, once the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running ```sh python -m pip install --editable ".[dev,docs,test]" diff --git a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml index 16f16f13..3417d85a 100644 --- a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: value: |- import {{cookiecutter.package_name}} - ... + … render: Python validations: required: true diff --git a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml index 8e1ad7fe..1ec4f0cc 100644 --- a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when [...] + placeholder: I'm always frustrated when […] validations: required: true - id: solution diff --git a/{{cookiecutter.project_slug}}/LICENSE.md b/{{cookiecutter.project_slug}}/LICENSE.md index a8d6580e..1915a14a 100644 --- a/{{cookiecutter.project_slug}}/LICENSE.md +++ b/{{cookiecutter.project_slug}}/LICENSE.md @@ -4,7 +4,7 @@ # MIT License -Copyright (c) {% now 'utc', '%Y' %} {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} +Copyright © {% now 'utc', '%Y' %} {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- elif cookiecutter.license == "BSD-3-Clause" -%} -Copyright (c) {% now 'utc', '%Y' %}, {{cookiecutter.author_given_names}} +Copyright © {% now 'utc', '%Y' %}, {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -629,7 +629,7 @@ warranty; and each file should have at least the “copyright” line and a poin to where the full notice is found. - Copyright (C) + Copyright © This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -649,14 +649,14 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Copyright © This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands `show w` and `show c` should show the appropriate parts of the General Public License. Of course, your program's commands might be -different; for a GUI interface, you would use an “about box”. +different; for a GUI, you would use an “about box”. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more From 2a2348c5313eac8bef370375f034d9d5ff5e192c Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 00:18:43 +0100 Subject: [PATCH 02/33] Move comment to bottom --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf9cac5b..cee6e1fe 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,12 @@ Python packages with our recommended tooling set up and ready to go. > [!NOTE] - - - > If you're making a package within a community that has an existing > package template (e.g., [`scikit-hep`](https://github.com/scikit-hep/cookie)), > we recommend using their template instead of this one. + + ## Tutorial Some quick instructions for using our template are below. From b091a30811d16fd7b677ddf2c20a0014b131d3a4 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 00:21:49 +0100 Subject: [PATCH 03/33] Update .github/styles/custom/endash.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/styles/custom/endash.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/styles/custom/endash.yml b/.github/styles/custom/endash.yml index eaef1866..86f7ca92 100644 --- a/.github/styles/custom/endash.yml +++ b/.github/styles/custom/endash.yml @@ -1,6 +1,6 @@ extends: existence message: "Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor - parenthesis, use an em dash ('—')." + parentheses, use an em dash ('—')." link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#dashes" nonword: true level: error From a0e8d2671e09db62deb280fee38dd451155bbddf Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 00:26:52 +0100 Subject: [PATCH 04/33] Update .vale.ini --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index c5b4178c..a2589b1a 100644 --- a/.vale.ini +++ b/.vale.ini @@ -6,7 +6,7 @@ Packages = proselint [formats] qmd = md -[*.{md,qmd}] +[*.md] BasedOnStyles = proselint,\ Vale From ca5a045236a49a3e354d071875845fcb12071016 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 00:27:06 +0100 Subject: [PATCH 05/33] Update .vale.ini --- .vale.ini | 3 --- 1 file changed, 3 deletions(-) diff --git a/.vale.ini b/.vale.ini index a2589b1a..92deef9a 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,9 +3,6 @@ StylesPath = .github/styles # https://github.com/errata-ai/packages Packages = proselint -[formats] -qmd = md - [*.md] BasedOnStyles = proselint,\ Vale From e32d217036d5b8d62e034ce1e1433064c026f1ce Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 09:34:55 +0100 Subject: [PATCH 06/33] Update .vale.ini --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 92deef9a..751f344c 100644 --- a/.vale.ini +++ b/.vale.ini @@ -8,4 +8,4 @@ BasedOnStyles = proselint,\ Vale # Disable -Vale.Spelling = false +Vale.Spelling = NO From 5293621c54141ca6100cc6a6d51b299e55c89917 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 10:01:28 +0100 Subject: [PATCH 07/33] Change rules --- .github/styles/custom/british-spellings.yml | 198 ++++++++++++-------- .github/styles/custom/dashes.yml | 3 +- .github/styles/custom/endash.yml | 6 +- .github/styles/custom/oxford-comma.yml | 3 +- .github/styles/custom/spaces.yml | 3 +- 5 files changed, 121 insertions(+), 92 deletions(-) diff --git a/.github/styles/custom/british-spellings.yml b/.github/styles/custom/british-spellings.yml index bc595889..a822721f 100644 --- a/.github/styles/custom/british-spellings.yml +++ b/.github/styles/custom/british-spellings.yml @@ -1,119 +1,151 @@ --- -# This style is taken from the official GitLab style and updated to use British spelling instead of US spelling -# Error: livewyer.British -# -# Checks that British spelling is used instead of US spelling. -# -# For a list of all options, see https://vale.sh/docs/topics/styles/ extends: substitution -message: "Use the British spelling '%s' instead of the US '%s'." -link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html#language +message: Use the British spelling '%s' instead of the US '%s'. level: error ignorecase: true swap: - eon: aeon - airplane: aeroplane - aging: ageing - aluminum: aluminium - anemia: anaemia - minimize: minimise - anesthesia: anaesthesia - analyze: analyse - annex: annexe - apologize: apologise - authorize: authorise - authorized: authorised - authorization: authorisation - authorizing: authorising - behavior: behaviour - buses: busses + # -our vs. -or + ardor: ardour + candor: candour + color: colour + demeanor: demeanour + endeavor: endeavour + favour: favour + fervor: fervour + flavor: flavour + harbor: harbour + honor: honour + humor: humour + labor: labour + neighbor: neighbour + odor: odour + pavor: pavour + rancor: rancour + rigor: rigour + rumor: rumour + savor: savour + splendor: splendour + succor: succour + valour: valour + vapor: vapour + vigor: vigour + # and their derivatives + colored: coloured + coloring: colouring + colors: colours + endeavored: endeavoured + endeavoring: endeavouring + flavored: flavoured + flavoring: flavouring + honored: honoured + honoring: honouring + honors: honours + humors: humours + labored: laboured + laboring: labouring + labors: labours + neighbors: neighbours + rumors: rumours + splendors: splendours + # -re vs. -er caliber: calibre - categorize: categorise - categorized: categorised - categorizes: categorises - categorizing: categorising center: centre - civilization: civilisation - civilize: civilise - color: colour - cozy: cosy - cipher: cypher - dependent: dependant - defense: defence + fiber: fibre + luster: lustre + meager: meagre + meter: metre + saber: sabre + saltpeter: saltpetre + sepulcher: sepulchre + theater: theatre + # and their derivatives + calibers: calibres + centers: centres + fibers: fibres + lusters: lustres + meters: metres + theaters: theatres + # -ise vs. -ize + '(\w+)ization\b': "$1isation" + '(\w+)ize\b': "$1ise" + '(\w+)ized\b': "$1ised" + '(\w+)izing\b': "$1ising" + # add other common forms: + '(\w+)izable\b': "$1isable" + # -yse vs. -yze + '(\w+)yze\b': "$1yse" + '(\w+)yzed\b': "$1ysed" + '(\w+)yzing\b': "$1ysing" + # double L vs. Single L distill: distil - draft: draught - encyclopedia: encyclopaedia - inquiry: enquiry enroll: enrol enrollment: enrolment enthrall: enthral - favorite: favourite - fiber: fibre - filet: fillet - flavor: flavour - furor: furore fulfill: fulfil - jail: gaol - gray: grey - humor: humour - honor: honour initialed: initialled initialing: initialling instill: instil - jewelry: jewellery - labeling: labelling labeled: labelled - labor: labour + labeling: labelling libelous: libellous + modeling: modelling + signaling: signalling + traveler: traveller + traveling: travelling + travelled: traveled + # -ogue vs. -og + analog: analogue + catalog: catalogue + demagog: demagogue + dialog: dialogue + monolog: monologue + pedagog: pedagogue + prolog: prologue + # ae/oe vs. e + airplane: aeroplane + anemia: anaemia + anesthesia: anaesthesia + encyclopedia: encyclopaedia + eon: aeon + fetus: foetus + pediatric: paediatric + # -ce vs. -se + defense: defence license: licence + offense: offence + pretense: pretence + # miscellaneous specific words + aging: ageing + aluminum: aluminium + authorizer: authoriser + buses: busses + cipher: cypher + cozy: cosy + dependent: dependant + draft: draught + furor: furore + gray: grey + inquiry: enquiry + jail: gaol + jewelry: jewellery likable: likeable livable: liveable - luster: lustre maneuver: manoeuvre marvelous: marvellous matte: matt - meager: meagre - meter: metre - modeling: modelling mustache: moustache - neighbor: neighbour - normalize: normalise - offense: offence - optimize: optimise - optimized: optimised - optimizing: optimising - organize: organise - oriented: orientated - paralyze: paralyse - plow: plough - pretense: pretence pajamas: pyjamas + plow: plough + programme: program ratable: rateable - realize: realise - recognize: recognise reconnoiter: reconnoitre - rumor: rumour - saber: sabre - salable: saleable - saltpeter: saltpetre - skeptic: sceptic - sepulcher: sepulchre - signaling: signalling sizable: sizeable skillful: skilful - somber: sombre smolder: smoulder + somber: sombre specialty: speciality specter: spectre - splendor: splendour - standardize: standardise - standardized: standardised sulfur: sulphur - theater: theatre - traveled: travelled - traveler: traveller - traveling: travelling unshakable: unshakeable willful: wilful yogurt: yoghurt - authorizer: authoriser diff --git a/.github/styles/custom/dashes.yml b/.github/styles/custom/dashes.yml index c6f3c885..595817f5 100644 --- a/.github/styles/custom/dashes.yml +++ b/.github/styles/custom/dashes.yml @@ -1,6 +1,5 @@ extends: existence -message: "Don't put a space before or after a dash." -link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#dashes" +message: Don't put a space before or after a dash. nonword: true level: warning action: diff --git a/.github/styles/custom/endash.yml b/.github/styles/custom/endash.yml index 86f7ca92..0b6276ed 100644 --- a/.github/styles/custom/endash.yml +++ b/.github/styles/custom/endash.yml @@ -1,7 +1,7 @@ extends: existence -message: "Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor - parentheses, use an em dash ('—')." -link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#dashes" +message: >- + Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor + parenthesis, use an em dash ('—'). nonword: true level: error action: diff --git a/.github/styles/custom/oxford-comma.yml b/.github/styles/custom/oxford-comma.yml index 64e4e2fa..35a1a8e4 100644 --- a/.github/styles/custom/oxford-comma.yml +++ b/.github/styles/custom/oxford-comma.yml @@ -1,6 +1,5 @@ extends: existence -message: "Use the Oxford comma in '%s'." -link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#commas" +message: Use the Oxford comma in '%s'. scope: sentence level: suggestion tokens: diff --git a/.github/styles/custom/spaces.yml b/.github/styles/custom/spaces.yml index 5cc3c6e2..add3ad14 100644 --- a/.github/styles/custom/spaces.yml +++ b/.github/styles/custom/spaces.yml @@ -1,6 +1,5 @@ extends: existence -message: "Use only one space between words and sentences (not two)." -link: "https://github.com/DataDog/documentation/blob/master/CONTRIBUTING.md#spaces" +message: Use only one space between words and sentences (not two). level: error nonword: true tokens: From 77fd9a0a9a4219479914fba6062e7defeee3d561 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 10:21:28 +0100 Subject: [PATCH 08/33] Update british-spellings.yml --- .github/styles/custom/british-spellings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/styles/custom/british-spellings.yml b/.github/styles/custom/british-spellings.yml index a822721f..62319fcf 100644 --- a/.github/styles/custom/british-spellings.yml +++ b/.github/styles/custom/british-spellings.yml @@ -92,7 +92,7 @@ swap: signaling: signalling traveler: traveller traveling: travelling - travelled: traveled + traveled: travelled # -ogue vs. -og analog: analogue catalog: catalogue From 915a6e8a9968ea69bfbf3c5177e72778eb8b1cbd Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 11:03:54 +0100 Subject: [PATCH 09/33] Add gitignore --- .github/styles/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/styles/.gitignore diff --git a/.github/styles/.gitignore b/.github/styles/.gitignore new file mode 100644 index 00000000..9cfb822c --- /dev/null +++ b/.github/styles/.gitignore @@ -0,0 +1,4 @@ +# only track the custom Vale rules +/* +!.gitignore +!custom/ From d83fe9ba0adcdfe0433d11473192c6d273e8b706 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 21:59:10 +0100 Subject: [PATCH 10/33] Fix Vale sync issue --- .github/workflows/linting.yml | 3 +-- .vale.ini | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6585ad9f..fa954f29 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -73,5 +73,4 @@ jobs: with: fail_on_error: true filter_mode: nofilter - reporter: github-check - vale_flags: --glob='!.github/styles/*' + reporter: github-pr-review diff --git a/.vale.ini b/.vale.ini index 751f344c..8f33a482 100644 --- a/.vale.ini +++ b/.vale.ini @@ -9,3 +9,7 @@ BasedOnStyles = proselint,\ # Disable Vale.Spelling = NO + +# `vale sync` in CI means the packages are then linted, so turn them off +[.github/styles/**] +BasedOnStyles = From 703f01e4a58d6437994ae3e087d277f79acaa323 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 3 Jun 2025 23:07:07 +0100 Subject: [PATCH 11/33] Delete .github/styles/custom/british-spellings.yml --- .github/styles/custom/british-spellings.yml | 151 -------------------- 1 file changed, 151 deletions(-) delete mode 100644 .github/styles/custom/british-spellings.yml diff --git a/.github/styles/custom/british-spellings.yml b/.github/styles/custom/british-spellings.yml deleted file mode 100644 index 62319fcf..00000000 --- a/.github/styles/custom/british-spellings.yml +++ /dev/null @@ -1,151 +0,0 @@ ---- -extends: substitution -message: Use the British spelling '%s' instead of the US '%s'. -level: error -ignorecase: true -swap: - # -our vs. -or - ardor: ardour - candor: candour - color: colour - demeanor: demeanour - endeavor: endeavour - favour: favour - fervor: fervour - flavor: flavour - harbor: harbour - honor: honour - humor: humour - labor: labour - neighbor: neighbour - odor: odour - pavor: pavour - rancor: rancour - rigor: rigour - rumor: rumour - savor: savour - splendor: splendour - succor: succour - valour: valour - vapor: vapour - vigor: vigour - # and their derivatives - colored: coloured - coloring: colouring - colors: colours - endeavored: endeavoured - endeavoring: endeavouring - flavored: flavoured - flavoring: flavouring - honored: honoured - honoring: honouring - honors: honours - humors: humours - labored: laboured - laboring: labouring - labors: labours - neighbors: neighbours - rumors: rumours - splendors: splendours - # -re vs. -er - caliber: calibre - center: centre - fiber: fibre - luster: lustre - meager: meagre - meter: metre - saber: sabre - saltpeter: saltpetre - sepulcher: sepulchre - theater: theatre - # and their derivatives - calibers: calibres - centers: centres - fibers: fibres - lusters: lustres - meters: metres - theaters: theatres - # -ise vs. -ize - '(\w+)ization\b': "$1isation" - '(\w+)ize\b': "$1ise" - '(\w+)ized\b': "$1ised" - '(\w+)izing\b': "$1ising" - # add other common forms: - '(\w+)izable\b': "$1isable" - # -yse vs. -yze - '(\w+)yze\b': "$1yse" - '(\w+)yzed\b': "$1ysed" - '(\w+)yzing\b': "$1ysing" - # double L vs. Single L - distill: distil - enroll: enrol - enrollment: enrolment - enthrall: enthral - fulfill: fulfil - initialed: initialled - initialing: initialling - instill: instil - labeled: labelled - labeling: labelling - libelous: libellous - modeling: modelling - signaling: signalling - traveler: traveller - traveling: travelling - traveled: travelled - # -ogue vs. -og - analog: analogue - catalog: catalogue - demagog: demagogue - dialog: dialogue - monolog: monologue - pedagog: pedagogue - prolog: prologue - # ae/oe vs. e - airplane: aeroplane - anemia: anaemia - anesthesia: anaesthesia - encyclopedia: encyclopaedia - eon: aeon - fetus: foetus - pediatric: paediatric - # -ce vs. -se - defense: defence - license: licence - offense: offence - pretense: pretence - # miscellaneous specific words - aging: ageing - aluminum: aluminium - authorizer: authoriser - buses: busses - cipher: cypher - cozy: cosy - dependent: dependant - draft: draught - furor: furore - gray: grey - inquiry: enquiry - jail: gaol - jewelry: jewellery - likable: likeable - livable: liveable - maneuver: manoeuvre - marvelous: marvellous - matte: matt - mustache: moustache - pajamas: pyjamas - plow: plough - programme: program - ratable: rateable - reconnoiter: reconnoitre - sizable: sizeable - skillful: skilful - smolder: smoulder - somber: sombre - specialty: speciality - specter: spectre - sulfur: sulphur - unshakable: unshakeable - willful: wilful - yogurt: yoghurt From e1d5b39181e61d30d920b0b3d066120293f2c2c0 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:34:37 +0100 Subject: [PATCH 12/33] Remove custom files --- .github/styles/custom/dashes.yml | 11 ------ .github/styles/custom/endash.yml | 14 -------- .github/styles/custom/no-contractions.yml | 41 ----------------------- .github/styles/custom/oxford-comma.yml | 6 ---- .github/styles/custom/quotes.yml | 10 ------ .github/styles/custom/spaces.yml | 6 ---- 6 files changed, 88 deletions(-) delete mode 100644 .github/styles/custom/dashes.yml delete mode 100644 .github/styles/custom/endash.yml delete mode 100644 .github/styles/custom/no-contractions.yml delete mode 100644 .github/styles/custom/oxford-comma.yml delete mode 100644 .github/styles/custom/quotes.yml delete mode 100644 .github/styles/custom/spaces.yml diff --git a/.github/styles/custom/dashes.yml b/.github/styles/custom/dashes.yml deleted file mode 100644 index 595817f5..00000000 --- a/.github/styles/custom/dashes.yml +++ /dev/null @@ -1,11 +0,0 @@ -extends: existence -message: Don't put a space before or after a dash. -nonword: true -level: warning -action: - name: edit - params: - - remove - - " " -tokens: - - '\s[—–]\s' diff --git a/.github/styles/custom/endash.yml b/.github/styles/custom/endash.yml deleted file mode 100644 index 0b6276ed..00000000 --- a/.github/styles/custom/endash.yml +++ /dev/null @@ -1,14 +0,0 @@ -extends: existence -message: >- - Avoid en dashes ('–'). For hyphenated words, use a hyphen ('-').\nFor - parenthesis, use an em dash ('—'). -nonword: true -level: error -action: - name: edit - params: - - replace - - "-" - - "—" -tokens: - - "–" diff --git a/.github/styles/custom/no-contractions.yml b/.github/styles/custom/no-contractions.yml deleted file mode 100644 index 31075f2a..00000000 --- a/.github/styles/custom/no-contractions.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -extends: substitution -message: Use '%s' instead of '%s.' -level: error -ignorecase: true -swap: - aren't: are not, - can't: cannot, - couldn't: could not, - didn't: did not, - doesn't: does not, - don't: do not, - hasn't: has not, - haven't: have not, - how'll: how will, - how's: how is, - isn't: is not, - it'll: it will, - it's: it is, - shouldn't: should not - that'll: that will, - that's: that is, - they'll: they will, - they're: they are, - wasn't: was not, - we'll: we will, - we're: we are, - we've: we have, - weren't: were not, - what'll: what will, - what's: what is, - when'll: when will, - when's: when is, - where'll: where will, - where's: where is, - who'll: who will, - who's: who is, - why'll: why will, - why's: why is, - won't: will not, - you're: you are diff --git a/.github/styles/custom/oxford-comma.yml b/.github/styles/custom/oxford-comma.yml deleted file mode 100644 index 35a1a8e4..00000000 --- a/.github/styles/custom/oxford-comma.yml +++ /dev/null @@ -1,6 +0,0 @@ -extends: existence -message: Use the Oxford comma in '%s'. -scope: sentence -level: suggestion -tokens: - - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/.github/styles/custom/quotes.yml b/.github/styles/custom/quotes.yml deleted file mode 100644 index ec5d6125..00000000 --- a/.github/styles/custom/quotes.yml +++ /dev/null @@ -1,10 +0,0 @@ -extends: existence -message: Use straight quotes instead of smart quotes. -level: error -nonword: true -action: -tokens: - - “ - - ” - - ‘ - - ’ diff --git a/.github/styles/custom/spaces.yml b/.github/styles/custom/spaces.yml deleted file mode 100644 index add3ad14..00000000 --- a/.github/styles/custom/spaces.yml +++ /dev/null @@ -1,6 +0,0 @@ -extends: existence -message: Use only one space between words and sentences (not two). -level: error -nonword: true -tokens: - - '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' From 31dd23564a63e09dda59378c3f86eea124c4a2f5 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:35:10 +0100 Subject: [PATCH 13/33] Update gitignore --- .github/styles/.gitignore | 4 ---- .gitignore | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 .github/styles/.gitignore diff --git a/.github/styles/.gitignore b/.github/styles/.gitignore deleted file mode 100644 index 9cfb822c..00000000 --- a/.github/styles/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# only track the custom Vale rules -/* -!.gitignore -!custom/ diff --git a/.gitignore b/.gitignore index c037985d..1d572d23 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,11 @@ python-template *.DS_Store + +# https://vale.sh/docs/keys/packages#vcs +.github/styles/* +!.github/styles/config/ +.github/styles/config/* +!.github/styles/config/vocabularies/ +.github/styles/config/vocabularies/* +!.github/styles/config/vocabularies/Base \ No newline at end of file From 6fead661f41aa5eeb8189a0a3fa275852cdfeff5 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:35:57 +0100 Subject: [PATCH 14/33] Expand vale.ini --- .vale.ini | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.vale.ini b/.vale.ini index 8f33a482..53e313d2 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,14 +1,34 @@ StylesPath = .github/styles # https://github.com/errata-ai/packages -Packages = proselint +Packages = proselint,\ + RedHat,\ + write-good -[*.md] +[formats] +qmd = md + +[*.{md,qmd}] BasedOnStyles = proselint,\ - Vale + RedHat,\ + Vale,\ + write-good # Disable +RedHat.Definitions = NO +RedHat.Ellipses = NO +RedHat.GitLinks = NO +RedHat.Headings = NO +RedHat.PascalCamelCase = NO +RedHat.PassiveVoice = NO +RedHat.ReadabilityGrade = NO +RedHat.Slash = NO +RedHat.Spelling = NO +RedHat.TermsErrors = NO Vale.Spelling = NO +write-good.E-Prime = NO +write-good.Passive = NO +write-good.TooWordy = NO # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**] From 815e29514ddc76fef7be7bc6e3a138b10b32bf1a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 20:36:34 +0000 Subject: [PATCH 15/33] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1d572d23..1f9bd3bf 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,4 @@ python-template .github/styles/config/* !.github/styles/config/vocabularies/ .github/styles/config/vocabularies/* -!.github/styles/config/vocabularies/Base \ No newline at end of file +!.github/styles/config/vocabularies/Base From 2076cd7491e32bf996b124ba3c059450f343c77b Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:40:48 +0100 Subject: [PATCH 16/33] Revert changes --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- LICENSE.md | 2 +- README.md | 4 ---- docs/LICENSE | 2 +- docs/pages/ci.md | 2 +- docs/pages/docs.md | 4 ++-- docs/pages/libraries/parallel-async.md | 2 +- docs/pages/virtual.md | 2 +- .../.github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../.github/ISSUE_TEMPLATE/feature_request.yml | 2 +- tests/data/test_package_generation/LICENSE.md | 2 +- tutorial.md | 8 ++++---- .../.github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../.github/ISSUE_TEMPLATE/feature_request.yml | 2 +- {{cookiecutter.project_slug}}/LICENSE.md | 10 +++++----- 15 files changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 08a57c7f..de0b5193 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when […] + placeholder: I'm always frustrated when [...] validations: required: true - id: solution diff --git a/LICENSE.md b/LICENSE.md index 42ba92da..d3598157 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright © 2023-2025 UCL Centre for Advanced Research Computing +Copyright (c) 2023-2025 UCL Centre for Advanced Research Computing Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index cee6e1fe..953ce3a6 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,11 @@ repo, and we welcome questions there or in the `#helpme` channel on the 🍪 Our template is a [cookiecutter] template which automatically creates new Python packages with our recommended tooling set up and ready to go. - - > [!NOTE] > If you're making a package within a community that has an existing > package template (e.g., [`scikit-hep`](https://github.com/scikit-hep/cookie)), > we recommend using their template instead of this one. - - ## Tutorial Some quick instructions for using our template are below. diff --git a/docs/LICENSE b/docs/LICENSE index e51f0e9d..0910402e 100644 --- a/docs/LICENSE +++ b/docs/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright © 2022-2025 just-the-docs +Copyright (c) 2022-2025 just-the-docs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/pages/ci.md b/docs/pages/ci.md index ad8825dc..523fb7aa 100644 --- a/docs/pages/ci.md +++ b/docs/pages/ci.md @@ -27,7 +27,7 @@ during tests. | Name | Short description | 🚦 | | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------: | | [Codecov](https://docs.codecov.com/docs) | Hosted service to report code coverage metrics. Occasionally slow to update after a report is updated, can be configured to add extra CI checks. This service is probably more widely used and is [free for both open-source and private projects](https://about.codecov.io/pricing/). | Best | -| [Coveralls](https://docs.coveralls.io/) | Hosted service to report code coverage metrics. Similar to codecov and we don't strongly recommend one over the other. This service is only [free for open-source projects](https://coveralls.io/pricing). | Best | +| [Coveralls](https://docs.coveralls.io/) | Hosted service to report code coverage metrics. Very similar to codecov and we don't strongly recommend one over the other. This service is only [free for open-source projects](https://coveralls.io/pricing). | Best |
Best explanation Both services are similar, so both Best. diff --git a/docs/pages/docs.md b/docs/pages/docs.md index 57a87464..c80b5bce 100644 --- a/docs/pages/docs.md +++ b/docs/pages/docs.md @@ -5,7 +5,7 @@ layout: default ## Documentation -With Python, as with many other languages, it's common to automatically +With Python, as with many other languages, it's very common to automatically create a web page with documentation. This can include reference for the API taken from your package's [docstrings], tutorials, examples, and more in depth explanation about how the package works. For an in-depth discussion of the @@ -28,7 +28,7 @@ If you're using GitHub, one option is to host your docs on [GitHub pages]. | Name | Short description | 🚦 | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------: | | [MkDocs] | Generates documentation from Markdown files, with a plugin to generate API documentation. A good plugin ecosystem and balance of usability and customisability. | Best | -| [Sphinx] | Generates documentation from reStructuredText or Markdown files, long been the de-facto standard and widely used. Mature plugin ecosystem. | Good | +| [Sphinx] | Generates documentation from reStructuredText or Markdown files, long been the de-facto standard and very widely used. Mature plugin ecosystem. | Good | | [gitbook] | General documentation builder; integrates with GitHub. | Good | | [pdoc] | Auto-generates API documentation from docstrings, beginner friendly but with less of a plugin ecosystem than others. | Good | diff --git a/docs/pages/libraries/parallel-async.md b/docs/pages/libraries/parallel-async.md index 47cef7e3..6af45f56 100644 --- a/docs/pages/libraries/parallel-async.md +++ b/docs/pages/libraries/parallel-async.md @@ -26,7 +26,7 @@ simply due to pre-existing code using a library like [pandas]. | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------: | | [multiprocess] | A fork of [multiprocessing] which uses `dill` instead of `pickle` to allow serializing wider range of object types including nested / anonymous functions. We've found this easier to use than `multiprocessing`. | Best | | [concurrent.futures] | [See the table below](#asynchronous-processing). | Good | -| [dask] | Aims to make scaling existing code in familiar libraries (`numpy`, [pandas], `scikit-learn`, …) easy. | Good | +| [dask] | Aims to make scaling existing code in familiar libraries (`numpy`, [pandas], `scikit-learn`, ...) easy. | Good | | [multiprocessing] | The standard library module for distributing tasks across multiple processes. | Good | | [mpi4py] | Support for MPI based parallelism. | Good | | [threading] | The standard library module for multi-threading. Due to the _global interpreter lock_ [currently][PEP703] only one thread can execute Python code at a time. | Avoid | diff --git a/docs/pages/virtual.md b/docs/pages/virtual.md index c7aea452..f0c5aaa8 100644 --- a/docs/pages/virtual.md +++ b/docs/pages/virtual.md @@ -13,7 +13,7 @@ layout: default | [pixi] | A fast drop-in replacement for `conda`. | Good | | [pyenv] | Lets you easily switch between multiple versions of Python. | Good | | [virtualenv] | Creates isolated Python environments, and offers more features than venv. | Good | -| [venv] | Creates isolated Python environments. Fewer features than other tools, but widely used and comes built into Python. | Good | +| [venv] | Creates isolated Python environments. Fewer features than other tools, but very widely used and comes built into Python. | Good | | [anaconda] | Due to recent [licensing ambiguity][anaconda-problems], we recommend avoiding anaconda and many of the default channels. We recommend installing miniforge and sticking to the `conda-forge` channel. | Avoid | diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml index 0ad87f0e..073866e0 100644 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: value: |- import cookiecutter_test - … + ... render: Python validations: required: true diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml index 1ec4f0cc..8e1ad7fe 100644 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when […] + placeholder: I'm always frustrated when [...] validations: required: true - id: solution diff --git a/tests/data/test_package_generation/LICENSE.md b/tests/data/test_package_generation/LICENSE.md index 254926ea..7256f96b 100644 --- a/tests/data/test_package_generation/LICENSE.md +++ b/tests/data/test_package_generation/LICENSE.md @@ -1,6 +1,6 @@ # MIT License -Copyright © 2025 Eva Lu Ator +Copyright (c) 2025 Eva Lu Ator Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/tutorial.md b/tutorial.md index eeb8a6a8..89a5bb89 100644 --- a/tutorial.md +++ b/tutorial.md @@ -7,7 +7,7 @@ In this tutorial we will go through in detail the steps required to set-up a Pyt ## ⚙️ Setting up dependencies for using template -
Click to expand… +
Click to expand... To use the template you will need to install the following software tools @@ -80,7 +80,7 @@ We will first go through the steps for creating a new package using the `UCL-ARC You will then be shown a series of prompts at the command line asking for details of the project and package. You can choose to use the default placeholder value (shown in parenthesis `()` in prompt) for any question by hitting `Enter`. If you already have a specific project in mind you want to set up a package for using the template you can use this project's details, otherwise you can just use the placeholder values. You should choose `Y` (yes) to the questions on whether to initialise Git repository and automatically deploy HTML documentation to GitHub Pages to allow you to complete the follow on exercises which rely on these options being enabled. For the prompt asking for the GitHub user or organization name to be owner of repository you should supply your GitHub user name. -3. Once you have completed all the cookiecutter prompts some additional instructions will be printed to screen (which we will come back to in the next sections) and your new package will be generated in a directory named `{project_slug}` in the current working directory (where `{project_slug}` is the value entered for the `'Slugified' project name…`[^slug] prompt, this will be `python-template` if you used the default placeholder values). You can see the directory tree of files generated by running +3. Once you have completed all the cookiecutter prompts some additional instructions will be printed to screen (which we will come back to in the next sections) and your new package will be generated in a directory named `{project_slug}` in the current working directory (where `{project_slug}` is the value entered for the `'Slugified' project name...`[^slug] prompt, this will be `python-template` if you used the default placeholder values). You can see the directory tree of files generated by running ```sh tree {project_slug} @@ -129,7 +129,7 @@ GitHub CLI detected, you can create a repo with the following: gh repo create {github_owner}/{project_slug} -d "{project_description}" --public -r origin --source {project_slug} ``` -where `{github_owner}`, `{project_slug}` and `{project_description}` are replaced with the relevant GitHub repository owner (user name), project slug and description that you entered when setting up the package using `cookiecutter`. You should now copy-paste and run the `gh repo create …` command that was printed out in the message - if you no longer have access to the message you can use the example above, being careful to subsitute the placeholders in braces `{}` with the relevant values. +where `{github_owner}`, `{project_slug}` and `{project_description}` are replaced with the relevant GitHub repository owner (user name), project slug and description that you entered when setting up the package using `cookiecutter`. You should now copy-paste and run the `gh repo create ...` command that was printed out in the message - if you no longer have access to the message you can use the example above, being careful to subsitute the placeholders in braces `{}` with the relevant values. If you get an error message at this point it may be because you have not installed the GitHub CLI or set up the authorisation for the GitHub CLI as [described in the setup instructions above](#%EF%B8%8F-setting-up-dependencies-for-using-template). @@ -270,7 +270,7 @@ Once you have activated the environment you should make sure the version of the python -m pip install --upgrade pip ``` -Similar to `uv`, once the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running +Similar to `uv`, once the the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running ```sh python -m pip install --editable ".[dev,docs,test]" diff --git a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml index 3417d85a..16f16f13 100644 --- a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: value: |- import {{cookiecutter.package_name}} - … + ... render: Python validations: required: true diff --git a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml index 1ec4f0cc..8e1ad7fe 100644 --- a/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/{{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: attributes: label: Is Your Feature Request Related to a Problem? Please Describe description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when […] + placeholder: I'm always frustrated when [...] validations: required: true - id: solution diff --git a/{{cookiecutter.project_slug}}/LICENSE.md b/{{cookiecutter.project_slug}}/LICENSE.md index 1915a14a..a8d6580e 100644 --- a/{{cookiecutter.project_slug}}/LICENSE.md +++ b/{{cookiecutter.project_slug}}/LICENSE.md @@ -4,7 +4,7 @@ # MIT License -Copyright © {% now 'utc', '%Y' %} {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} +Copyright (c) {% now 'utc', '%Y' %} {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. {%- elif cookiecutter.license == "BSD-3-Clause" -%} -Copyright © {% now 'utc', '%Y' %}, {{cookiecutter.author_given_names}} +Copyright (c) {% now 'utc', '%Y' %}, {{cookiecutter.author_given_names}} {{cookiecutter.author_family_names}} All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -629,7 +629,7 @@ warranty; and each file should have at least the “copyright” line and a poin to where the full notice is found. - Copyright © + Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -649,14 +649,14 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright © + Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands `show w` and `show c` should show the appropriate parts of the General Public License. Of course, your program's commands might be -different; for a GUI, you would use an “about box”. +different; for a GUI interface, you would use an “about box”. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more From fa2ec110acd436076bf8e08ec678d38e07804175 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:46:34 +0100 Subject: [PATCH 17/33] Disable licence files --- .vale.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vale.ini b/.vale.ini index 53e313d2..57aa6e37 100644 --- a/.vale.ini +++ b/.vale.ini @@ -33,3 +33,7 @@ write-good.TooWordy = NO # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**] BasedOnStyles = + +# Don't modify licence files +[**/LICENSE*] +BasedOnStyles = From 8539fe00cea17e6d575c5739fe4ffa45f3434f4a Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:54:10 +0100 Subject: [PATCH 18/33] Remove RedHat --- .vale.ini | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.vale.ini b/.vale.ini index 57aa6e37..548d7187 100644 --- a/.vale.ini +++ b/.vale.ini @@ -10,21 +10,10 @@ qmd = md [*.{md,qmd}] BasedOnStyles = proselint,\ - RedHat,\ Vale,\ write-good # Disable -RedHat.Definitions = NO -RedHat.Ellipses = NO -RedHat.GitLinks = NO -RedHat.Headings = NO -RedHat.PascalCamelCase = NO -RedHat.PassiveVoice = NO -RedHat.ReadabilityGrade = NO -RedHat.Slash = NO -RedHat.Spelling = NO -RedHat.TermsErrors = NO Vale.Spelling = NO write-good.E-Prime = NO write-good.Passive = NO From db6287005644ecea562edb202651859164f38897 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 21:55:15 +0100 Subject: [PATCH 19/33] Remove RedHat properly --- .vale.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 548d7187..3dc96b77 100644 --- a/.vale.ini +++ b/.vale.ini @@ -2,7 +2,6 @@ StylesPath = .github/styles # https://github.com/errata-ai/packages Packages = proselint,\ - RedHat,\ write-good [formats] From 1f0983c8b02ee65ca1c0b8b7ef744341ff374235 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:00:28 +0100 Subject: [PATCH 20/33] Try REVIEWDOG_GITHUB_API_TOKEN var --- .github/workflows/linting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index fa954f29..b9bfb61a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -70,6 +70,7 @@ jobs: uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: fail_on_error: true filter_mode: nofilter From 3d1617e3cc6cee615baf65b25d64c68da3a5a5ad Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:02:33 +0100 Subject: [PATCH 21/33] Revert "Try REVIEWDOG_GITHUB_API_TOKEN var" This reverts commit 1f0983c8b02ee65ca1c0b8b7ef744341ff374235. --- .github/workflows/linting.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b9bfb61a..fa954f29 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -70,7 +70,6 @@ jobs: uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: fail_on_error: true filter_mode: nofilter From a2af066e99fd199e20151f2ec32a3dc040ca9205 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:05:05 +0100 Subject: [PATCH 22/33] Change to `github-check` --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index fa954f29..9d31e5a2 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -73,4 +73,4 @@ jobs: with: fail_on_error: true filter_mode: nofilter - reporter: github-pr-review + reporter: github-check From f5201d8db469bba336bbdb33ee38aa7e899f7251 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:06:24 +0100 Subject: [PATCH 23/33] Turn off error --- .github/workflows/linting.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9d31e5a2..2f59f697 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -71,6 +71,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - fail_on_error: true filter_mode: nofilter reporter: github-check From 7b25e034e1e42abf9f038bd54ea7c94ee34b659b Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:31:55 +0100 Subject: [PATCH 24/33] Try github-pr-review again --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 2f59f697..d91aa297 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -72,4 +72,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: filter_mode: nofilter - reporter: github-check + reporter: github-pr-review From 808b1e7bb947e668046a77e348e5d743235e9048 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Thu, 5 Jun 2025 22:33:07 +0100 Subject: [PATCH 25/33] Revert "Try github-pr-review again" This reverts commit 7b25e034e1e42abf9f038bd54ea7c94ee34b659b. --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d91aa297..2f59f697 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -72,4 +72,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: filter_mode: nofilter - reporter: github-pr-review + reporter: github-check From bf1841f36f3b7674afd87032b480baa968172f10 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 09:05:50 +0100 Subject: [PATCH 26/33] Remove quarto references --- .vale.ini | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.vale.ini b/.vale.ini index 3dc96b77..b6ad161a 100644 --- a/.vale.ini +++ b/.vale.ini @@ -4,10 +4,7 @@ StylesPath = .github/styles Packages = proselint,\ write-good -[formats] -qmd = md - -[*.{md,qmd}] +[*.md] BasedOnStyles = proselint,\ Vale,\ write-good From f8aad483e54811896b0960c8ff3cd7f825909208 Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Fri, 6 Jun 2025 09:31:24 +0100 Subject: [PATCH 27/33] Genuine bug: "the the" --- tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial.md b/tutorial.md index 89a5bb89..0a45d554 100644 --- a/tutorial.md +++ b/tutorial.md @@ -270,7 +270,7 @@ Once you have activated the environment you should make sure the version of the python -m pip install --upgrade pip ``` -Similar to `uv`, once the the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running +Similar to `uv`, once the environment is active, you can install the package in editable mode, along with both its required dependencies and optional sets of dependencies by running ```sh python -m pip install --editable ".[dev,docs,test]" From a20c799d42f448b2806933c798b5b15f6979d5f1 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 10:44:11 +0100 Subject: [PATCH 28/33] Turn off rules for `> NOTE` --- .vale.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.vale.ini b/.vale.ini index b6ad161a..d20c69f3 100644 --- a/.vale.ini +++ b/.vale.ini @@ -15,6 +15,9 @@ write-good.E-Prime = NO write-good.Passive = NO write-good.TooWordy = NO +# Ignore lines starting with "> [!NOTE]" +BlockIgnores = (?s)> \[!NOTE\].*?(\n|$) + # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**] BasedOnStyles = From 73fd5c15c15d5905a4ab1c9ad758a4f4a1cdf3ae Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 11:20:14 +0100 Subject: [PATCH 29/33] Exclude all GitHub magic callouts Co-authored-by: Sam Cunliffe --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index d20c69f3..c9355e5e 100644 --- a/.vale.ini +++ b/.vale.ini @@ -16,7 +16,7 @@ write-good.Passive = NO write-good.TooWordy = NO # Ignore lines starting with "> [!NOTE]" -BlockIgnores = (?s)> \[!NOTE\].*?(\n|$) +BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\].*?(\n|$) # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**] From 3adfd7b885627824209ab4de87306163a521a25f Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 11:48:31 +0100 Subject: [PATCH 30/33] Improve comment Co-authored-by: Matt Graham --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index c9355e5e..75dd75f6 100644 --- a/.vale.ini +++ b/.vale.ini @@ -15,7 +15,7 @@ write-good.E-Prime = NO write-good.Passive = NO write-good.TooWordy = NO -# Ignore lines starting with "> [!NOTE]" +# Ignore lines starting with GitHub alerts syntax BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\].*?(\n|$) # `vale sync` in CI means the packages are then linted, so turn them off From f53e93940daea57251755c36111ed98ddaebc93f Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 11:47:58 +0100 Subject: [PATCH 31/33] Exclude CODE_OF_CONDUCT --- .vale.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vale.ini b/.vale.ini index 75dd75f6..eb2ab4c3 100644 --- a/.vale.ini +++ b/.vale.ini @@ -22,6 +22,6 @@ BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\].*?(\n|$) [.github/styles/**] BasedOnStyles = -# Don't modify licence files -[**/LICENSE*] +# Don't modify generated files +[**/{CODE_OF_CONDUCT,LICENSE}*] BasedOnStyles = From 37488879b1560084db663266842d8db5262a9b8e Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 11:55:59 +0100 Subject: [PATCH 32/33] Use @matt-graham's regex --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index eb2ab4c3..4be8be39 100644 --- a/.vale.ini +++ b/.vale.ini @@ -16,7 +16,7 @@ write-good.Passive = NO write-good.TooWordy = NO # Ignore lines starting with GitHub alerts syntax -BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\].*?(\n|$) +BlockIgnores = ^ *> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\] *$ # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**] From 245674e88cf263e9162bfdb9617e1ee3ceb2fb48 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 6 Jun 2025 12:03:27 +0100 Subject: [PATCH 33/33] Revert markdown change --- .vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vale.ini b/.vale.ini index 4be8be39..f10a4e56 100644 --- a/.vale.ini +++ b/.vale.ini @@ -16,7 +16,7 @@ write-good.Passive = NO write-good.TooWordy = NO # Ignore lines starting with GitHub alerts syntax -BlockIgnores = ^ *> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\] *$ +BlockIgnores = (?s)> \[!(CAUTION|IMPORTANT|NOTE|TIP|WARNING)\](\n|$) # `vale sync` in CI means the packages are then linted, so turn them off [.github/styles/**]