Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0e066fd
Update .travis.yml
peternewman Aug 19, 2020
d1db347
Add more debugging to make
peternewman Aug 28, 2020
07085e2
Removing some extra make debug
peternewman Aug 28, 2020
07a74c0
Warn if the dictionary tests won't be run
peternewman Aug 28, 2020
cf6dd66
Remove the make verbosity again
peternewman Aug 28, 2020
ac87668
Install the required dependencies
peternewman Aug 28, 2020
1248773
Try and install via the right version of pip
peternewman Aug 28, 2020
91bd8d1
Merge branch 'master' into peternewman-makefile-standardisation
peternewman Sep 1, 2020
9ff32ae
Add a dev extras section
peternewman Sep 1, 2020
0f90eef
Switch to the dev extras to install the codespell dev packages
peternewman Sep 1, 2020
a63b237
Install the codespell dev packages via pip
peternewman Sep 1, 2020
b31b1a2
We need to checkout to have our file
peternewman Sep 1, 2020
4408387
Install general dependencies
peternewman Sep 1, 2020
c10d786
Add more stuff to extras
peternewman Sep 1, 2020
dd51e32
Install the extras from the right directory
peternewman Sep 1, 2020
445d7e7
Remove the packages installed via the dev packaging and standardise t…
peternewman Sep 1, 2020
a7fcd92
Fix the flake8 warnings
peternewman Sep 1, 2020
b1bf9ac
Make the missing test dependencies a fatal error
peternewman Sep 1, 2020
410b334
Add a note about dev to the readme
peternewman Sep 1, 2020
3ed624a
Update README.rst formatting
peternewman Sep 1, 2020
1cc9622
Tweak licence detail formatting
peternewman Sep 1, 2020
d7c40ec
Pull coverage in as a dependency
peternewman Sep 1, 2020
1dd70f8
Pull coverage in as a dependency
peternewman Sep 1, 2020
cf56b3f
Add flake8 to our dev and sort the requirements
peternewman Sep 1, 2020
de8cf59
Add a check action which calls flake8, check-manifest and check-dicti…
peternewman Sep 1, 2020
46dee75
Add the other bits of checking to Makefile
peternewman Sep 1, 2020
2a6aa79
Switch to make check
peternewman Sep 1, 2020
de2b152
Try running make check on appveyor
peternewman Sep 1, 2020
8374389
Add a note about make check
peternewman Sep 1, 2020
03c41ee
No make on appveyor
peternewman Sep 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/codespell-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ jobs:
make-check-dictionaries:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@v2
- name: Install general dependencies
run: pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
- name: Install codespell dependencies
run: pip install -e ".[dev]"
- uses: codespell-project/sort-problem-matcher@v1
- run: make check-dictionaries

Expand Down
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,20 @@ before_install:
- source venv/bin/activate
- python --version # just to check
- pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
- retry pip install pytest pytest-cov pytest-dependency flake8 coverage codecov chardet "setuptools!=47.2.0" docutils check-manifest
- retry pip install codecov chardet "setuptools!=47.2.0" docutils
- retry pip install aspell-python-py3
- cd $SRC_DIR
- pip install -e ".[dev]" # install the codespell dev packages

install:
- python setup.py install

script:
- codespell --help
- make check-dictionary
- make check
- codespell --check-filenames --skip="./.git/*,*.pyc,./codespell_lib/tests/test_basic.py,./codespell_lib/data/*,./example/code.c,./build/lib/codespell_lib/tests/test_basic.py,./build/lib/codespell_lib/data/*"
# this file has an error
- "! codespell codespell_lib/tests/test_basic.py"
- flake8
- python setup.py check --restructuredtext --strict
- pytest codespell_lib
- make check-manifest

after_success:
- codecov
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ SORT_ARGS := -f -b

DICTIONARIES := codespell_lib/data/dictionary*.txt

PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary clean
PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary check-manifest check-distutils flake8 pytest pypi clean

all: check-dictionaries codespell.1

check: check-dictionaries check-manifest check-distutils flake8 pytest

check-dictionary: check-dictionaries
sort-dictionary: sort-dictionaries
trim-dictionary: trim-dictionaries

codespell.1: codespell.1.include bin/codespell
codespell.1: codespell.1.include bin/codespell Makefile
PYTHONPATH=. help2man ./bin/codespell --include codespell.1.include --no-info --output codespell.1
sed -i '/\.SS \"Usage/,+2d' codespell.1

Expand All @@ -27,6 +29,9 @@ check-dictionaries:
done
@if command -v pytest > /dev/null; then \
pytest codespell_lib/tests/test_dictionary.py; \
else \
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
exit 1; \
fi

sort-dictionaries:
Expand All @@ -42,6 +47,15 @@ trim-dictionaries:
check-manifest:
check-manifest

check-distutils:
python setup.py check --restructuredtext --strict

flake8:
flake8

pytest:
pytest codespell_lib

pypi:
python setup.py sdist register upload

Expand Down
16 changes: 14 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ directly, but instead be manually inspected. E.g.:
Note that there isn't a comma in the end of the line. The last argument is
treated as the reason why a suggestion cannot be automatically applied.

Development Setup
-----------------

You can install required dependencies for development by running the following within a checkout of the codespell source::

pip install -e ".[dev]"

To run tests against the codebase run::

make check

Sending Pull Requests
---------------------

Expand Down Expand Up @@ -181,6 +192,7 @@ with the following terms:

.. _GPL v2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

dictionary.txt is a derived work of English Wikipedia and is released under the
Creative Commons Attribution-Share-Alike License 3.0
``dictionary.txt`` and the other ``dictionary_*.txt`` files are a derived work of
English Wikipedia and are released under the Creative Commons
Attribution-Share-Alike License 3.0
http://creativecommons.org/licenses/by-sa/3.0/
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ cache:

install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "pip install pytest pytest-cov pytest-dependency setuptools flake8 coverage chardet codecov"
- "pip install codecov chardet setuptools"
- "pip install -e \".[dev]\"" # install the codespell dev packages
- "python setup.py develop"

build: false # Not a C# project, build stuff at the test step instead.
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,10 @@
'console_scripts': [
'codespell = codespell_lib:_script_main'
],
},
extras_require={
"dev": ["check-manifest", "flake8", "pytest", "pytest-cov",
"pytest-dependency"],
"hard-encoding-detection": ["chardet"],
}
)