-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5600 from MFraters/add_typos_tester
Add typos spell checker.
- Loading branch information
Showing
29 changed files
with
99 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Spell Check with Typos | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.actor }}-${{ github.ref }}-typos | ||
cancel-in-progress: true | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
typos-check: | ||
name: Check for new typos | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout the Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Check spelling with typos | ||
#uses: crate-ci/typos@master | ||
env: | ||
GH_TOKEN: "${{ github.token }}" | ||
run: | | ||
mkdir -p "${{ runner.temp }}/typos" | ||
RELEASE_ASSET_URL="$( | ||
gh api /repos/crate-ci/typos/releases/latest \ | ||
--jq '."assets"[] | select(."name" | test("^typos-.+-x86_64-unknown-linux-musl\\.tar\\.gz$")) | ."browser_download_url"' | ||
)" | ||
wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \ | ||
--quiet --output-document=- "${RELEASE_ASSET_URL}" \ | ||
| tar -xz -C "${{ runner.temp }}/typos" ./typos | ||
"${{ runner.temp }}/typos/typos" --version | ||
"${{ runner.temp }}/typos/typos" --config .typos.toml --format json >> ${{ runner.temp }}/typos.jsonl || true | ||
python -c ' | ||
import sys, json | ||
old = set() | ||
clean = True | ||
with open(sys.argv[1]) as file: | ||
for line in file: | ||
new = json.loads(line) | ||
if new["type"] == "typo": | ||
clean = False | ||
print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( | ||
new["path"], new["line_num"], new["byte_offset"], | ||
new["typo"], " or ".join(new["corrections"]))) | ||
sys.exit(1 if not clean else 0)' "${{ runner.temp }}/typos.jsonl" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Improved: The iteration scheme in the diffusion dislocation material model now uses the derivative of the logarithm of the strain rate to the logarithm of the stress. This improves efficiency and stablility of the iterative scheme. The parameter "Strain rate residual tolerance" now corresponds to the residual for the logarithm of the strain rate (which close to the solution corresponds to the relative residual). | ||
Improved: The iteration scheme in the diffusion dislocation material model now uses the derivative of the logarithm of the strain rate to the logarithm of the stress. This improves efficiency and stability of the iterative scheme. The parameter "Strain rate residual tolerance" now corresponds to the residual for the logarithm of the strain rate (which close to the solution corresponds to the relative residual). | ||
<br> | ||
(Haoyuan Li and Bob Myhill, 2023/07/18) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.