Skip to content

Commit 362fbab

Browse files
committed
Updated config files using git_helper
1 parent 7608881 commit 362fbab

File tree

9 files changed

+97
-22
lines changed

9 files changed

+97
-22
lines changed

.ci/travis_build_conda.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
1515
conda config --set always_yes yes --set changeps1 no
1616
conda update -q conda
1717
conda install conda-build
18-
conda install anaconda-client
1918
conda info -a
2019

2120
conda config --add channels domdfcoding || exit 1
@@ -24,22 +23,6 @@ if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
2423

2524
conda build conda --output-folder conda/dist
2625

27-
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
28-
echo "$f"
29-
conda install $f || exit 1
30-
if [ -z "$TRAVIS_TAG" ]; then
31-
echo "Skipping deploy because this is not a tagged commit"
32-
else
33-
if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
34-
echo "Deploying to Anaconda.org..."
35-
anaconda -t $ANACONDA_TOKEN upload $f || exit 1
36-
echo "Successfully deployed to Anaconda.org."
37-
else
38-
echo "Skipping deploy because this is not the required runtime"
39-
fi
40-
fi
41-
done
42-
4326
else
4427
echo "Skipping building conda package because this is not the required runtime"
4528
fi

.ci/travis_deploy_conda.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
# This file is managed by `git_helper`. Don't edit it directly
3+
4+
set -e -x
5+
6+
if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
7+
8+
# Switch to miniconda
9+
source "$HOME/miniconda/etc/profile.d/conda.sh"
10+
hash -r
11+
conda activate base
12+
conda config --set always_yes yes --set changeps1 no
13+
conda install anaconda-client
14+
conda info -a
15+
16+
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
17+
echo "$f"
18+
conda install $f || exit 1
19+
if [ -z "$TRAVIS_TAG" ]; then
20+
echo "Skipping deploy because this is not a tagged commit"
21+
else
22+
echo "Deploying to Anaconda.org..."
23+
anaconda -t $ANACONDA_TOKEN upload $f || exit 1
24+
echo "Successfully deployed to Anaconda.org."
25+
fi
26+
done
27+
28+
else
29+
echo "Skipping deploying conda package because this is not the required runtime"
30+
fi
31+
32+
exit 0

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ python:
2121
install:
2222
- requirements: requirements.txt
2323
- requirements: doc-source/requirements.txt
24-
24+

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ script:
2020
- tox
2121
after_success:
2222
- coveralls
23+
24+
before_deploy:
25+
- .ci/travis_build_conda.sh || travis_terminate 1;
2326
deploy:
2427
provider: pypi
2528
user: "DomDF"
@@ -31,4 +34,4 @@ deploy:
3134
distributions: "sdist bdist_wheel"
3235
skip_existing: true
3336
after_deploy:
34-
- .ci/travis_build_conda.sh || travis_terminate 1;
37+
- .ci/travis_deploy_conda.sh || travis_terminate 1;

__pkginfo__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
VERSION = "0.3.1"
2626

2727
modname = "domdf_python_tools"
28-
py_modules = None
28+
py_modules = []
2929
entry_points = None
3030

3131
license = 'LGPLv3+'
@@ -51,7 +51,7 @@
5151
5252
Before installing please ensure you have added the "conda-forge" channel. """
5353
install_requires = (repo_root / "requirements.txt").read_text().split('\n')
54-
extras_require = {'dates': ['pytz>=2019.1']}
54+
extras_require = {'dates': ['pytz>=2019.1'], 'all': ['pytz>=2019.1']}
5555

5656
classifiers = [
5757
'Development Status :: 4 - Beta',
@@ -68,3 +68,5 @@
6868
'Topic :: Software Development :: Libraries :: Python Modules',
6969

7070
]
71+
72+
keywords = ""

lint_roller.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# fix these
2+
declare -a errors=(
3+
E301 E302 E303 E304 E305 E306 E502 E265
4+
W291 W292 W293 W391 E226 E225
5+
)
6+
7+
# Only warn for these
8+
declare -a warnings=(
9+
E101 E111 E112 E113 E121 E122 E123 E124 E125
10+
E127 E128 E129 E131 E133 E201 E202 E203
11+
E211 E222 E223 E224 E225 E227 E228 E231
12+
E241 E242 E251 E261 E262 E271 E272 E402
13+
E703 E711 E712 E713 E714 E721 E722 W503 W504
14+
)
15+
16+
if [ -z "$(git status --porcelain --untracked-files=no)" ] || [ $1 == "-f" ]; then
17+
# Working directory clean
18+
19+
for error in "${errors[@]}"
20+
do
21+
echo "Correcting $error"
22+
autopep8 --in-place --select "$error" -a --recursive domdf_python_tools/
23+
flake8 --select "$error" domdf_python_tools/
24+
autopep8 --in-place --select "$error" -a --recursive tests/
25+
flake8 --select "$error" tests/
26+
27+
done
28+
29+
for warning in "${warnings[@]}"; do
30+
echo "Searching for $warning"
31+
flake8 --select "$warning" domdf_python_tools/
32+
flake8 --select "$warning" tests/
33+
done
34+
35+
exit 0
36+
37+
else
38+
# Uncommitted changes
39+
>&2 echo "git working directory is not clean"
40+
exit 1
41+
42+
fi
43+
44+
45+

make_conda_recipe.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/python3
22

3+
# This file is managed by `git_helper`. Don't edit it directly
4+
35
import platform
46
import rst2txt
57
import sys

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
license=license,
1919
long_description=long_description,
2020
name=modname,
21-
packages=find_packages(exclude=("tests",)),
21+
packages=find_packages(exclude=("tests", "doc-source")),
2222
project_urls=project_urls,
2323
py_modules=py_modules,
2424
python_requires=">=3.6",
2525
url=web,
2626
version=VERSION,
27+
keywords=keywords,
2728

2829
)

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ build-backend = "setuptools"
2020
description = pytest
2121
# Install test requirements
2222
deps = -r{toxinidir}/tests/requirements.txt
23+
pytest >= 5.1.1
24+
pytest-cov >= 2.8.1
25+
pytz >= 2019.1
26+
coverage>=5.1
27+
pytest-randomly
28+
29+
2330

2431
commands =
2532
python --version

0 commit comments

Comments
 (0)