Skip to content

Commit

Permalink
ltex workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo committed Apr 25, 2024
1 parent 4dcde16 commit 3e0f134
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ltex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ltex

on:
pull_request:
branches:
- master
- main

jobs:
build:
runs-on: macos-latest
steps:
- name: Checking out repository
uses: actions/checkout@v4
- name: Install ltex-ls
run: |
brew install ltex-ls
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Run ltex-ls
id: run-ltex-ls
run: |
unset JAVA_HOME
ltex-cli --client-configuration=paper/ltex.json paper | tee ltex-cli.log
- name: Build comment
id: build-comment
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
result-encoding: string
script: |
const fs = require('fs');
return "<details>\n<summary>ltex output</summary>\n\n```\n" + fs.readFileSync("${{ github.workspace }}/ltex-cli.log", "utf8").toString() + "\n```\n</details>";
- name: Comment in PR
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: ${{ steps.build-comment.outputs.result }}
42 changes: 42 additions & 0 deletions paper/ltex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"ltex.language": "en-US",
"ltex.dictionary": {
"en-US": [
"Coimbra",
"GERAD",
"MAGI",
"NSERC",
"Polytechnique",
"TikZ",
"adaptively",
"boundedness",
"componentwise",
"Fréchet",
"linesearch",
"lsc",
"nonconvex",
"nonconvexity",
"nonnegative",
"nonpositive",
"Nonsmooth",
"nonsmooth",
"optimality",
"Powell-symmetric-Broyden",
"prox-bounded",
"pseudonorm",
"pseudonorms",
"regularizer",
"regularizers",
"roundoff",
"steplength",
"steplengths",
"subdifferential",
"subdifferentials",
"subproblem",
"subproblems",
"thresholding",
]
},
"ltex.additionalRules.enablePickyRules": true,
"ltex.additionalRules.motherTongue": "fr"
}
4 changes: 2 additions & 2 deletions paper/report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
\title{\papertitle}
\author{%
Author One\footnote{%
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montr\'eal. E-mail: \href{mailto:geoffroy.leconte@polymtl.ca}{geoffroy.leconte@polymtl.ca}.
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montréal. E-mail: \href{mailto:geoffroy.leconte@polymtl.ca}{geoffroy.leconte@polymtl.ca}.
}
\and
Dominique Orban\footnote{%
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montr\'eal. E-mail: \href{mailto:dominique.orban@gerad.ca}{dominique.orban@gerad.ca}.
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montréal. E-mail: \href{mailto:dominique.orban@gerad.ca}{dominique.orban@gerad.ca}.
}
\thanks{Research supported by an NSERC Discovery grant.}
}
Expand Down

0 comments on commit 3e0f134

Please sign in to comment.