texact 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. texact-0.1.0/.github/dependabot.yml +11 -0
  2. texact-0.1.0/.github/workflows/cli_test.yml +59 -0
  3. texact-0.1.0/.github/workflows/documentation.yml +43 -0
  4. texact-0.1.0/.github/workflows/release-publish-to-pypi.yml +58 -0
  5. texact-0.1.0/.gitignore +4 -0
  6. texact-0.1.0/.pre-commit-config.yaml +43 -0
  7. texact-0.1.0/.pre-commit-hooks.yaml +6 -0
  8. texact-0.1.0/CHANGELOG.md +23 -0
  9. texact-0.1.0/LICENSE.txt +21 -0
  10. texact-0.1.0/PKG-INFO +61 -0
  11. texact-0.1.0/README.md +43 -0
  12. texact-0.1.0/config/chktexrc +799 -0
  13. texact-0.1.0/docs/Makefile +20 -0
  14. texact-0.1.0/docs/_static/custom.css +5 -0
  15. texact-0.1.0/docs/_static/texact.ico +0 -0
  16. texact-0.1.0/docs/_static/texact.svg +2736 -0
  17. texact-0.1.0/docs/_static/texactlogo.svg +2907 -0
  18. texact-0.1.0/docs/changelog.rst +5 -0
  19. texact-0.1.0/docs/conf.py +58 -0
  20. texact-0.1.0/docs/development.rst +75 -0
  21. texact-0.1.0/docs/index.rst +86 -0
  22. texact-0.1.0/docs/integration.rst +42 -0
  23. texact-0.1.0/docs/licenses.rst +6 -0
  24. texact-0.1.0/docs/make.bat +35 -0
  25. texact-0.1.0/docs/options.rst +48 -0
  26. texact-0.1.0/docs/rules/abstract-first-line-this-work.md +18 -0
  27. texact-0.1.0/docs/rules/biography-image-not-found.md +18 -0
  28. texact-0.1.0/docs/rules/caption-before-graphics.md +17 -0
  29. texact-0.1.0/docs/rules/chktex-command-not-found.md +16 -0
  30. texact-0.1.0/docs/rules/chktex-config-not-found.md +16 -0
  31. texact-0.1.0/docs/rules/chktex-diagnostic.md +20 -0
  32. texact-0.1.0/docs/rules/chktex-execution-failed.md +17 -0
  33. texact-0.1.0/docs/rules/chktex-not-installed.md +15 -0
  34. texact-0.1.0/docs/rules/excessive-we-usage.md +17 -0
  35. texact-0.1.0/docs/rules/inconsistent-caption-period.md +17 -0
  36. texact-0.1.0/docs/rules/incorrect-casing.md +16 -0
  37. texact-0.1.0/docs/rules/index.md +93 -0
  38. texact-0.1.0/docs/rules/invalid-biography-image-ratio.md +16 -0
  39. texact-0.1.0/docs/rules/invalid-figure-position.md +18 -0
  40. texact-0.1.0/docs/rules/missing-figure-caption.md +19 -0
  41. texact-0.1.0/docs/rules/missing-figure-label.md +19 -0
  42. texact-0.1.0/docs/rules/modal-or-uncertain-word.md +16 -0
  43. texact-0.1.0/docs/rules/scaled-figure-image.md +17 -0
  44. texact-0.1.0/docs/rules/undefined-label-reference.md +16 -0
  45. texact-0.1.0/docs/rules/underscore-in-label.md +16 -0
  46. texact-0.1.0/docs/rules/unreferenced-label.md +17 -0
  47. texact-0.1.0/pyproject.toml +45 -0
  48. texact-0.1.0/setup.cfg +4 -0
  49. texact-0.1.0/source/configuration.py +177 -0
  50. texact-0.1.0/source/printer.py +78 -0
  51. texact-0.1.0/source/reviewers/__init__.py +1 -0
  52. texact-0.1.0/source/reviewers/reviewer.py +76 -0
  53. texact-0.1.0/source/reviewers/reviewer_casing.py +165 -0
  54. texact-0.1.0/source/reviewers/reviewer_chktex.py +330 -0
  55. texact-0.1.0/source/reviewers/reviewer_figure.py +348 -0
  56. texact-0.1.0/source/reviewers/reviewer_inthis.py +56 -0
  57. texact-0.1.0/source/reviewers/reviewer_reflabel.py +106 -0
  58. texact-0.1.0/source/reviewers/reviewer_unsure.py +99 -0
  59. texact-0.1.0/source/reviewers/rules.py +264 -0
  60. texact-0.1.0/source/template_check.py +36 -0
  61. texact-0.1.0/source/texact.egg-info/PKG-INFO +61 -0
  62. texact-0.1.0/source/texact.egg-info/SOURCES.txt +81 -0
  63. texact-0.1.0/source/texact.egg-info/dependency_links.txt +1 -0
  64. texact-0.1.0/source/texact.egg-info/entry_points.txt +2 -0
  65. texact-0.1.0/source/texact.egg-info/requires.txt +9 -0
  66. texact-0.1.0/source/texact.egg-info/scm_file_list.json +77 -0
  67. texact-0.1.0/source/texact.egg-info/scm_version.json +8 -0
  68. texact-0.1.0/source/texact.egg-info/top_level.txt +6 -0
  69. texact-0.1.0/source/texact.py +195 -0
  70. texact-0.1.0/source/texact_config/__init__.py +0 -0
  71. texact-0.1.0/source/texact_config/chktexrc +799 -0
  72. texact-0.1.0/test/assets/bio_bad_size.png +0 -0
  73. texact-0.1.0/test/assets/bio_ok.png +0 -0
  74. texact-0.1.0/test/casing_test.tex +22 -0
  75. texact-0.1.0/test/configuration_test.py +142 -0
  76. texact-0.1.0/test/diagnostics_test.py +101 -0
  77. texact-0.1.0/test/figure_test.tex +136 -0
  78. texact-0.1.0/test/ieee_biography_test.tex +29 -0
  79. texact-0.1.0/test/ignore_test.tex +13 -0
  80. texact-0.1.0/test/inthis.tex +52 -0
  81. texact-0.1.0/test/reflabel_test.tex +35 -0
  82. texact-0.1.0/test/test.py +28 -0
  83. texact-0.1.0/test/unsure.tex +21 -0
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,59 @@
1
+ name: cli-test
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ pre-commit:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v7
14
+
15
+ - name: Setup Python
16
+ uses: actions/setup-python@v7
17
+ with:
18
+ python-version: "3.12"
19
+
20
+ - name: Cache pre-commit environments
21
+ uses: actions/cache@v6
22
+ with:
23
+ path: ~/.cache/pre-commit
24
+ key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
25
+
26
+ - name: Run pre-commit
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ python -m pip install pre-commit
30
+ python -m pre_commit run --all-files
31
+
32
+ cli-tests:
33
+ runs-on: ${{ matrix.os }}
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ os: [ubuntu-latest, macos-latest, windows-latest]
38
+ python-version: ["3.11", "3.14"]
39
+
40
+ steps:
41
+ - name: Checkout
42
+ uses: actions/checkout@v7
43
+
44
+ - name: Setup Python
45
+ uses: actions/setup-python@v7
46
+ with:
47
+ python-version: ${{ matrix.python-version }}
48
+
49
+ - name: Install package
50
+ run: |
51
+ python -m pip install --upgrade pip
52
+ python -m pip install .
53
+ python -m pip install pytest
54
+
55
+ - name: Check texact help
56
+ run: texact -h
57
+
58
+ - name: Run texact on each LaTeX file, making sure nothing crashes
59
+ run: python -m pytest -q test/test.py
@@ -0,0 +1,43 @@
1
+ name: documentation
2
+ concurrency:
3
+ group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4
+ cancel-in-progress: true
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ permissions:
13
+ contents: write
14
+
15
+ jobs:
16
+ docs:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v7
21
+
22
+ - name: Setup Python
23
+ uses: actions/setup-python@v7
24
+ with:
25
+ python-version: "3.12"
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install -v .[docs]
31
+ - name: Sphinx build
32
+ run: |
33
+ cd docs
34
+ make html
35
+ cd ..
36
+ - name: Deploy to GitHub Pages
37
+ uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
38
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
39
+ with:
40
+ publish_branch: gh-pages
41
+ github_token: ${{ secrets.GITHUB_TOKEN }}
42
+ publish_dir: docs/_build/html
43
+ keep_files: true
@@ -0,0 +1,58 @@
1
+ name: Publish TeXact to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ release-build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - uses: actions/setup-python@v7
20
+ with:
21
+ python-version: "3.11"
22
+
23
+ - name: Build release distributions
24
+ run: |
25
+ python -m pip install --upgrade build
26
+ python -m build
27
+
28
+ - name: Upload distributions
29
+ uses: actions/upload-artifact@v7
30
+ with:
31
+ name: release-dists
32
+ path: dist/
33
+
34
+ pypi-publish:
35
+ runs-on: ubuntu-latest
36
+ needs:
37
+ - release-build
38
+ permissions:
39
+ # IMPORTANT: this permission is mandatory for trusted publishing
40
+ id-token: write
41
+
42
+ # Dedicated environments with protections for publishing are strongly recommended.
43
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
44
+ environment:
45
+ name: pypi
46
+ url: https://pypi.org/project/texact/
47
+
48
+ steps:
49
+ - name: Retrieve release distributions
50
+ uses: actions/download-artifact@v4
51
+ with:
52
+ name: release-dists
53
+ path: dist/
54
+
55
+ - name: Publish release distributions to PyPI
56
+ uses: pypa/gh-action-pypi-publish@release/v1
57
+ with:
58
+ packages-dir: dist/
@@ -0,0 +1,4 @@
1
+ __pycache__
2
+ *.egg-info/
3
+ _build
4
+ build
@@ -0,0 +1,43 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: check-added-large-files
7
+ - id: check-case-conflict
8
+ - id: check-docstring-first
9
+ - id: check-merge-conflict
10
+ - id: check-toml
11
+ - id: end-of-file-fixer
12
+ - repo: https://github.com/codespell-project/codespell
13
+ rev: v2.4.2
14
+ hooks:
15
+ - id: codespell
16
+ additional_dependencies:
17
+ - tomli
18
+ exclude: ^(source/reviewers/reviewer_casing\.py|config/chktexrc|source/texact_config/chktexrc)$
19
+ - repo: https://github.com/pre-commit/mirrors-clang-format
20
+ rev: v22.1.2
21
+ hooks:
22
+ - id: clang-format
23
+ - repo: https://github.com/igorshubovych/markdownlint-cli
24
+ rev: v0.48.0
25
+ hooks:
26
+ - id: markdownlint
27
+ - repo: https://github.com/pre-commit/pygrep-hooks
28
+ rev: v1.10.0
29
+ hooks:
30
+ - id: python-check-blanket-noqa
31
+ - id: python-use-type-annotations
32
+ - id: rst-backticks
33
+ - id: rst-directive-colons
34
+ - id: rst-inline-touching-normal
35
+ - id: text-unicode-replacement-char
36
+ - repo: https://github.com/astral-sh/ruff-pre-commit
37
+ # Ruff version.
38
+ rev: v0.15.8
39
+ hooks:
40
+ # Run the linter.
41
+ - id: ruff
42
+ # Run the formatter.
43
+ - id: ruff-format
@@ -0,0 +1,6 @@
1
+ - id: texact-check
2
+ name: texact check
3
+ description: "Run 'texact' checking LaTeX code"
4
+ entry: texact
5
+ language: python
6
+ types: [tex]
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ ### Fixed
13
+
14
+ ### Changed
15
+
16
+ ### Removed
17
+
18
+ ## [0.1.0] - 2026-08-14
19
+
20
+ Initial release.
21
+
22
+ [unreleased]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.1.0...HEAD
23
+ [0.1.0]: https://github.com/Theodor-Lindberg/texact/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Theodor Lindberg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
texact-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,61 @@
1
+ Metadata-Version: 2.4
2
+ Name: texact
3
+ Version: 0.1.0
4
+ Summary: Automated article and LaTeX checks
5
+ Author: Theodor Lindberg
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE.txt
9
+ Requires-Dist: Pillow>=10
10
+ Requires-Dist: colorama>=0.4
11
+ Provides-Extra: docs
12
+ Requires-Dist: sphinx>=7; extra == "docs"
13
+ Requires-Dist: furo>=2025; extra == "docs"
14
+ Requires-Dist: myst-parser>=4; extra == "docs"
15
+ Requires-Dist: m2r2; extra == "docs"
16
+ Requires-Dist: docutils<=0.20; extra == "docs"
17
+ Dynamic: license-file
18
+
19
+ # TeXact
20
+
21
+ TeXact is a tool for finding miscellaneous mistakes in LaTeX code
22
+ and article writing.
23
+ It does not edit your files, so you can run it fearlessly.
24
+ It is also not intended to replace existing tools, such as
25
+ [ChkTeX](https://www.nongnu.org/chktex/) and
26
+ [lacheck](https://linux.die.net/man/1/lacheck), but rather to
27
+ complement and incorporate them.
28
+
29
+ ## Documentation
30
+
31
+ [https://theodor-lindberg.github.io/texact/](https://theodor-lindberg.github.io/texact/)
32
+
33
+ ## Features
34
+
35
+ * Check consistency between "\ref" and "\label".
36
+ * Make sure certain words have correct casing.
37
+ * Warn if the abstract begins with "In this work" or similar.
38
+ * Avoid certain modal verbs, such as should, would, could, and might.
39
+ * Run [ChkTeX](https://www.nongnu.org/chktex/), if installed, with "appropriate"
40
+ settings.
41
+ * And more...
42
+
43
+ ## Quickstart
44
+
45
+ TeXact can be installed using pip directly from git:
46
+
47
+ ```bash
48
+ python -m pip install "git+ssh://git@github.com/Theodor-Lindberg/texact.git"
49
+ ```
50
+
51
+ then run as
52
+
53
+ ```bash
54
+ texact path/to/file.tex
55
+ ```
56
+
57
+ For more information, run
58
+
59
+ ```bash
60
+ texact -h
61
+ ```
texact-0.1.0/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # TeXact
2
+
3
+ TeXact is a tool for finding miscellaneous mistakes in LaTeX code
4
+ and article writing.
5
+ It does not edit your files, so you can run it fearlessly.
6
+ It is also not intended to replace existing tools, such as
7
+ [ChkTeX](https://www.nongnu.org/chktex/) and
8
+ [lacheck](https://linux.die.net/man/1/lacheck), but rather to
9
+ complement and incorporate them.
10
+
11
+ ## Documentation
12
+
13
+ [https://theodor-lindberg.github.io/texact/](https://theodor-lindberg.github.io/texact/)
14
+
15
+ ## Features
16
+
17
+ * Check consistency between "\ref" and "\label".
18
+ * Make sure certain words have correct casing.
19
+ * Warn if the abstract begins with "In this work" or similar.
20
+ * Avoid certain modal verbs, such as should, would, could, and might.
21
+ * Run [ChkTeX](https://www.nongnu.org/chktex/), if installed, with "appropriate"
22
+ settings.
23
+ * And more...
24
+
25
+ ## Quickstart
26
+
27
+ TeXact can be installed using pip directly from git:
28
+
29
+ ```bash
30
+ python -m pip install "git+ssh://git@github.com/Theodor-Lindberg/texact.git"
31
+ ```
32
+
33
+ then run as
34
+
35
+ ```bash
36
+ texact path/to/file.tex
37
+ ```
38
+
39
+ For more information, run
40
+
41
+ ```bash
42
+ texact -h
43
+ ```