Skip to content

Commit

Permalink
Merge acb2869 into 9d41bcf
Browse files Browse the repository at this point in the history
  • Loading branch information
timgates42 committed Oct 24, 2019
2 parents 9d41bcf + acb2869 commit ba1ae4d
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 75 deletions.
1 change: 1 addition & 0 deletions app/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ include README.md
include short_description.txt
include requirements.txt


recursive-exclude * __pycache__
recursive-exclude * *.py[co]
1 change: 1 addition & 0 deletions app/pip/2.7/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-xdist
safety
twine
wheel

1 change: 1 addition & 0 deletions app/pip/3.4/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-xdist
safety
twine
wheel

1 change: 1 addition & 0 deletions app/pip/3.5/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-xdist
safety
twine
wheel

1 change: 1 addition & 0 deletions app/pip/3.6/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-xdist
safety
twine
wheel

3 changes: 2 additions & 1 deletion app/pip/3.7/spelling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pyspelling
resplendent
wcmatch<5.0
resplendent==0.2.3
1 change: 1 addition & 0 deletions app/pip/3.7/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-xdist
safety
twine
wheel

11 changes: 10 additions & 1 deletion app/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,19 @@ def read_version():
maintainer_email="tim.gates@iress.com",
packages=find_packages(exclude=["tests"]),
license="MIT",
description=load_include("short_description.txt"),
description=load_include("short_description.txt")
.replace("\n", " ")
.replace("\r", "")
.strip(),
long_description=load_include("README.md", transform=True),
long_description_content_type="text/markdown",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
test_suite="tests",
test_requires=[
elem.strip()
for elem in load_include("test_requires.txt").splitlines()
if elem.strip()
],
install_requires=[
elem.strip()
for elem in load_include("requirements.txt").splitlines()
Expand Down
3 changes: 3 additions & 0 deletions app/test_requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mock
pytest

16 changes: 1 addition & 15 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,5 @@ set -euxo pipefail

BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

CMD="${1:-test}"
if ! which docker ; then
echo 'Docker is missing!' >&2
exit 1
fi
if ! which docker-compose ; then
echo 'Docker-Compose is missing!' >&2
exit 1
fi
if [[ "$CMD" =~ [^a-zA-Z0-9_] ]]; then
echo "Invalid Command: ${CMD}" >&2
exit 1
fi
cd "${BASEDIR}"
"${BASEDIR}/ci/${CMD}.sh" "${@:2}"
"${BASEDIR}/ci/task.sh" "${@}"

11 changes: 0 additions & 11 deletions ci/doco.sh

This file was deleted.

1 change: 1 addition & 0 deletions ci/in_docker/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ rm -rf dist build
for PYVER in ${PYTHONVERS} ; do
"python${PYVER}" setup.py sdist bdist_wheel
done
python3.7 -m twine check dist/*
python3.7 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
python3.7 -m twine upload dist/*
4 changes: 2 additions & 2 deletions ci/in_docker/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ PYVER=3.7
# Run pyspelling in root to check docs
"python${PYVER}" -m pyspelling
# Run black to check all python on 3.7 only
"python${PYVER}" -m black --check "${BASEDIR}"
"python${PYVER}" -m black --check --diff "${BASEDIR}"
cd "${BASEDIR}/app"
# Version dependant checks
for PYVER in ${PYTHONVERS} ; do
"python${PYVER}" -m flake8 "${MODULES[@]}"
"python${PYVER}" -m isort -rc -c --diff "${MODULES[@]}"
"python${PYVER}" -m isort -rc -c -m 3 --diff "${MODULES[@]}"
"python${PYVER}" -m bandit -r "${MODULES[@]}"
find "${MODULES[@]}" -iname \*.py -print0 | xargs -0 -n 1 "${BASEDIR}/ci/in_docker/pylint.sh" "python${PYVER}"
PYTEST_FAIL="NO"
Expand Down
11 changes: 0 additions & 11 deletions ci/news.sh

This file was deleted.

11 changes: 0 additions & 11 deletions ci/pipenv.sh

This file was deleted.

11 changes: 0 additions & 11 deletions ci/publish.sh

This file was deleted.

40 changes: 40 additions & 0 deletions ci/task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -euxo pipefail

THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR="$( dirname "${THISDIR}" )"

if ! which docker ; then
echo 'Docker is missing!' >&2
exit 1
fi
if ! which docker-compose ; then
echo 'Docker-Compose is missing!' >&2
exit 1
fi
cd "${BASEDIR}"

CMD="${1:-test}"
if [[ "$CMD" =~ [^a-zA-Z0-9_] ]]; then
echo "Invalid Command: ${CMD}" >&2
exit 1
fi
TASK="ci/in_docker/${CMD}.sh"
OUT_DOCKER="${BASEDIR}/${TASK}"
IN_DOCKER="/workspace/${TASK}"
if [ ! -f "${OUT_DOCKER}" ] ; then
echo "No command: ${OUT_DOCKER}" >&2
exit 1
fi
if [ ! -x "${OUT_DOCKER}" ] ; then
echo "Not executable: ${OUT_DOCKER}" >&2
exit 1
fi

# shellcheck source=/dev/null
source "${BASEDIR}/ci/shared/_docker_helper.sh"

docker_compose_run "app" "${IN_DOCKER}" "${@:2}"


11 changes: 0 additions & 11 deletions ci/test.sh

This file was deleted.

3 changes: 2 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
],
"entry_points": "",
"package_data": "",
"extra_manifest": ""
"extra_manifest": "",
"test_requires": ""
}
2 changes: 2 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Json
junit
JUnit
li
logdecorator
lt
lxml
maxdepth
Expand Down Expand Up @@ -123,6 +124,7 @@ unicode
unmaintained
urls
utf
wcmatch
webgui
xdist
xml
Expand Down

0 comments on commit ba1ae4d

Please sign in to comment.