Skip to content

Commit

Permalink
Merge branch 'master' into pyup/update-flake8-docstrings-1.4.0-to-1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuelbert authored Oct 19, 2019
2 parents 369927e + c0daba5 commit a3f8abd
Show file tree
Hide file tree
Showing 50 changed files with 1,120 additions and 869 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -45,6 +46,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
junit.xml

# Translations
*.mo
Expand All @@ -68,6 +70,7 @@ target/
.venv
venv/
ENV/
conda-env/

# Rope project settings
.ropeproject
Expand Down
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
# - id: check-yaml - Problems with conda recipe
- id: check-xml
- id: debug-statements
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
# - id: pretty-format-json
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^tests/fixtures/diffs/
2 changes: 1 addition & 1 deletion .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ pr_prefix: "PyUp"

# allow to close stale PRs
# default: True
close_prs: True
close_prs: True
177 changes: 147 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,177 @@
# Config file for automatic building at travis-ci.org

---
language: python
dist: xenial

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false

python:
- "3.6"
# Turn off email notifications
notifications:
email: false

env:
global:
# used by ci-helpers
- DEPS="pytest pytest-qt tox coveralls six"
- MINICONDA_VERSION=latest
- DISPLAY=":99.0"

matrix:
fast_finish: true
include:
- python: "3.6.1"
env: TOXENV=lint
- python: "3.6.1"
env: TOXENV=lint
- python: "3.6.1"
env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
- name: "Python 3.7.1 on Xenial Linux"
python: 3.7 # this works for Linux but is ignored on macOS or Windows
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a

install:
- conda env create -f environment.yml -p conda-env python=${PYTHON}
- conda activate /home/travis/build/jmuelbert/jmopenorders/conda-env
- conda list # for debug reasons

before_script:
# We need to create a (fake) display on Travis, let's use a funny resolution
- export DISPLAY=:99.0
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render

services:
- xvfb

- name: "Python 3.7.4 on macOS"
os: osx
osx_image: xcode11 # Python 3.7.4 running on macOS 10.14.4
language: shell # 'language: python' is an error on Travis CI macOS
before_install:
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh
- bash ~/miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- source "$HOME/miniconda/etc/profile.d/conda.sh"
install:
- conda env create -f environment.yml -p conda-env python=${PYTHON_VERSION}
- conda activate /Users/travis/build/jmuelbert/jmopenorders/conda-env
- conda list # for debug reasons

- name: "Python 3.7.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python
- python -m pip install --upgrade pip
- choco install miniconda3
- dir /c/tools/miniconda3
- dir /c/tools/miniconda3/Scripts
- dir /c/tools/miniconda3/etc
env: PATH=/c/Python37:/c/Python37/Scripts:/c/tools/miniconda3/Scripts:$PATH
install:
- conda env create -f environment.yml -p conda-env python=${PYTHON_VERSION}
- conda list # for debug reasons
- activate /c/users/travis/build/jmuelbert/jmopenorders/conda-env
- conda list # for debug reasons

cache:
directories:
- $HOME/.cache/pip
- $HOME/download

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda update -n base -c defaults conda
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda update -q conda
- conda config --set auto_update_conda no
- conda update -q conda --yes
- conda info -a # for debug reasons

# to aid in debugging
- echo ${TRAVIS_BRANCH}
- echo ${TRAVIS_REPO_SLUG}
- echo ${GIT_TARGET_EXTRA}
- echo ${GIT_SOURCE_EXTRA}

install:
- conda create -q -n jmbuild python=$TRAVIS_PYTHON_VERSION
- source activate jmbuild
- conda install tox
- conda install pexpect openpyxl
- conda install pip
- pip install .
- export GIT_FULL_HASH=`git rev-parse HEAD`
- pip3 install --upgrade pip # all three OSes agree about 'pip3'
# 'python' points to Python 2.7 on macOS but points to Python 3.7 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only

