Skip to content

Commit d54f7d9

Browse files
committed
upgrade from pyscaffold 4.0
1 parent 32a1352 commit d54f7d9

22 files changed

+423
-338
lines changed

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@
88
*.orig
99
*.log
1010
*.pot
11-
.pytest_cache/*
1211
__pycache__/*
1312
.cache/*
1413
.*.swp
1514
*/.ipynb_checkpoints/*
15+
.DS_Store
1616

1717
# Project files
1818
.ropeproject
1919
.project
2020
.pydevproject
2121
.settings
2222
.idea
23+
.vscode
2324
tags
2425

2526
# Package files
@@ -31,8 +32,9 @@ tags
3132
# Unittest and coverage
3233
htmlcov/*
3334
.coverage
35+
.coverage.*
3436
.tox
35-
junit.xml
37+
junit*.xml
3638
coverage.xml
3739
.pytest_cache/
3840

@@ -48,8 +50,7 @@ MANIFEST
4850

4951
# Per-project virtualenvs
5052
.venv*/
53+
.conda*/
5154

5255
# mypy
5356
.mypy_cache/
54-
55-
.vscode/*

.isort.cfg

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
[settings]
2-
line_length=88
3-
indent=' '
4-
skip=.tox,.venv,build,dist
5-
known_standard_library=setuptools,pkg_resources
6-
known_test=pytest
7-
known_first_party=ellpy
8-
sections=FUTURE,STDLIB,COMPAT,TEST,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
9-
default_section=THIRDPARTY
10-
multi_line_output=3
2+
profile = black
3+
known_first_party = ellpy

.pre-commit-config.yaml

+35-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: '^docs/conf.py'
22

33
repos:
44
- repo: git://github.com/pre-commit/pre-commit-hooks
5-
rev: v2.2.3
5+
rev: v3.4.0
66
hooks:
77
- id: trailing-whitespace
88
- id: check-added-large-files
@@ -15,11 +15,40 @@ repos:
1515
- id: end-of-file-fixer
1616
- id: requirements-txt-fixer
1717
- id: mixed-line-ending
18-
args: ['--fix=no']
19-
- id: flake8
20-
args: ['--max-line-length=88'] # default of Black
18+
args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19+
20+
## If you want to avoid flake8 errors due to unused vars or imports:
21+
# - repo: https://github.com/myint/autoflake.git
22+
# rev: v1.4
23+
# hooks:
24+
# - id: autoflake
25+
# args: [
26+
# --in-place,
27+
# --remove-all-unused-imports,
28+
# --remove-unused-variables,
29+
# ]
2130

22-
- repo: https://github.com/pre-commit/mirrors-isort
23-
rev: v4.3.4
31+
- repo: https://github.com/pycqa/isort
32+
rev: 5.7.0
2433
hooks:
2534
- id: isort
35+
36+
- repo: https://github.com/psf/black
37+
rev: 20.8b1
38+
hooks:
39+
- id: black
40+
language_version: python3
41+
42+
## If like to embrace black styles even in the docs:
43+
# - repo: https://github.com/asottile/blacken-docs
44+
# rev: v1.9.1
45+
# hooks:
46+
# - id: blacken-docs
47+
# additional_dependencies: [black]
48+
49+
- repo: https://gitlab.com/pycqa/flake8
50+
rev: 3.8.4
51+
hooks:
52+
- id: flake8
53+
## You can add flake8 plugins via `additional_dependencies`:
54+
# additional_dependencies: [flake8-bugbear]

.readthedocs.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Build documentation in the docs/ directory with Sphinx
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
# Build documentation with MkDocs
12+
#mkdocs:
13+
# configuration: mkdocs.yml
14+
15+
# Optionally build your docs in additional formats such as PDF
16+
formats:
17+
- pdf
18+
19+
python:
20+
version: 3.8
21+
install:
22+
- requirements: docs/requirements.txt

AUTHORS.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributors
2+
3+
* Wai-Shing Luk <[email protected]>

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
## Version 0.1 (development)
4+
5+
- Feature A added
6+
- FIX: nasty bug #1729 fixed
7+
- add your changes here!

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Wai-Shing Luk
3+
Copyright (c) 2021 Wai-Shing Luk
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/Makefile

+14-178
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,29 @@
11
# Makefile for Sphinx documentation
22
#
33

4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
7-
PAPER =
8-
BUILDDIR = ../build/sphinx/
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
910
AUTODOCDIR = api
10-
AUTODOCBUILD = sphinx-apidoc
11-
PROJECT = ellpy
12-
MODULEDIR = ../src/ellpy
1311

1412
# User-friendly check for sphinx-build
1513
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
16-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
14+
$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/")
1715
endif
1816

19-
# Internal variables.
20-
PAPEROPT_a4 = -D latex_paper_size=a4
21-
PAPEROPT_letter = -D latex_paper_size=letter
22-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
23-
# the i18n builder cannot share the environment and doctrees with the others
24-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
25-
26-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext doc-requirements
17+
.PHONY: help clean Makefile
2718

19+
# Put it first so that "make" without argument is like "make help".
2820
help:
29-
@echo "Please use \`make <target>' where <target> is one of"
30-
@echo " html to make standalone HTML files"
31-
@echo " dirhtml to make HTML files named index.html in directories"
32-
@echo " singlehtml to make a single large HTML file"
33-
@echo " pickle to make pickle files"
34-
@echo " json to make JSON files"
35-
@echo " htmlhelp to make HTML files and a HTML help project"
36-
@echo " qthelp to make HTML files and a qthelp project"
37-
@echo " devhelp to make HTML files and a Devhelp project"
38-
@echo " epub to make an epub"
39-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
40-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
41-
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
42-
@echo " text to make text files"
43-
@echo " man to make manual pages"
44-
@echo " texinfo to make Texinfo files"
45-
@echo " info to make Texinfo files and run them through makeinfo"
46-
@echo " gettext to make PO message catalogs"
47-
@echo " changes to make an overview of all changed/added/deprecated items"
48-
@echo " xml to make Docutils-native XML files"
49-
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
50-
@echo " linkcheck to check all external links for integrity"
51-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
21+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
5222

5323
clean:
5424
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)
5525

56-
$(AUTODOCDIR): $(MODULEDIR)
57-
mkdir -p $@
58-
$(AUTODOCBUILD) -f -o $@ $^
59-
60-
doc-requirements: $(AUTODOCDIR)
61-
62-
html: doc-requirements
63-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
64-
@echo
65-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
66-
67-
dirhtml: doc-requirements
68-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
69-
@echo
70-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
71-
72-
singlehtml: doc-requirements
73-
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
74-
@echo
75-
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
76-
77-
pickle: doc-requirements
78-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
79-
@echo
80-
@echo "Build finished; now you can process the pickle files."
81-
82-
json: doc-requirements
83-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
84-
@echo
85-
@echo "Build finished; now you can process the JSON files."
86-
87-
htmlhelp: doc-requirements
88-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
89-
@echo
90-
@echo "Build finished; now you can run HTML Help Workshop with the" \
91-
".hhp project file in $(BUILDDIR)/htmlhelp."
92-
93-
qthelp: doc-requirements
94-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
95-
@echo
96-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
97-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
98-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(PROJECT).qhcp"
99-
@echo "To view the help file:"
100-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(PROJECT).qhc"
101-
102-
devhelp: doc-requirements
103-
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
104-
@echo
105-
@echo "Build finished."
106-
@echo "To view the help file:"
107-
@echo "# mkdir -p $HOME/.local/share/devhelp/$(PROJECT)"
108-
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/$(PROJEC)"
109-
@echo "# devhelp"
110-
111-
epub: doc-requirements
112-
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
113-
@echo
114-
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
115-
116-
patch-latex:
117-
find _build/latex -iname "*.tex" | xargs -- \
118-
sed -i'' 's~includegraphics{~includegraphics\[keepaspectratio,max size={\\textwidth}{\\textheight}\]{~g'
119-
120-
latex: doc-requirements
121-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
122-
$(MAKE) patch-latex
123-
@echo
124-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
125-
@echo "Run \`make' in that directory to run these through (pdf)latex" \
126-
"(use \`make latexpdf' here to do that automatically)."
127-
128-
latexpdf: doc-requirements
129-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
130-
$(MAKE) patch-latex
131-
@echo "Running LaTeX files through pdflatex..."
132-
$(MAKE) -C $(BUILDDIR)/latex all-pdf
133-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
134-
135-
latexpdfja: doc-requirements
136-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
137-
@echo "Running LaTeX files through platex and dvipdfmx..."
138-
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
139-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
140-
141-
text: doc-requirements
142-
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
143-
@echo
144-
@echo "Build finished. The text files are in $(BUILDDIR)/text."
145-
146-
man: doc-requirements
147-
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
148-
@echo
149-
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
150-
151-
texinfo: doc-requirements
152-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
153-
@echo
154-
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
155-
@echo "Run \`make' in that directory to run these through makeinfo" \
156-
"(use \`make info' here to do that automatically)."
157-
158-
info: doc-requirements
159-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
160-
@echo "Running Texinfo files through makeinfo..."
161-
make -C $(BUILDDIR)/texinfo info
162-
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
163-
164-
gettext: doc-requirements
165-
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
166-
@echo
167-
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
168-
169-
changes: doc-requirements
170-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
171-
@echo
172-
@echo "The overview file is in $(BUILDDIR)/changes."
173-
174-
linkcheck: doc-requirements
175-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
176-
@echo
177-
@echo "Link check complete; look for any errors in the above output " \
178-
"or in $(BUILDDIR)/linkcheck/output.txt."
179-
180-
doctest: doc-requirements
181-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
182-
@echo "Testing of doctests in the sources finished, look at the " \
183-
"results in $(BUILDDIR)/doctest/output.txt."
184-
185-
xml: doc-requirements
186-
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
187-
@echo
188-
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
189-
190-
pseudoxml: doc-requirements
191-
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
192-
@echo
193-
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
26+
# Catch-all target: route all unknown targets to Sphinx using the new
27+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
28+
%: Makefile
29+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/authors.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AUTHORS.md

docs/changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

0 commit comments

Comments
 (0)