Skip to content

Commit

Permalink
Latest updates from PyScaffold 4.0 development branch
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Aug 13, 2020
1 parent 1f0edbb commit a9a050d
Show file tree
Hide file tree
Showing 16 changed files with 197 additions and 311 deletions.
16 changes: 7 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ env:
clean_workspace_script:
# Avoid information carried from one run to the other
- rm -rf .coverage junit-*.xml .tox
test_script: &test_script
test_script: &test
# This script is also used in Windows, so the shell is not POSIX
- python -m tox -- -rfEx --color yes
- python -m tox -- -rfEx --durations 10 --color yes
# ^ tox is better if invoked as a module on Windows/OSX


# Task definitions:
linux_mac_task:
# Use custom cloning since otherwise git tags are missing
clone_script: &clone_script |
clone_script: &clone |
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
Expand Down Expand Up @@ -122,13 +122,14 @@ windows_task:
# Avoid information carried from one run to the other
# CMD is not capable of globbing, so we have to use PowerShell
- ps: (rm -Recurse -Force -ErrorAction SilentlyContinue .tox,junit-*.xml)
test_script: *test_script
test_script: *test


coverage_task:
name: coverage (Linux)
clone_script: *clone_script
clone_script: *clone
container: {image: "python:3.6-buster"}
pip_cache: *pip-cache
depends_on:
- test (Linux - 3.6)
- test (Linux - 3.7)
Expand All @@ -138,10 +139,7 @@ coverage_task:
- test (Windows)
install_script: *debian-install
pip_install_script:
pip install --user --upgrade
pytest pytest-cov pytest-virtualenv
coverage coveralls
flake8 pre-commit
pip install --user --upgrade coverage coveralls pre-commit
precommit_script:
- pre-commit install
- pre-commit run --all-files
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tags
htmlcov/*
.coverage
.tox
junit.xml
junit*.xml
coverage.xml
.pytest_cache/

Expand Down
13 changes: 1 addition & 12 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
[settings]
line_length = 88
force_grid_wrap = 0
multi_line_output = 3
include_trailing_comma = True
use_parentheses = True
# ^ Black-compatible
indent = ' '
skip = .tox,.venv,build,dist
extra_standard_library = setuptools,pkg_resources
known_test = pytest
profile = black
known_first_party = ci_tester
sections = FUTURE,STDLIB,TEST,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
default_section = THIRDPARTY
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'

repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -18,12 +18,12 @@ repos:
args: ['--fix=no']

- repo: http://github.com/timothycrosley/isort
rev: 5.0.9
rev: 5.4.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: stable
rev: 19.10b0
hooks:
- id: black
language_version: python3
Expand Down
19 changes: 18 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ It should be updated (forcefully if necessary) every time a change that impacts
integrations is made (a PR on PyScaffold's main repository that changes CI is
expected to provide a companion PR to this repository).

Making Changes & Contributing
=============================

This project uses `pre-commit`_, please make sure to install it before making any
changes::

$ pip install pre-commit
$ cd ci-tester
$ pre-commit install

It is a good idea to update the hooks to the latest version::

pre-commit autoupdate

Don't forget to tell your contributors to also install and use pre-commit.

.. _pre-commit: http://pre-commit.com/

Note
====

This project has been set up using PyScaffold 3.2.3.post0.dev40. For details and usage
This project has been set up using PyScaffold 3.2.3.post180+gc7877c4. For details and usage
information on PyScaffold see https://pyscaffold.org/.
192 changes: 14 additions & 178 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,193 +1,29 @@
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = ../build/sphinx/
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
AUTODOCDIR = api
AUTODOCBUILD = sphinx-apidoc
PROJECT = ci-tester
MODULEDIR = ../src/ci_tester

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
$(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/)
$(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/")
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext doc-requirements
.PHONY: help clean Makefile

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

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

$(AUTODOCDIR): $(MODULEDIR)
mkdir -p $@
$(AUTODOCBUILD) -f -o $@ $^

doc-requirements: $(AUTODOCDIR)

html: doc-requirements
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml: doc-requirements
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml: doc-requirements
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle: doc-requirements
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json: doc-requirements
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp: doc-requirements
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp: doc-requirements
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(PROJECT).qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(PROJECT).qhc"

devhelp: doc-requirements
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $HOME/.local/share/devhelp/$(PROJECT)"
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/$(PROJEC)"
@echo "# devhelp"

epub: doc-requirements
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

patch-latex:
find _build/latex -iname "*.tex" | xargs -- \
sed -i'' 's~includegraphics{~includegraphics\[keepaspectratio,max size={\\textwidth}{\\textheight}\]{~g'

latex: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text: doc-requirements
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man: doc-requirements
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext: doc-requirements
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes: doc-requirements
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck: doc-requirements
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest: doc-requirements
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

xml: doc-requirements
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml: doc-requirements
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 comments on commit a9a050d

Please sign in to comment.