41 Commits

Author SHA1 Message Date
8c063f305f Replace local and CI workflow by pre-commit (#3020) 2023-08-09 12:56:37 -04:00
9c580dff5f Use pre-commit to sort the dictionaries (#2973) 2023-07-31 20:13:39 -04:00
aa08625f13 Fix pre-commit issues (#2967) 2023-07-25 16:48:02 -04:00
abd93b0787 Replace bandit, isort, pylint, pyupgrade, and flake8 plus plugins with ruff (#2779) 2023-03-10 13:33:01 -05:00
fbd90f07e4 Remove alias make targets to facilitate tab completion
When running the check/sort/trim make targets, I normally type something
along the lines of:

    make check-d<TAB>

And let the shell tab completion finish the line for me. As there exists
multiple variations, (check-dictionary and check-dictionaries) tab
completion stops at the common substring and then I must finish typing
the rest of the command.

By removing the aliases, tab completion will complete the full command
immediately.
2023-01-04 16:26:09 +01:00
5ff2a1e99f Most of MANIFEST.in is obsolete, get rid of it (#2646) 2023-01-02 09:15:53 -05:00
67bc09e872 PEP 517 (#2595) 2022-11-28 09:06:15 -05:00
ba4e71d9ec Remove setup.py (#2626)
With pyproject.toml, setup.py becomes unnecessary. Future versions of
setuptools (and Python packaging in general) will deprecate the file.

The command `setup.py check` was replaced by `twine check` which serves
a similar role.

setuptools is still a dependency of the build, just doesn't require
setup.py.

Fixes #2606
2022-11-28 08:52:54 -05:00
73d0497ad6 Catch all cases of missing pytest (#2568)
Command `pytest` is not available on distributions such as Ubuntu 22.04,
where only `pytest-3`/`py.test-3` are available.
2022-10-31 13:03:37 -04:00
754b9a52f7 MAINT: Use pyproject and setuptools_scm (#2523)
* MAINT: Use pyproject and setuptools_scm

* FIX: Name

* FIX: Better

* FIX: Better

* FIX: Better

* FIX: Ver

* Update .github/workflows/codespell-private.yml

Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>

Co-authored-by: Peter Newman <peternewman@users.noreply.github.com>
2022-10-14 14:15:52 -04:00
9830edba12 Use grep -E instead of egrep 2022-09-10 19:13:34 +00:00
e4b648fa3a Fix dictionary check action and standardise the make command we run (#1647)
* Update .travis.yml

* Add more debugging to make

* Removing some extra make debug

* Warn if the dictionary tests won't be run

* Remove the make verbosity again

* Install the required dependencies

* Try and install via the right version of pip

* Add a dev extras section

* Switch to the dev extras to install the codespell dev packages

* Install the codespell dev packages via pip

* We need to checkout to have our file

* Install general dependencies

* Add more stuff to extras

* Install the extras from the right directory

Also move more stuff to extras

* Remove the packages installed via the dev packaging and standardise the order with Travis

* Fix the flake8 warnings

* Make the missing test dependencies a fatal error

* Add a note about dev to the readme

* Update README.rst formatting

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>

* Tweak licence detail formatting

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>

* Pull coverage in as a dependency

* Pull coverage in as a dependency

* Add flake8 to our dev and sort the requirements

* Add a check action which calls flake8, check-manifest and check-dictionaries

* Add the other bits of checking to Makefile

* Switch to make check

* Try running make check on appveyor

* Add a note about make check

* No make on appveyor

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
2020-09-01 11:31:54 -04:00
797e347c93 FIX: 1.17.1 2020-05-21 23:09:19 -04:00
a7624a348c Sort multiple dictionaries (#1475)
* Check all the dictionaries are sorted

* Sort and trim all dictionaries

* Add a github action to run make check-dictionary

* Fix the grammar of the tasks, but keep the old ones for backwards compatibility

* Use the new Makefile methods everywhere and update docs

* Sort the dictionaries
2020-04-07 14:36:21 -04:00
c2cf92e3ae ENH: Update test-dictionary (#1416) 2020-01-23 12:36:15 -05:00
31e2d60adb Fix Blank lines in dictionary aren't flagged by check-dictionary, cause crash #1088 (#1089) 2019-04-19 20:02:59 -04:00
9cb17404b2 .travis.yml: Check that the dictionary is sorted (#383)
* Sort the dictionary

* .travis.yml: Check that the dictionary is sorted

To avoid committing an unsorted dictionary and having to fix it up later, check
that the dictionary is sorted in Travis-CI.

This fixes issue #310.

* Makefile: Use LC_ALL=C instead of LANG=C to set locale for sort

The POSIX manual page for sort states:

ENVIRONMENT VARIABLES
       The following environment variables shall affect the execution of sort:

       LANG      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1‐2008, Section 8.2, Internationalization
                 Variables for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       LC_ALL    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       [...]

So, it seems safer to use LC_ALL to set the locale.
2018-04-16 10:32:27 -04:00
c5fe7f41d4 Remove borken parts of Makefile and repair manpage creation 2017-01-04 21:15:21 +01:00
8339cb5931 FIX: Fix readme 2016-06-09 14:52:52 -04:00
bf5cd67b4b Fix paths to data file in Makefile (fix "make sort-dictionary"). 2016-05-22 12:45:39 -07:00
0268ac55f8 using correct prerequisite and fixing incomplete SORT_ARGS
As $^ contains all prerequisites the codespell target fails as
sed tries to get the input from codespell.py and check-dictionary
where checkdictionary isn't a file but a makefile target only.
Use $< instead, as it returns only the first prerequisite.

Also the implementation for SORT_ARGS was completed.
2015-09-10 13:32:54 +02:00
11d3d695bd build: add check for dictionary
Check if dictionary is sorted correctly. May be extended with more
checks later.
2015-08-18 12:33:56 -03:00
8c40f63337 build: add missing entries to PHONY 2015-08-18 12:22:26 -03:00
481bf618b0 added manpage generation using help2man 2015-08-15 17:09:29 -07:00
eb5ddf9c3c adding chmod 755 for codespell target
fixing pep8 warnings.
2015-05-17 10:56:46 +02:00
cee960bddf adding clean target 2015-05-17 10:56:46 +02:00
15ebf3cd03 Fix make check
The output of codespell was changed to non-colored in 0c57ab7 ("Update the
handling of colour output for more use-cases.") if stdout is not a
terminal. This is the case for the rule in make check. Just update the
hash so it matches without color.
2015-03-09 09:26:00 -03:00
d3b1e186a6 Add 'codespell' target as a dependency of 'install'
Install needs a file generated by the other target. Otherwise we have
following build error:

  install: cannot stat ‘codespell’: No such file or directory

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
2014-09-02 19:17:43 -07:00
c1af62296a build-sys: Fix release commands
We upload tar.xz files, not tar.gz.
2014-09-02 22:18:02 -03:00
b64798cc20 build-sys: Update release commands 2014-09-02 21:39:24 -03:00
6c71bac781 Add a test suite 2013-12-26 13:11:15 -02:00
8920fce8af Split the build and install phases 2013-12-26 12:28:33 -02:00
f0861266e2 Use make automatic variables 2013-12-26 12:27:57 -02:00
4ab61e972b Install in /usr/local by default 2013-12-26 12:24:55 -02:00
0b9ec2dbc4 Remove unneeded comma 2013-04-19 04:52:06 -07:00
f1c09d814d Move dictionary name to optional parameter
Most often users just need the default dictionary, so let's create an option
with default value set to dictonary.txt. Users can overwrite this parameter with
its own dictionary.

By default codespell will check $PWD/data/dictionary.txt file. It is where
dictionary is stored if one uses codespell from sources tar or git repo.
It is expected that package managers will install dictionary to shared data folder
and change default value accordinally.
2013-04-17 11:02:20 -07:00
b414b02363 Install binary file as 'codespell' instead of 'codespell.py'
Users don't have to know that this tool is written in Python
2013-04-17 06:42:21 -07:00
3783c3949f Fix typo in Makefile changing default datadir 2012-03-05 16:31:30 -03:00
719d8c0e13 build-sys: add helpers for release 2012-02-28 23:12:34 -03:00
7d00955805 Ask user to explicitly use 'make install' 2011-10-14 17:47:43 -03:00
368fd4436d Add Makefile 2011-06-28 00:28:12 -03:00