Skip to content

Commit d1f32b1

Browse files
authored
Merge pull request jxmorris12#130 from mdevolde/cleaning
refactor: removed unused py script (and refs), edited makefile to a functional version (and added win version)
2 parents 36f7b34 + 5ba34b4 commit d1f32b1

File tree

4 files changed

+44
-32
lines changed

4 files changed

+44
-32
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ prune tests/
2121
exclude .gitignore
2222
exclude build_and_publish.sh
2323
exclude CONTRIBUTING.md
24-
exclude extract_long_description.py
24+
exclude make.bat
2525
exclude Makefile
2626
exclude pytest.ini
2727
exclude uv.lock

Makefile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1+
.PHONY: default check test doc
2+
3+
default:
4+
@echo "Usage: make [check|test|doc]"
5+
@exit 1
6+
17
check:
2-
pycodestyle \
3-
--exclude ./language_tool_python/LanguageTool-* \
4-
--ignore=E402,W504 \
5-
./language_tool_python \
6-
./language_tool_python/ \
7-
$(wildcard *.py)
8-
pylint \
9-
--rcfile=/dev/null \
10-
--errors-only \
11-
--disable=import-error \
12-
--disable=no-member \
13-
--disable=no-name-in-module \
14-
--disable=raising-bad-type \
15-
./language_tool_python \
16-
$(wildcard ./language_tool_python/*.py) \
17-
$(wildcard *.py)
18-
python extract_long_description.py | rstcheck -
8+
uvx ruff@0.14.5 check .
9+
uvx ruff@0.14.5 format --check .
10+
uvx mypy@1.18.2
11+
12+
test:
13+
pytest
14+
15+
doc:
16+
source ./.venv/bin/activate && uv run sphinx-apidoc -o docs/source/references language_tool_python
17+
source ./.venv/bin/activate && cd ./docs && make html

extract_long_description.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

make.bat

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
if "%1"=="check" goto check
4+
if "%1"=="test" goto test
5+
if "%1"=="doc" goto doc
6+
7+
echo Usage: make.bat [check^|test^|doc]
8+
exit /b 1
9+
10+
:check
11+
uvx ruff@0.14.5 check .
12+
if errorlevel 1 exit /b %errorlevel%
13+
14+
uvx ruff@0.14.5 format --check .
15+
if errorlevel 1 exit /b %errorlevel%
16+
17+
uvx mypy@1.18.2
18+
exit /b %errorlevel%
19+
20+
:test
21+
pytest
22+
exit /b %errorlevel%
23+
24+
:doc
25+
uv sync --group tests --group docs --group types
26+
call .venv\Scripts\activate && uv run sphinx-apidoc -o docs\source\references language_tool_python
27+
call .venv\Scripts\activate && call docs\make.bat html

0 commit comments

Comments
 (0)