<commit_before>#
# Simple Makefile for the XlsxWriter project.
#

.PHONY: docs

docs doc:
	@make -C dev/docs html

docs_external:
	@../build_readthedocs.sh

pdf:
	@make -C dev/docs latexpdf

linkcheck:
	@make -C dev/docs linkcheck

clean:
	@make -C dev/docs clean

alldocs: clean docs pdf
	@cp -r dev/docs/build/html docs
	@cp -r dev/docs/build/latex/XlsxWriter.pdf docs

pdf_release: pdf
	@cp -r dev/docs/build/latex/XlsxWriter.pdf docs

install:
	@python setup.py install
	@rm -rf build

test:
	@~/.pythonbrew/pythons/Python-3.9.0/bin/python -m unittest discover

# Test with stable Python 2/3 releases.
testpythons:
	@echo "Testing with Python 3.4.1:"
	@~/.pythonbrew/pythons/Python-3.4.1/bin/py.test -q
	@echo "Testing with Python 3.5.0:"
	@~/.pythonbrew/pythons/Python-3.5.0/bin/py.test -q
	@echo "Testing with Python 3.6.6:"
	@~/.pythonbrew/pythons/Python-3.6.6/bin/py.test -q
	@echo "Testing with Python 3.7.0:"
	@~/.pythonbrew/pythons/Python-3.7.0/bin/py.test -q
	@echo "Testing with Python 3.8.0:"
	@~/.pythonbrew/pythons/Python-3.8.0/bin/py.test -q
	@echo "Testing with Python 3.9.0:"
	@~/.pythonbrew/pythons/Python-3.9.0/bin/py.test -q

test_codestyle testpep8:
	@ls -1 xlsxwriter/*.py | egrep -v "theme|compat|__init__" | xargs pycodestyle
	@pycodestyle --ignore=E501 xlsxwriter/theme.py
	@find xlsxwriter/test -name \*.py | xargs pycodestyle --ignore=E501

tags:
	$(Q)rm -f TAGS
	$(Q)etags xlsxwriter/*.py

testwarnings:
	@python -Werror -c 'from xlsxwriter import Workbook'

spellcheck:
	@for f in dev/docs/source/*.rst;           do aspell --lang=en_US --check $$f; done
	@for f in *.md;                            do aspell --lang=en_US --check $$f; done
	@for f in xlsxwriter/*.py;                 do aspell --lang=en_US --check $$f; done
	@for f in xlsxwriter/test/comparison/*.py; do aspell --lang=en_US --check $$f; done
	@for f in examples/*.py;                   do aspell --lang=en_US --check $$f; done
	@aspell --lang=en_US --check Changes

releasecheck:
	@dev/release/release_check.sh

release: releasecheck
	@git push origin main
	@git push --tags

	@rm -rf dist/ build/ XlsxWriter.egg-info/
	@python setup.py sdist bdist_wheel
	@twine upload dist/*
	@rm -rf dist/ build/ XlsxWriter.egg-info/

	@../build_readthedocs.sh
<commit_msg>Change from codestyle to flake8 for lint/style testing.<commit_after>#
# Simple Makefile for the XlsxWriter project.
#

.PHONY: docs

docs doc:
	@make -C dev/docs html

docs_external:
	@../build_readthedocs.sh

pdf:
	@make -C dev/docs latexpdf

linkcheck:
	@make -C dev/docs linkcheck

clean:
	@make -C dev/docs clean

alldocs: clean docs pdf
	@cp -r dev/docs/build/html docs
	@cp -r dev/docs/build/latex/XlsxWriter.pdf docs

pdf_release: pdf
	@cp -r dev/docs/build/latex/XlsxWriter.pdf docs

install:
	@python setup.py install
	@rm -rf build

test:
	@~/.pythonbrew/pythons/Python-3.9.0/bin/python -m unittest discover

# Test with stable Python 2/3 releases.
testpythons:
	@echo "Testing with Python 3.4.1:"
	@~/.pythonbrew/pythons/Python-3.4.1/bin/py.test -q
	@echo "Testing with Python 3.5.0:"
	@~/.pythonbrew/pythons/Python-3.5.0/bin/py.test -q
	@echo "Testing with Python 3.6.6:"
	@~/.pythonbrew/pythons/Python-3.6.6/bin/py.test -q
	@echo "Testing with Python 3.7.0:"
	@~/.pythonbrew/pythons/Python-3.7.0/bin/py.test -q
	@echo "Testing with Python 3.8.0:"
	@~/.pythonbrew/pythons/Python-3.8.0/bin/py.test -q
	@echo "Testing with Python 3.9.0:"
	@~/.pythonbrew/pythons/Python-3.9.0/bin/py.test -q

test_flake8:
	@ls -1 xlsxwriter/*.py | egrep -v "theme|__init__" | xargs flake8 --show-source
	@ls -1 xlsxwriter/*.py | egrep -v "theme|__init__" | xargs pycodestyle
	@flake8 --ignore=E501 xlsxwriter/theme.py
	@find xlsxwriter/test -name \*.py | xargs flake8 --ignore=E501,F841

tags:
	$(Q)rm -f TAGS
	$(Q)etags xlsxwriter/*.py

testwarnings:
	@python -Werror -c 'from xlsxwriter import Workbook'

spellcheck:
	@for f in dev/docs/source/*.rst;           do aspell --lang=en_US --check $$f; done
	@for f in *.md;                            do aspell --lang=en_US --check $$f; done
	@for f in xlsxwriter/*.py;                 do aspell --lang=en_US --check $$f; done
	@for f in xlsxwriter/test/comparison/*.py; do aspell --lang=en_US --check $$f; done
	@for f in examples/*.py;                   do aspell --lang=en_US --check $$f; done
	@aspell --lang=en_US --check Changes

releasecheck:
	@dev/release/release_check.sh

release: releasecheck
	@git push origin main
	@git push --tags

	@rm -rf dist/ build/ XlsxWriter.egg-info/
	@python setup.py sdist bdist_wheel
	@twine upload dist/*
	@rm -rf dist/ build/ XlsxWriter.egg-info/

	@../build_readthedocs.sh

{'fraction_non_alphanumeric': 0.15211267605633802, 'fraction_numerical': 0.022968580715059587, 'mean_word_length': 2.958833619210978, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '991852', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1880, 'n_words': 473}