before_script:
# Make sure everyone uses the correct python (this is handled by conda)
- which python
- python --version
- pwd
- ls
# Help color output from each test
- RESET='\033[0m';
RED='\033[00;31m';
GREEN='\033[00;32m';
YELLOW='\033[00;33m';
BLUE='\033[00;34m';
PURPLE='\033[00;35m';
CYAN='\033[00;36m';
WHITE='\033[00;37m';
start_test() {
echo -e "${BLUE}======== Starting $1 ========${RESET}";
};
check_output() {
ret=$?;
if [ $ret == 0 ]; then
echo -e "${GREEN}>>>>>> $1 passed <<<<<<${RESET}";
else
echo -e "${RED}>>>>>> $1 FAILED <<<<<<${RESET}";
fi;
return $ret;
};

- if [ "${TEST}" == "extra" ]; then
start_test "repo size check";
mkdir ~/repo-clone && cd ~/repo-clone &&
git init && git remote add -t ${TRAVIS_BRANCH} origin git://github.com/${TRAVIS_REPO_SLUG}.git &&
git fetch origin ${GIT_TARGET_EXTRA} &&
git checkout -qf FETCH_HEAD &&
git tag travis-merge-target &&
git gc --aggressive &&
TARGET_SIZE=`du -s . | sed -e "s/\t.*//"` &&
git pull origin ${GIT_SOURCE_EXTRA} &&
git gc --aggressive &&
MERGE_SIZE=`du -s . | sed -e "s/\t.*//"` &&
if [ "${MERGE_SIZE}" != "${TARGET_SIZE}" ]; then
SIZE_DIFF=`expr \( ${MERGE_SIZE} - ${TARGET_SIZE} \)`;
else
SIZE_DIFF=0;
fi;
fi;

script:
- tox -e lint
- tox -e py37
- tox -e py37 # Must update
- tox -e docs

after_success:
- conda install -c conda-forge codecov
- conda install conda-build anaconda-client pytest pytest-cov
- codecov
- coveralls
- conda build conda.recipe --no-test
- conda build recipe --no-test
- conda install --use-local jmopenorders
- conda info -a

before_deploy:
# Conda deploy if on tag
# ANACONDA_TOKEN should be provided by Travis
# How to generate ANACONDA_TOKEN: https://docs.anaconda.com/anaconda-cloud/user-guide/tasks/work-with-accounts#creating-access-tokens

# https://conda.io/docs/user-guide/tasks/build-packages/install-conda-build.html
- conda config --set anaconda_upload no
- travis_wait 60 conda build --quiet --no-test --output-folder conda_build conda.recipe

# Convert to other platforms: OSX, WIN
- conda convert --platform win-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
- conda convert --platform osx-64 conda_build/linux-64/*.tar.bz2 -o conda_build/
# Upload to Anaconda
# We could use --all but too much platforms to uploaded
- ls conda_build/*/*.tar.bz2 | xargs -I {} anaconda -v -t $ANACONDA_TOKEN upload -u jmuelbert {}

deploy:
provider: pypi
skip_upload_docs: true
Expand Down
21 changes: 8 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Aktuelle Datei",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
"configurations": [{
"name": "Python: Aktuelle Datei",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}]
}
15 changes: 2 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"python.pythonPath": "/miniconda3/envs/cliapp37/bin/python",
"python.pythonPath": "conda-env/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--reports", "12", "--disable-msg", "I0011"],
"python.linting.flake8Enabled": true,
Expand All @@ -24,8 +24,6 @@
"pyqt-integration.linguist.cmd": "linguist",
"pyside2-vsc.uic.cmd": "pyside2-uic",


// files
"files.trimTrailingWhitespace": true,
"files.autoSave": "afterDelay",
"files.exclude": {
Expand All @@ -41,35 +39,26 @@
"**/.settings": true,
"**/.factorypath": true
},
// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": false
},

// Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change
"editor.acceptSuggestionOnEnter": "on",

// Controls the delay in ms after which quick suggestions will show up.
"editor.quickSuggestionsDelay": 10,

// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": true,

// Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
"editor.tabCompletion": "on",

// Controls whether sorting favours words that appear close to the cursor
"editor.suggest.localityBonus": true,

// Controls how suggestions are pre-selected when showing the suggest list
"editor.suggestSelection": "recentlyUsed",

// Enable word based suggestions
"editor.wordBasedSuggestions": true,

// Enable parameter hints
"editor.parameterHints.enabled": true,
"editor.parameterHints.enabled": true

}
Loading

0 comments on commit a3f8abd

Please sign in to comment.