-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from sarnold/cleanup-pr
Cleanup pr
- Loading branch information
Showing
18 changed files
with
520 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## actual check/plugin settings (required if .codeclimate.yml exists) | ||
|
||
version: "2" # required to adjust maintainability checks | ||
checks: | ||
argument-count: | ||
config: | ||
threshold: 8 | ||
complex-logic: | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
config: | ||
threshold: 250 | ||
method-complexity: | ||
config: | ||
threshold: 15 | ||
method-count: | ||
config: | ||
threshold: 20 | ||
method-lines: | ||
config: | ||
threshold: 25 | ||
nested-control-flow: | ||
config: | ||
threshold: 5 | ||
return-statements: | ||
config: | ||
threshold: 5 | ||
similar-code: | ||
config: | ||
threshold: # language-specific defaults. an override will affect all languages. | ||
identical-code: | ||
enabled: false | ||
config: | ||
threshold: # language-specific defaults. an override will affect all languages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[run] | ||
omit = | ||
.tox/* | ||
setup.py | ||
|
||
plugins = | ||
coverage_python_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Set default behaviour to automatically normalize line endings. | ||
* text=auto | ||
|
||
# Force batch scripts to always use CRLF line endings so that if a repo is | ||
# accessed in Windows via a file share from Linux, the scripts will work. | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf | ||
|
||
# Force bash scripts to always use LF line endings so that if a repo is | ||
# accessed in Unix via a file share from Windows, the scripts will work. | ||
*.sh text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Smoke | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
PYTHONIOENCODING: utf-8 | ||
PIP_DOWNLOAD_CACHE: ${{ github.workspace }}/../.pip_download_cache | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Add python requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run tests | ||
run: | | ||
tox | ||
env: | ||
PLATFORM: ${{ matrix.os }} | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
env_vars: OS,PYTHON | ||
|
||
- name: Build sdist/wheel | ||
run: | | ||
tox -e build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Conda | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, windows-2016, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
# The setup-miniconda action needs this to activate miniconda | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cache conda | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{matrix.os}}-conda-pkgs-${{hashFiles('**/conda/meta.yaml')}} | ||
|
||
- name: Get conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
channel-priority: strict | ||
use-only-tar-bz2: true | ||
auto-activate-base: true | ||
|
||
- name: Prepare | ||
run: conda install conda-build conda-verify nose | ||
|
||
- name: Build | ||
run: conda build conda | ||
|
||
- name: Install | ||
run: conda install -c ${CONDA_PREFIX}/conda-bld/ minimock | ||
|
||
- name: Test | ||
run: nosetests -x --detailed-errors . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
# release on tag push | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Get version | ||
id: get_version | ||
run: | | ||
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
echo ${{ env.VERSION }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install gitchangelog | ||
run: | | ||
python -m pip install https://github.com/freepn/gitchangelog/archive/3.0.5.tar.gz | ||
- name: Generate changes file | ||
run: | | ||
export GITCHANGELOG_CONFIG_FILENAME=$(get-rcpath) | ||
bash -c 'gitchangelog $(git tag --sort=taggerdate | tail -n2 | head -n1)..${{ env.VERSION }} > CHANGES.md' | ||
- name: Create draft release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
name: Release v${{ env.VERSION }} | ||
body_path: CHANGES.md | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
scanner: | ||
linter: flake8 # Other option is pycodestyle | ||
|
||
no_blank_comment: False # If True, no comment is made on PR without any errors. | ||
descending_issues_order: True # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file | ||
|
||
[flake8] | ||
exclude = | ||
.git, | ||
__pycache__, | ||
build, | ||
dist | ||
|
||
max-line-length = 105 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
include README.rst | ||
include CHANGELOG.txt | ||
include LICENSE.txt | ||
include README.rst CHANGELOG.txt LICENSE.txt | ||
include pyproject.toml setup.py setup.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 100% | ||
threshold: 2% | ||
|
||
notify: | ||
irc: | ||
default: | ||
server: chat.freenode.net | ||
channel: '##code-hell' | ||
branches: master | ||
threshold: 2 | ||
message: null | ||
|
||
ignore: | ||
- ".tox/.*" | ||
- "*.rst" | ||
|
||
comment: | ||
layout: "header, diff, changes, sunburst, uncovered, tree" | ||
# layout: "reach, diff, flags, tree" | ||
branches: null | ||
behavior: default | ||
require_changes: no |
Oops, something went wrong.